public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: Linux 2.4.2 fails to merge mmap areas, 700% slowdown.
@ 2001-03-21  2:02 Dieter Nützel
  0 siblings, 0 replies; 32+ messages in thread
From: Dieter Nützel @ 2001-03-21  2:02 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Linux Kernel List

Linus Torvalds <torvalds@transmeta.com> writes:
> 
> Cool. Somebody actually found a real case.
> 
> I'll fix the mmap case asap. Its' not hard, I just waited to see if it
> ever actually triggers. Something like g++ certainly counts as major.

I do daily builds of the VTK CVS tree (The Visualization Toolkit, 
www.kitware.com/vtk.html, a huge 3D app).

~33 MB C++ source

It took ~1 hour on my K7 550, 256 MB, IBM DTL-307030, glibc-2.2 and 
gcc-2.95.2 ( 19991024 (release)) under most of the 2.4-test kernels (all with 
ReiserFS) for a whole rebuild.
Now it take nearly 1 and a half hour with 2.4.2-ac20.
BTW My mouse (PS2) is very sluggished during C++ compilations, now.

I am open for all of your patches. Or should I better say most :-)))

Cheers,
	Dieter
-- 
Dieter Nützel
Graduate Student, Computer Science

University of Hamburg
Department of Computer Science
Cognitive Systems Group
Vogt-Kölln-Straße 30
D-22527 Hamburg, Germany

email: nuetzel@kogs.informatik.uni-hamburg.de
@home: Dieter.Nuetzel@hamburg.de

^ permalink raw reply	[flat|nested] 32+ messages in thread
* Linux 2.4.2 fails to merge mmap areas, 700% slowdown.
@ 2001-03-20 18:28 Serge Orlov
  2001-03-20 18:43 ` Linus Torvalds
  2001-03-20 18:43 ` Jakob Østergaard
  0 siblings, 2 replies; 32+ messages in thread
From: Serge Orlov @ 2001-03-20 18:28 UTC (permalink / raw)
  To: linux-kernel; +Cc: Linus Torvalds, sorlov

 Hi,
I upgraded one of our computer happily running 2.2.13 kernel
to 2.4.2. Everything was OK, but compilation time of our C++
project greatly increased (1.4 times slower). I investigated the
issue and found that g++ spends 7 times more time in kernel.
The reason for this is big vm map:

cat /proc/15677/maps |wc -l
   2238

15677 -- is cc1plus process, the map looks like this:
.....
4014a000-4014b000 rw-p 00000000 00:00 0
4014b000-4014c000 rw-p 00000000 00:00 0
4014c000-4014d000 rw-p 00000000 00:00 0
4014d000-4014e000 rw-p 00000000 00:00 0
4014e000-4014f000 rw-p 00000000 00:00 0
4014f000-40150000 rw-p 00000000 00:00 0
40150000-40151000 rw-p 00000000 00:00 0
40151000-40152000 rw-p 00000000 00:00 0
......
strace:
.....
15677 old_mmap(NULL, 4096, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40019000
15677 old_mmap(NULL, 4096, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40019000
15677 old_mmap(NULL, 4096, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x4001a000
15677 old_mmap(NULL, 4096, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x4001b000
15677 old_mmap(NULL, 4096, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x4001c000
15677 old_mmap(NULL, 4096, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x4001d000
.......

2.4.2:
time g++ -g -Wall -I. -c t_instr.cpp -o t_instr.o

real    0m3.434s
user    0m2.790s
sys     0m0.530s

2.2.13:
time g++ -g -Wall -I.  -c t_instr.cpp -o t_instr.o

real    0m3.167s
user    0m2.950s
sys     0m0.070s

I noticed a recent thread (Re: Kernel is unstable) in archives that
ended by Linus:
--- quote ---
Ehh.. If the merging doesn't actually happen, it's always a loss. We've
just spent CPU cycles on doing something useless. And in my tests, that
was the case a lot more than not.

Also, in the expense of taking a page fault, looking one or two levels
deeper in the AVL tree is pretty much not noticeable.

Show me numbers for real applications, and I might care. I saw barely
measurable speedups (and more importantly to me - real simplification)
by
removing it.

Don't bother arguing with "it might.."

                Linus
--- end of quote ----

OK, the numbers are here. g++ is 2.96 from RedHat 7.0.
Please, CC me, as I'm not on the list.

   Serge.



^ permalink raw reply	[flat|nested] 32+ messages in thread

end of thread, other threads:[~2001-03-26  4:23 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-03-21  2:02 Linux 2.4.2 fails to merge mmap areas, 700% slowdown Dieter Nützel
  -- strict thread matches above, loose matches on Subject: below --
2001-03-20 18:28 Serge Orlov
2001-03-20 18:43 ` Linus Torvalds
2001-03-20 18:59   ` Jakob Østergaard
2001-03-21  1:20   ` Kevin Buhr
2001-03-21  1:38     ` David S. Miller
2001-03-21 20:19       ` Kevin Buhr
2001-03-22 18:23         ` Kevin Buhr
2001-03-22 18:35           ` Jakob Østergaard
2001-03-23  4:32             ` Kevin Buhr
2001-03-24  4:11               ` Zack Weinberg
2001-03-24 21:46                 ` Kevin Buhr
2001-03-24  5:02               ` Linus Torvalds
2001-03-24  9:31                 ` Jakob Østergaard
2001-03-24  9:48               ` Jakob Østergaard
2001-03-24 19:54                 ` Kevin Buhr
2001-03-25  3:17                   ` Jakob Østergaard
2001-03-25 16:47                     ` Jamie Lokier
     [not found]               ` <200103240502.VAA02673@penguin.transmeta.com>
2001-03-24 21:22                 ` Kevin Buhr
2001-03-25  3:37                   ` Linus Torvalds
2001-03-26  4:22                     ` Kevin Buhr
2001-03-23 20:43             ` James Lewis Nance
2001-03-21  6:41     ` Mike Galbraith
2001-03-21 14:56       ` Matthias Urlichs
2001-03-21 15:05         ` Mike Galbraith
2001-03-21 15:59       ` Kurt Garloff
2001-03-21 16:45         ` Mike Galbraith
2001-03-21 20:16           ` Kevin Buhr
2001-03-22  9:04             ` Mike Galbraith
2001-03-22 22:19               ` Kevin Buhr
2001-03-23  7:44                 ` Mike Galbraith
2001-03-20 18:43 ` Jakob Østergaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox