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