Dynamic symbol table
Karl Vogel
karl.vogel at seagha.com
Tue Jul 20 18:37:41 CEST 2004
Lubos Lunak wrote:
> On Friday 16 of July 2004 16:56, Karl Vogel wrote:
>> Lubos Lunak <l.lunak at suse.cz> wrote in
>>
>> news:200407161545.31019.l.lunak at suse.cz:
>> > On Friday 16 of July 2004 14:00, Karl Vogel wrote:
>> >> Really?! This seems like a bad idea to me! I did a preload test with
>> >> madvise() on all linked libs and well it took a lot longer than
>> >> demand paging the libs..
>> >
>> > And I did a test as well and it took somewhat shorter than demand
>> > paging the
>> > libs. Makes sense given that seeking is much slower than the actual
>> > reading. You can search this list archives for madvise for details.
>>
>> I've read your messages on the subject. But maybe you were using a
>> desktop system with a fast 7200RPM disk?.. while my laptop has a slow
>> 4500RPM disk.
>>
>> Or.. maybe I did something wrong :)
>
> I measured like this:
> - reboot
> - start in runlevel 3
> - (X vt10 :1 -terminate &);sleep 5; DISPLAY=:1 xterm
> - measure initial memory usage or whatever
> - startkde
>
>
> But yes, perhaps the some init script should guess and set LD_NOMADVISE
> if it
> thinks madvise() would do more harm than good on the specific machine.
Well I had a look at some load patters... ie starting kedit and directly
stopping it gives pattern as shown below:
X 08048520 0 X 008 paddr 08048000 acc 08048520 pgoff 00000000 foff 00000000 fnam=/usr/bin/kedit
A 002498a3 0 X 002 paddr 00432000 acc 004323f4 pgoff 00000000 foff 00000000 fnam=/usr/lib/libkdeinit_kedit.so
A 002498ba 8192 X 002 paddr 00434000 acc 004342ec pgoff 00000000 foff 00002000 fnam=/usr/lib/libkdeinit_kedit.so
A 002498ba 4096 X 002 paddr 00433000 acc 00433a5c pgoff 00000000 foff 00001000 fnam=/usr/lib/libkdeinit_kedit.so
A 002498ba 16384 X 002 paddr 00436000 acc 004366ec pgoff 00000000 foff 00004000 fnam=/usr/lib/libkdeinit_kedit.so
A 00252578 28672 X 002 paddr 00439000 acc 00439186 pgoff 00000000 foff 00007000 fnam=/usr/lib/libkdeinit_kedit.so
A 00249aa6 45056 X 002 paddr 0043d000 acc 0043dee0 pgoff 00000000 foff 0000b000 fnam=/usr/lib/libkdeinit_kedit.so
X 0044b500 102400 X 002 paddr 0044b000 acc 0044b500 pgoff 00000000 foff 00019000 fnam=/usr/lib/libkdeinit_kedit.so
X 0044d666 110592 X 002 paddr 0044d000 acc 0044d666 pgoff 00000000 foff 0001b000 fnam=/usr/lib/libkdeinit_kedit.so
X 00443438 69632 X 002 paddr 00443000 acc 00443438 pgoff 00000000 foff 00011000 fnam=/usr/lib/libkdeinit_kedit.so
A 0024c61a 61440 X 002 paddr 00441000 acc 004418ec pgoff 00000000 foff 0000f000 fnam=/usr/lib/libkdeinit_kedit.so
A 002c0b02 135168 X 002 paddr 00453000 acc 004530ed pgoff 00000000 foff 00021000 fnam=/usr/lib/libkdeinit_kedit.so
X 004445f8 73728 X 002 paddr 00444000 acc 004445f8 pgoff 00000000 foff 00012000 fnam=/usr/lib/libkdeinit_kedit.so
A 0024c61a 65536 X 002 paddr 00442000 acc 004421cc pgoff 00000000 foff 00010000 fnam=/usr/lib/libkdeinit_kedit.so
A 0024c63c 12288 X 002 paddr 00435000 acc 00435f05 pgoff 00000000 foff 00003000 fnam=/usr/lib/libkdeinit_kedit.so
A 00252578 40960 X 002 paddr 0043c000 acc 0043cd40 pgoff 00000000 foff 0000a000 fnam=/usr/lib/libkdeinit_kedit.so
A 00252578 36864 X 002 paddr 0043b000 acc 0043beaf pgoff 00000000 foff 00009000 fnam=/usr/lib/libkdeinit_kedit.so
A 00252578 24576 X 002 paddr 00438000 acc 00438f02 pgoff 00000000 foff 00006000 fnam=/usr/lib/libkdeinit_kedit.so
A 00252578 20480 X 002 paddr 00437000 acc 00437ba7 pgoff 00000000 foff 00005000 fnam=/usr/lib/libkdeinit_kedit.so
A 00252578 32768 X 002 paddr 0043a000 acc 0043a9cc pgoff 00000000 foff 00008000 fnam=/usr/lib/libkdeinit_kedit.so
X 0044cde0 106496 X 002 paddr 0044c000 acc 0044cde0 pgoff 00000000 foff 0001a000 fnam=/usr/lib/libkdeinit_kedit.so
X 0044e910 114688 X 002 paddr 0044e000 acc 0044e910 pgoff 00000000 foff 0001c000 fnam=/usr/lib/libkdeinit_kedit.so
X 00445000 77824 X 002 paddr 00445000 acc 00445000 pgoff 00000000 foff 00013000 fnam=/usr/lib/libkdeinit_kedit.so
A 002c07a3 131072 X 002 paddr 00452000 acc 00452a24 pgoff 00000000 foff 00020000 fnam=/usr/lib/libkdeinit_kedit.so
X 00446360 81920 X 002 paddr 00446000 acc 00446360 pgoff 00000000 foff 00014000 fnam=/usr/lib/libkdeinit_kedit.so
X 00450800 122880 X 002 paddr 00450000 acc 00450800 pgoff 00000000 foff 0001e000 fnam=/usr/lib/libkdeinit_kedit.so
X 00451520 126976 X 002 paddr 00451000 acc 00451520 pgoff 00000000 foff 0001f000 fnam=/usr/lib/libkdeinit_kedit.so
X 0044a160 98304 X 002 paddr 0044a000 acc 0044a160 pgoff 00000000 foff 00018000 fnam=/usr/lib/libkdeinit_kedit.so
X 00449000 94208 X 002 paddr 00449000 acc 00449000 pgoff 00000000 foff 00017000 fnam=/usr/lib/libkdeinit_kedit.so
$ ls -l /usr/bin/kedit
-rwxr-xr-x 1 root root 32620 May 6 19:03 /usr/bin/kedit
[kvo at localhost kvo]$ ls -l /usr/lib/libkdeinit_kedit.so
-rwxr-xr-x 1 root root 151040 May 6 19:03 /usr/lib/libkdeinit_kedit.so
>From /usr/bin/kedit only 1 page is executed/accessed (x86 pagesize = 4Kb)
and from the libkdeinit_kedit.so 28 pages are executed/accessed (=112Kb)
I'm not sure if loading 151040 bytes instead of 114688 bytes is really
hurting. Something I'm planning on looking into after the symbol pruning
stuff.
More information about the Kde-optimize
mailing list