comments on KDE performance tips
Waldo Bastian
kde-optimize@mail.kde.org
Thu, 16 Jan 2003 16:07:57 +0100
On Thursday 16 January 2003 14:29, Lubos Lunak wrote:
> > So there's almost twenty seconds worth of startup time here which could
> > be shaved off by improving the IO access patterns. This would require
> > runtime analysis of the pagefault pattern, and re-layout of elf files
> > based on that analysis. Basically we want to pull each executable and
> > shared library into pagecache in one great big slurp.
>
> Could the kernel (optionally) try to do something like this even without
> the analysis? Given that things in binaries are ordered rather chaotically
> from the usage order point of view, I think it could do much larger reads
> than it does now (now it just pages in single pages when needed, doesn't
> it). Reading whole libqt in one row probably could help in almost all
> cases. Or am I talking nonsense here?
I once discussed this with a kernel hacker and I believe reads are done in
blocks of 64Kb, so that would be 16 pages in a row.
I think it is possible to let the linker tell the kernel that the whole thing
should be read, but that's a suboptimal solution in that you read a lot of
stuff you rather not read. The best solution is to read what you need in one
go, and nothing of the stuff that you don't need. Such solution would mean
that you put all the stuff that you need (at startup) in one continguous part
of your lib and then the (runtime) linker should tell the kernel that it must
read all that in.
Cheers,
Waldo
--
bastian@kde.org -=|[ SuSE, The Linux Desktop Experts ]|=- bastian@suse.com