1 |
On Mon, Dec 1, 2008 at 3:11 PM, Daniel Iliev <daniel.iliev@×××××.com> wrote: |
2 |
> On Sun, 30 Nov 2008 14:27:22 +0200 |
3 |
> Alan McKinnon <alan.mckinnon@×××××.com> wrote: |
4 |
> |
5 |
> [-snip-] |
6 |
> |
7 |
>> |
8 |
>> You are the one making them claims! You do the test! |
9 |
> |
10 |
> |
11 |
> Me? No, my dear. It is you who claims that fragmentation only matters |
12 |
> on MS file systems while Linux FS remain unaffected w/o providing |
13 |
> any proof. The common sense says otherwise: fragmentation leads to |
14 |
> seeks, seeks hurt performance. |
15 |
> |
16 |
> Anyways, I'm going to do the tests because I want to see the numbers. |
17 |
> Should the outcome prove you were right I'd be the first to |
18 |
> congratulate and thank you for opening my eyes. |
19 |
> |
20 |
> Since I'm going to use my workstation at work to do the job at night |
21 |
> I'll limit the repetitions to 400 which would take about 13 hours with |
22 |
> two files, 2GB each. The machine has 1GB RAM installed and I'll run the |
23 |
> test in Gentoo's "boot" rc level. I've closed everything except sshd |
24 |
> and screen (see "ps" outpput below) and have taken care of the cache |
25 |
> by clearing it before each run via /proc (see the script). The file |
26 |
> system is ext3 and during the test it will be used in about 30% of its |
27 |
> capacity: |
28 |
> |
29 |
> localhost test # df -h | grep home |
30 |
> /dev/sdc1 15G 718M 14G 5% /home |
31 |
> |
32 |
> localhost test # mount -v | grep home |
33 |
> /dev/sdc1 on /home/ type ext3 |
34 |
> (rw,noatime,nodiratime,data=journal,commit=1) |
35 |
> |
36 |
> |
37 |
> localhost test # rc-status |
38 |
> Runlevel: boot |
39 |
> bootmisc [ started ] |
40 |
> checkfs [ started ] |
41 |
> checkroot [ started ] |
42 |
> clock [ started ] |
43 |
> hostname [ started ] |
44 |
> iptables [ started ] |
45 |
> localmount [ started ] |
46 |
> modules [ started ] |
47 |
> net.eth0 [ started ] |
48 |
> net.lo [ started ] |
49 |
> sshd [ started ] |
50 |
> udev-postmount [ started ] |
51 |
> |
52 |
> |
53 |
> localhost test # ps af |
54 |
> PID TTY STAT TIME COMMAND |
55 |
> 12191 pts/0 Ss 0:00 -bash |
56 |
> 12227 pts/0 S 0:00 \_ su - |
57 |
> 12231 pts/0 S 0:00 \_ -su |
58 |
> 12266 pts/0 S+ 0:00 \_ screen -x |
59 |
> 8575 pts/3 Ss+ 0:00 -/bin/bash |
60 |
> 4967 pts/2 Ss 0:00 -/bin/bash |
61 |
> 12830 pts/2 R+ 0:00 \_ ps af |
62 |
> 4895 pts/1 Ss+ 0:03 -/bin/bash |
63 |
> 4755 tty6 Ss+ 0:00 /sbin/agetty 38400 tty6 linux |
64 |
> 4754 tty5 Ss+ 0:00 /sbin/agetty 38400 tty5 linux |
65 |
> 4753 tty4 Ss+ 0:00 /sbin/agetty 38400 tty4 linux |
66 |
> 4752 tty3 Ss+ 0:00 /sbin/agetty 38400 tty3 linux |
67 |
> 4751 tty2 Ss+ 0:00 /sbin/agetty 38400 tty2 linux |
68 |
> 4750 tty1 Ss+ 0:00 /sbin/agetty 38400 tty1 linux |
69 |
> |
70 |
> |
71 |
> The script: |
72 |
> |
73 |
> #!/bin/bash |
74 |
> |
75 |
> cat /usr/portage/distfiles/* > test1 |
76 |
> cp test1 test2 |
77 |
> |
78 |
> filefrag test* |
79 |
> |
80 |
> sync |
81 |
> |
82 |
> for (( i=0 ; i<=400 ; i++ )) |
83 |
> do |
84 |
> |
85 |
> sync |
86 |
> echo 3 > /proc/sys/vm/drop_caches |
87 |
> |
88 |
> echo -n "try_no=$i " |
89 |
> |
90 |
> /usr/bin/time -f "\ |
91 |
> command=%C|\ |
92 |
> real_t=%e|\ |
93 |
> kernel_t=%S|\ |
94 |
> user_t=%U|\ |
95 |
> major_faults=%F|\ |
96 |
> minor_faults=%R|\ |
97 |
> context_sw=%c|\ |
98 |
> io_waits=%w|\ |
99 |
> fs_reads=%I|\ |
100 |
> fs_writes=%O" cp test1 /dev/null |
101 |
> |
102 |
> sync |
103 |
> echo 3 > /proc/sys/vm/drop_caches |
104 |
> |
105 |
> echo -n "try_no=$i " |
106 |
> |
107 |
> /usr/bin/time -f "\ |
108 |
> command=%C|\ |
109 |
> real_t=%e|\ |
110 |
> kernel_t=%S|\ |
111 |
> user_t=%U|\ |
112 |
> major_faults=%F|\ |
113 |
> minor_faults=%R|\ |
114 |
> context_sw=%c|\ |
115 |
> io_waits=%w|\ |
116 |
> fs_reads=%I|\ |
117 |
> fs_writes=%O" cp test2 /dev/null |
118 |
> |
119 |
> |
120 |
> done |
121 |
> |
122 |
> ###########EOF |
123 |
> |
124 |
> |
125 |
> |
126 |
> I hope all this will be enough for you to accept the results. |
127 |
> |
128 |
> |
129 |
> |
130 |
> -- |
131 |
> Best regards, |
132 |
> Daniel |
133 |
> |
134 |
> |
135 |
|
136 |
One thing that comes to mind... if one of those files is primarily |
137 |
closer to the start of the disk than the other, and the drive tapers |
138 |
down on speed as bad as some... well, that's one variable you can't |
139 |
easily resolve. Whether that would influence enough to matter, |
140 |
compared to seeks, is questionable though. |
141 |
|
142 |
-- |
143 |
Poison [BLX] |
144 |
Joshua M. Murphy |