Re: [gentoo-user] linux' IO performance sucks

2006-07-05 Thread Daniel Drake

� wrote:

So about every 200MB (i guess the linux box writes the data into the
cache in the RAM first) linux writes the harddisk. But during that time
- during the time it writes that 200MB to disk, there is no chance for
any other IO. I'm playing an mp3 from the very same fileserver. It stops
playing, because the machine does answer the read-requests.


Is this an IDE disk? Sounds like you don't have DMA enabled. Check with 
(e.g.) hdparm -d /dev/hda


Daniel
--
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] linux' IO performance sucks

2006-07-05 Thread Daniel
Sven Köhler wrote:
 Hi,
 
 sorry for the silly subject, but did you ever experience the following?:
 
 i have a fileserver, i copy a file to it - let's say 600MB.
 
 So about every 200MB (i guess the linux box writes the data into the
 cache in the RAM first) linux writes the harddisk. But during that time
 - during the time it writes that 200MB to disk, there is no chance for
 any other IO. I'm playing an mp3 from the very same fileserver. It stops
 playing, because the machine does answer the read-requests.
 
 So what's going on here?
 
 Why does Linux write so huge amounts of data to the disk? Why does Linux
 not stop writing for a while to fullfil the read-requests? And so on ...
 
 Any idea, on how to imrpove that?
 

Perhaps a more often flush of buffers may help you in this situation.

There are several parameters you can tweak to control your kernel
behavior regarding this.

You can put the following lines in your /etc/sysctl.conf file, replacing
 i,j,k and l with proper numbers.
vm.dirty_expire_centisecs =  i
vm.dirty_writeback_centisecs = j
vm.dirty_ratio = k
vm.dirty_background_ratio = l

The meaning of these parameters is descibed in the kernel documentation:
/usr/src/linux/Documentation/filesystems/proc.txt
/usr/src/linux/Documentation/sysctl/vm.txt

You could also disable all write caching by issuing the command:

hdparm -W0 /dev/your-physical-disk-name


Hope This Helps

---
Best regards
Daniel
-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] linux' IO performance sucks

2006-07-05 Thread Hemmann, Volker Armin
On Wednesday 05 July 2006 12:43, Daniel wrote:


 You could also disable all write caching by issuing the command:

 hdparm -W0 /dev/your-physical-disk-name


emm, no,

That only deactivates the on-disk cache and has nothing to do with the kernel 
cachesbuffers. In fact, it has nothing to do with the kernel at all.

Deactivating the cache might be a good thing in certain situations, but it 
usually just decreases performance. So it is usually a BAD THING(tm).
-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] linux' IO performance sucks

2006-07-05 Thread Daniel Iliev
Hemmann, Volker Armin wrote:
 On Wednesday 05 July 2006 12:43, Daniel wrote:
 
 You could also disable all write caching by issuing the command:

 hdparm -W0 /dev/your-physical-disk-name

 
 emm, no,
 
 That only deactivates the on-disk cache and has nothing to do with the kernel 
 cachesbuffers. In fact, it has nothing to do with the kernel at all.
 
 Deactivating the cache might be a good thing in certain situations, but it 
 usually just decreases performance. So it is usually a BAD THING(tm).

It's BAD THING(tm) theoretically. Actually I had to disable write cache
to protect file systems against corruption during unexpected restarts.
(For a week or so the eclectic power was very unstable during thunder
storms). I didn't notice any performance hits. The on-disk cache is
relatively veryo small (several MBs) that it wouldn't help at all in
writing big files. If it's used as read cache while accessing
directories with many files inside it has a great performance boost.
It's just my observation. Everyone has to play with these setting until
he/she gets the optimal results for the particular case.


-- 
Best regards,
Daniel

-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] linux' IO performance sucks

2006-07-05 Thread Daniel Iliev
This one is only to correct a BIG typo:

eclectic power should be electric power
(spelling checker + sleeping writer..)



Sorry about that.



Hemmann, Volker Armin wrote:
 On Wednesday 05 July 2006 12:43, Daniel wrote:
 
 You could also disable all write caching by issuing the command:

 hdparm -W0 /dev/your-physical-disk-name

 
 emm, no,
 
 That only deactivates the on-disk cache and has nothing to do with the kernel 
 cachesbuffers. In fact, it has nothing to do with the kernel at all.
 
 Deactivating the cache might be a good thing in certain situations, but it 
 usually just decreases performance. So it is usually a BAD THING(tm).






