2.6.1 slower than 2.4, smp/scsi/sw-raid/reiserfs

From: Philip Martin
Date: Sun Feb 01 2004 - 17:02:34 EST


The machine is a dual P3 450MHz, 512MB, aic7xxx, 2 disk RAID-0 and
ReiserFS. It's a few years old and has always run Linux, most
recently 2.4.24. I decided to try 2.6.1 and the performance is
disappointing.

My test is a software build of about 200 source files (written in C)
that I usually build using "nice make -j4". Timing the build on
2.4.24 I typically get something like

242.27user 81.06system 2:44.18elapsed 196%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (1742270major+1942279minor)pagefaults 0swaps

and on 2.6.1 I get

244.08user 116.33system 3:27.40elapsed 173%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (0major+3763670minor)pagefaults 0swaps

The results are repeatable. The user CPU is about the same for the
two kernels, but on 2.6.1 the elapsed time is much greater, as is the
system CPU. I note a big difference in the pagefaults between 2.4 and
2.6 but I don't know what to make of it.

Comparing /proc/scsi/aic7xxx/0 before and after the build I see
another difference, the "Commands Queued" to the RAID disks are much
greater for 2.6 than 2.4

disk0 disk2
2.4
before: 8459 4766
after: 13798 7351

2.6
before: 21287 8555
after: 40491 15995

(The root partition is also on disk0 and that's not part of the RAID
array; I guess that's why disk0 has higher numbers than disk2.)

The machine has another disk that is not part of the RAID array, it's
a slower disk but I think the build is CPU bound anyway. I put an
ext2 filesystem on this extra disk, and then used that for my trial
build with the rest of the system, gcc, as, ld, etc. still coming from
RAID array. On 2.4 the time for the ext2 build is essentially the
same as for the RAID build, the difference is within the normal
variation between builds. On 2.6 the ext2 build takes

244.43user 111.75system 3:16.42elapsed 181%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (0major+3757151minor)pagefaults 0swaps

Although the CPU used is about the same as the RAID build the elapsed
time is less, so there is some improvement but it is still worse than
2.4.24.

--
Philip Martin
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/