Gentoo Archives: gentoo-user

From: Daniel <danny@××××××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] linux' IO performance sucks
Date: Wed, 05 Jul 2006 10:59:37
Message-Id: 44AB97C6.4040801@ilievnet.com
In Reply to: [gentoo-user] linux' IO performance sucks by "Sven Köhler"
1 Sven Köhler wrote:
2 > Hi,
3 >
4 > sorry for the silly subject, but did you ever experience the following?:
5 >
6 > i have a fileserver, i copy a file to it - let's say 600MB.
7 >
8 > So about every 200MB (i guess the linux box writes the data into the
9 > cache in the RAM first) linux writes the harddisk. But during that time
10 > - during the time it writes that 200MB to disk, there is no chance for
11 > any other IO. I'm playing an mp3 from the very same fileserver. It stops
12 > playing, because the machine does answer the read-requests.
13 >
14 > So what's going on here?
15 >
16 > Why does Linux write so huge amounts of data to the disk? Why does Linux
17 > not stop writing for a while to fullfil the read-requests? And so on ...
18 >
19 > Any idea, on how to imrpove that?
20 >
21
22 Perhaps a more often flush of buffers may help you in this situation.
23
24 There are several parameters you can tweak to control your kernel
25 behavior regarding this.
26
27 You can put the following lines in your /etc/sysctl.conf file, replacing
28 "i","j","k" and "l" with proper numbers.
29 vm.dirty_expire_centisecs = i
30 vm.dirty_writeback_centisecs = j
31 vm.dirty_ratio = k
32 vm.dirty_background_ratio = l
33
34 The meaning of these parameters is descibed in the kernel documentation:
35 /usr/src/linux/Documentation/filesystems/proc.txt
36 /usr/src/linux/Documentation/sysctl/vm.txt
37
38 You could also disable all write caching by issuing the command:
39
40 hdparm -W0 /dev/<your-physical-disk-name>
41
42
43 Hope This Helps
44
45 ---
46 Best regards
47 Daniel
48 --
49 gentoo-user@g.o mailing list

Replies