Using madvise for ld.so

Lubos Lunak l.lunak at suse.cz
Wed Mar 17 18:00:51 CET 2004


On Tuesday 16 of March 2004 15:22, Michael Matz wrote:
> Hi,
>
> On Tue, 16 Mar 2004, Luciano Montanaro wrote:
> > Maybe I had been a little impatient to post my results. I probably saw
> > caching effects... Trying the patched and unpatched libraries, just
> > after reboot, i obtain a startup time of ~18s. Does it need linux 2.6?
>
> No.  At least the SuSE 2.4 kernel (don't know about official 2.4 kernels)
> does implement madvise().
>
> FWIW I also didn't see any real speedup.  time for startkde (control-C'ed
> after the splash goes away) is from 22.2-23.2 down to about 21.8 seconds.
> Time for a 'konsole -e true' (without _anything_ KDE loaded) from 7.1-8.3
> down to 6.5-7.2.  Every time with cache cleared, and on a kernel 2.6

 That's almost 14% saved in the best case, and still 2% in the worst one. Try 
to make a better improvement if you don't like this one ;). And in fact, I 
probably have another one, see another post.

> machine.
>
> So, it's a bit, but not that much.  Hmm.  I hoped for something more ;)

 I tried it at again (always with a reboot first), and I can also confirm a 
speedup on another machine (they have almost the same configuration though). 
But it's quite possible that you won't have as good improvements as I did - 
the HDD is bought few months back, while the rest of the machine is 2,5 years 
old, so the HDD should be relatively fast. It has also still a lot of free 
space, so there should be low fragmentation. I also tested with only plain 
KDE session (only kdelibs+kdebase, in fact), no apps session restored, no 
things like kxkb started. It's also my test build, so it avoids touching 
SUSE's /etc/opt/kde3.

 The improvement with the ld.so is 22,5 (10) -> 18,5 (7) -> 9,5 (2) . That's 
without the patch, with it, and when cached, the number in () is time until 
ksplash shows up. Clearly if you start more things the improvement will be 
relatively smaller, so I tried also with 6x konsole, 1x konqy showing 
qt:index and 1 konqy showing /tmp, with 35,5 -> 30 -> 19,5 . That's still 
good, and also the absolute difference has increased a bit, so that hints 
that this makes a small difference even when starting single apps. Indeed, if 
you run during KDE startup every KNonsense available, this speedup will look 
very small.

 All the times are measured just using stopwatch, so they're not that precise. 
I simply measured time between hitting Enter in XDM and time when the 
ktimemon applet had no longer red in the CPU row (or whatever the weird 
default setup is).

-- 
Lubos Lunak
KDE developer
---------------------------------------------------------------------
SuSE CR, s.r.o.  e-mail: l.lunak at suse.cz , l.lunak at kde.org
Drahobejlova 27  tel: +420 2 9654 2373
190 00 Praha 9   fax: +420 2 9654 2374
Czech Republic   http://www.suse.cz/


More information about the Kde-optimize mailing list