Yet more "preloading"
Lubos Lunak
l.lunak at suse.cz
Wed Mar 17 19:09:08 CET 2004
Hello,
while I was already at it ... see the attached patches. This gives me another
improvement 18,5s->15s (that's after the 22,5->18,5 improvement I just
mentioned in the ld.so madvise post, same machine, same plain KDE session).
Looks like I was pretty naive to think the system would be actually good at
quickly loading things from the HDD :(.
The xdm patch is for SUSE's /etc/init.d/xdm , the paths in it are hardcoded
for the moment ($KDEDIR is /opt/_k, $KDEHOME /home/kde2/.k, $QTDIR /opt/_q).
This should be better tested right after reboot, because it seems to be that
the OOM way of clearing the caches doesn't work that well for inodes.
The questions, of course, are now:
- can anybody confirm (and give numbers)?
- which directories should be prescanned. In my case the prescanning took
11,5s , which is noticeably more than the 3s gain. After being more picky
about $KDEDIR/share and scanning only some of its subdirectories, the time of
course went down, but so did the gain. I was thinking along the lines that
there could be a list of directories to scan, most important first, and the
scanning would go in background until the user actually starts startkde. See
the next point.
I actually also tried to do just 'scan /', and but it looks like there's not
much to gain by scanning more. The rest of the difference compared to the
completely (logout->login) cached case seem to be actual loading of files,
which is very likely to be too much to be able to do it.
- where to do this caching. KDM (hello Ossi) and init.d script seem the two
places where this could be done, it takes some time to log in using kdm, and
there are definitely placed during init.d startup when the HDD must be pretty
bored. Ossi, could you please provide some thoughts on this? I don't know how
that works, and there could be two places where to have this caching running,
while typing in kdm, and also while initializing X (at least it seem to be
that while initializing the graphics mode or whatever it's just waiting for
about two seconds and nothing is really happening).
--
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/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xdm.patch
Type: text/x-diff
Size: 452 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kde-optimize/attachments/20040317/2e9f2875/xdm.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: scan.cpp
Type: text/x-c++src
Size: 1611 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kde-optimize/attachments/20040317/2e9f2875/scan.bin
More information about the Kde-optimize
mailing list