2004-06-09 03:35:25

by Phy Prabab

[permalink] [raw]
Subject: slow down in 2.6 vs 2.4

Hello!

Over the last two days I have been struggling with
understanding why 2.6.x kernel is slower than
2.4.21/23 kernels. I think I have a test case which
demostrates this issue.

I have downloaded gcc-3.4.0 and run with this config:
--enable-languages=c,c++ --prefix=/usr/tmp/foo

using gcc-3.2.3 and binutils-2.13.2.1, on IBM x335
w/2x 2.8G Xeon w/8G RAM, no ht[bios killed], using
local file system (XFS):

make times:

2.4.21:
323.68user 56.07system 6:35.77elapsed 95%CPU
(0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (3138783major+3818347minor)pagefaults
0swaps

2.6.7-rc3-s63 (SPA scheduler):
334.01user 69.86system 7:01.47elapsed 95%CPU
(0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (13301major+6931745minor)pagefaults
0swaps

2.6.7-rc3:
336.17user 68.41system 7:02.47elapsed 95%CPU
(0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (13301major+6931745minor)pagefaults
0swaps

Machine:
00:00.0 Host bridge: ServerWorks: Unknown device 0012
(rev 13)
00:00.1 Host bridge: ServerWorks: Unknown device 0012
00:00.2 Host bridge: ServerWorks: Unknown device 0000
00:01.0 VGA compatible controller: ATI Technologies
Inc Rage XL (rev 27)
00:0f.0 Host bridge: ServerWorks CSB5 South Bridge
(rev 93)
00:0f.1 IDE interface: ServerWorks CSB5 IDE Controller
(rev 93)
00:0f.2 USB Controller: ServerWorks OSB4/CSB5 OHCI USB
Controller (rev 05)
00:0f.3 ISA bridge: ServerWorks: Unknown device 0225
00:11.0 Host bridge: ServerWorks: Unknown device 0101
(rev 03)
00:11.2 Host bridge: ServerWorks: Unknown device 0101
(rev 03)
01:01.0 SCSI storage controller: Symbios Logic Inc.
(formerly NCR): Unknown device 0030 (rev 07)
01:02.0 Ethernet controller: Intel Corporation:
Unknown device 100e (rev 02)
02:01.0 Ethernet controller: BROADCOM Corporation:
Unknown device 16a7 (rev 02)
02:02.0 Ethernet controller: BROADCOM Corporation:
Unknown device 16a7 (rev 02)


Anything else needed? Is there something I can do to
try and understand this issue?

Thank you for your time.
Phy




__________________________________
Do you Yahoo!?
Friends. Fun. Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/


2004-06-09 03:58:42

by Con Kolivas

[permalink] [raw]
Subject: Re: slow down in 2.6 vs 2.4


Hi Phy

You said:
Over the last two days I have been struggling with
understanding why 2.6.x kernel is slower than
2.4.21/23 kernels. I think I have a test case which
demostrates this issue.
make times:

2.4.21:
323.68user 56.07system 6:35.77elapsed 95%CPU
(0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (3138783major+3818347minor)pagefaults
0swaps

2.6.7-rc3-s63 (SPA scheduler):
334.01user 69.86system 7:01.47elapsed 95%CPU
(0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (13301major+6931745minor)pagefaults
0swaps

2.6.7-rc3:
336.17user 68.41system 7:02.47elapsed 95%CPU
(0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (13301major+6931745minor)pagefaults
0swaps


----
Your 2.4 compile is showing a massive number of major page faults. Just how big
is this compile you do? Can you try running the 2.6 compile with

echo 100 > /proc/sys/vm/swappiness

Con

2004-06-09 04:10:39

by Phy Prabab

[permalink] [raw]
Subject: Re: slow down in 2.6 vs 2.4

Oh, there is an important bit of information missing,
the test is compiling gcc-3.4.0 using gcc-3.2.3 with
binutils-2.13.2.1. The machine used is a dual 2.8GHz
Xeon w/8G RAM (no ht).

config line is --enable-languages=c,c++
--prefix=/usr/tmp/foo

BTW, the unit never swaps when building.

Thanks!
Phy

--- Con Kolivas <[email protected]> wrote:
>
> Hi Phy
>
> You said:
> Over the last two days I have been struggling with
> understanding why 2.6.x kernel is slower than
> 2.4.21/23 kernels. I think I have a test case which
> demostrates this issue.
> make times:
>
> 2.4.21:
> 323.68user 56.07system 6:35.77elapsed 95%CPU
> (0avgtext+0avgdata 0maxresident)k
> 0inputs+0outputs
> (3138783major+3818347minor)pagefaults
> 0swaps
>
> 2.6.7-rc3-s63 (SPA scheduler):
> 334.01user 69.86system 7:01.47elapsed 95%CPU
> (0avgtext+0avgdata 0maxresident)k
> 0inputs+0outputs (13301major+6931745minor)pagefaults
> 0swaps
>
> 2.6.7-rc3:
> 336.17user 68.41system 7:02.47elapsed 95%CPU
> (0avgtext+0avgdata 0maxresident)k
> 0inputs+0outputs (13301major+6931745minor)pagefaults
> 0swaps
>
>
> ----
> Your 2.4 compile is showing a massive number of
> major page faults. Just how big
> is this compile you do? Can you try running the 2.6
> compile with
>
> echo 100 > /proc/sys/vm/swappiness
>
> Con
>




__________________________________
Do you Yahoo!?
Friends. Fun. Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/

2004-06-09 04:41:19

by Peter Williams

[permalink] [raw]
Subject: Re: slow down in 2.6 vs 2.4

Con Kolivas wrote:
> Hi Phy
>
> You said:
> Over the last two days I have been struggling with
> understanding why 2.6.x kernel is slower than
> 2.4.21/23 kernels. I think I have a test case which
> demostrates this issue.
> make times:
>
> 2.4.21:
> 323.68user 56.07system 6:35.77elapsed 95%CPU
> (0avgtext+0avgdata 0maxresident)k
> 0inputs+0outputs (3138783major+3818347minor)pagefaults
> 0swaps
>
> 2.6.7-rc3-s63 (SPA scheduler):
> 334.01user 69.86system 7:01.47elapsed 95%CPU
> (0avgtext+0avgdata 0maxresident)k
> 0inputs+0outputs (13301major+6931745minor)pagefaults
> 0swaps
>
> 2.6.7-rc3:
> 336.17user 68.41system 7:02.47elapsed 95%CPU
> (0avgtext+0avgdata 0maxresident)k
> 0inputs+0outputs (13301major+6931745minor)pagefaults
> 0swaps
>
>
> ----
> Your 2.4 compile is showing a massive number of major page faults.

Seems to be roughly the same total number of page faults in all three
cases but there's been a big shift from majors to minors for the 2.6
kernels which I would have thought would improve performance?

Peter
--
Dr Peter Williams [email protected]

"Learning, n. The kind of ignorance distinguishing the studious."
-- Ambrose Bierce

2004-06-09 19:17:00

by Clint Byrum

[permalink] [raw]
Subject: Re: slow down in 2.6 vs 2.4


On Tuesday, June 8, 2004, at 08:35 PM, Phy Prabab wrote:

> Hello!
>
> Over the last two days I have been struggling with
> understanding why 2.6.x kernel is slower than
> 2.4.21/23 kernels. I think I have a test case which
> demostrates this issue.
>

Phy, you and I have corresponded off list. I think we are experiencing
the same thing...

>
> 2.4.21:
> 323.68user 56.07system 6:35.77elapsed 95%CPU
> (0avgtext+0avgdata 0maxresident)k
> 0inputs+0outputs (3138783major+3818347minor)pagefaults
> 0swaps

Is there any way to get similar numbers system wide on 2.4? This exists
for 2.6.x, and the latest sysstat shows it with sar -B, but as the sar
manpage states, the fault/s numbers are not available on 2.4. :(

Stats for a recent period:

Linux 2.4.23 (xxx) 06/09/2004

11:40:00 AM pgpgin/s pgpgout/s fault/s majflt/s
11:50:00 AM 17.52 72.34 0.00 0.00
12:00:00 PM 20.93 65.06 0.00 0.00
Average: 19.22 68.70 0.00 0.00

Linux 2.6.6 (yyy) 06/09/04

11:40:00 pgpgin/s pgpgout/s fault/s majflt/s
11:50:00 70.68 81.13 13756.37 0.02
12:00:00 89.22 81.82 11598.21 0.03
Average: 79.95 81.48 12676.43 0.03


Thats from two different boxes.. see my earlier message this week for
an explanation of the setup.

2004-06-09 19:37:31

by Paul Dickson

[permalink] [raw]
Subject: Re: slow down in 2.6 vs 2.4

You might check out this URL:

http://www.usenix.org/publications/library/proceedings/als01/full_papers/ezolt/ezolt_html/

It may not be directly relevent even though the discussed problem is
similar, but the tips on how to break down the problem more than likely
are.

-Paul

2004-06-09 20:14:28

by Bill Davidsen

[permalink] [raw]
Subject: Re: slow down in 2.6 vs 2.4

Phy Prabab wrote:
> Hello!
>
> Over the last two days I have been struggling with
> understanding why 2.6.x kernel is slower than
> 2.4.21/23 kernels. I think I have a test case which
> demostrates this issue.

Unfortunately this is common. There are a bunch or tunables like
swappiness and readahead you can adjust, but if anyone has a handle on
why it's really so slow they don't seem to have gotten a patch out.

On features 2.6 wins, on performance 2.4 seems faster in many cases.

--
-bill davidsen ([email protected])
"The secret to procrastination is to put things off until the
last possible moment - but no longer" -me