-- 
Best regards,
Daniel

-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] linux' IO performance sucks

2006-07-05 Thread Dale
Daniel Iliev wrote:
 This one is only to correct a BIG typo:

 eclectic power should be electric power
 (spelling checker + sleeping writer..)


 Sorry about that.
   

You got a better excuse than me.  My typing sucks.  O_O

Dale
:-)  :-)
-- 
gentoo-user@gentoo.org mailing list



[gentoo-user] linux' IO performance sucks

2006-07-04 Thread Sven Köhler
Hi,

sorry for the silly subject, but did you ever experience the following?:

i have a fileserver, i copy a file to it - let's say 600MB.

So about every 200MB (i guess the linux box writes the data into the
cache in the RAM first) linux writes the harddisk. But during that time
- during the time it writes that 200MB to disk, there is no chance for
any other IO. I'm playing an mp3 from the very same fileserver. It stops
playing, because the machine does answer the read-requests.

So what's going on here?

Why does Linux write so huge amounts of data to the disk? Why does Linux
not stop writing for a while to fullfil the read-requests? And so on ...

Any idea, on how to imrpove that?



signature.asc
Description: OpenPGP digital signature


Re: [gentoo-user] linux' IO performance sucks

2006-07-04 Thread Thomas Cort
On Wed, 05 Jul 2006 05:43:57 +0200
Sven Köhler [EMAIL PROTECTED] wrote:

 So what's going on here?

Please provide more details. What filesystem does the server use
(ext2/3, reiserfs, jfs, xfs, ...)? Are you using nfs, shfs, afs,
smbfs, ...? What are the hardware specs for the server? How much RAM?
How fast is it? What about the client specs? Is the client running
Linux too? Is the client that uploads the 600MB file the same one that
is attempting to play the music? What is the network like? 100Mbps
ethernet? Are the client and server on the same subnet? Same hub or
switch? How many other computers are using the network? What music
player are you using?

-tcort


pgpVoVsg6bGLC.pgp
Description: PGP signature


Re: [gentoo-user] linux' IO performance sucks

2006-07-04 Thread Richard Fish

On 7/4/06, Sven Köhler [EMAIL PROTECTED] wrote:

So about every 200MB (i guess the linux box writes the data into the
cache in the RAM first) linux writes the harddisk. But during that time
- during the time it writes that 200MB to disk, there is no chance for
any other IO. I'm playing an mp3 from the very same fileserver. It stops
playing, because the machine does answer the read-requests.


What filesystem are you using?  I've seen this kind of behavior with
XFS, and the anticipatory scheduler, and solved it with the following
in my /etc/conf.d/local.start:

test -f /sys/block/sda/queue/iosched/antic_expire  \
   echo 0 /sys/block/sda/queue/iosched/antic_expire
test -f /proc/sys/vm/laptop_mode  echo 0 /proc/sys/vm/laptop_mode
test -f /proc/sys/fs/xfs/xfssyncd_centisecs  \
   echo 500  /proc/sys/fs/xfs/xfssyncd_centisecs

You might also play with some of the other settings in
/proc/sys/fs/xfs and see what works for you.

Of course, if you are using a different filesystem or different
scheduler, it might help to know that.

-Richard

--
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] linux' IO performance sucks

2006-07-04 Thread Hemmann, Volker Armin
On Wednesday 05 July 2006 05:43, Sven Köhler wrote:
 Hi,

 sorry for the silly subject, but did you ever experience the following?:

 i have a fileserver, i copy a file to it - let's say 600MB.

 So about every 200MB (i guess the linux box writes the data into the
 cache in the RAM first) linux writes the harddisk. But during that time
 - during the time it writes that 200MB to disk, there is no chance for
 any other IO. I'm playing an mp3 from the very same fileserver. It stops
 playing, because the machine does answer the read-requests.

 So what's going on here?

 Why does Linux write so huge amounts of data to the disk? Why does Linux
 not stop writing for a while to fullfil the read-requests? And so on ...

 Any idea, on how to imrpove that?

using the cfq or deadline io-scheduler?

-- 
gentoo-user@gentoo.org mailing list