View previous topic :: View next topic |
Author |
Message |
kokoko3k n00b
Joined: 06 May 2005 Posts: 72
|
Posted: Thu Oct 16, 2008 8:49 am Post subject: 64bit vs 32bit memory footprint. |
|
|
Hi all, i use two gentoo system,
- first one is a PIV@3.2ghz, 32bit which i use at work.
- second one is an amd64 venice which i use at home.
Both installations are nearly the same (same services, use flags, installed applications), but i noticed a bigger amount of ram used by the amd64 installation.
I know that 64bit code is more memory expansive than 32bit one because of pointer sizes, but here it is about a 20% more!
I'm not sure if this test is correct, but here's the output of pmap on a just opened bash shell.
32-bit:
Code: |
32bitbox ~ # pmap 13987
13987: /bin/bash
08048000 608K r-x-- /bin/bash
080e0000 4K r---- /bin/bash
080e1000 20K rw--- /bin/bash
080e6000 2796K rw--- [ anon ]
41189000 120K r-x-- /lib/ld-2.7.so
411a7000 4K r---- /lib/ld-2.7.so
411a8000 4K rw--- /lib/ld-2.7.so
42543000 224K r-x-- /lib/libncurses.so.5.6
4257b000 28K r---- /lib/libncurses.so.5.6
42582000 8K rw--- /lib/libncurses.so.5.6
42584000 4K rw--- [ anon ]
42825000 1352K r-x-- /lib/libc-2.7.so
42977000 8K r---- /lib/libc-2.7.so
42979000 4K rw--- /lib/libc-2.7.so
4297a000 12K rw--- [ anon ]
429a8000 8K r-x-- /lib/libdl-2.7.so
429aa000 4K r---- /lib/libdl-2.7.so
429ab000 4K rw--- /lib/libdl-2.7.so
43726000 92K r-x-- /lib/libnsl-2.7.so
4373d000 4K r---- /lib/libnsl-2.7.so
4373e000 4K rw--- /lib/libnsl-2.7.so
4373f000 8K rw--- [ anon ]
b7daa000 36K r-x-- /lib/libnss_files-2.7.so
b7db3000 4K r---- /lib/libnss_files-2.7.so
b7db4000 4K rw--- /lib/libnss_files-2.7.so
b7db5000 36K r-x-- /lib/libnss_nis-2.7.so
b7dbe000 4K r---- /lib/libnss_nis-2.7.so
b7dbf000 4K rw--- /lib/libnss_nis-2.7.so
b7dc0000 28K r-x-- /lib/libnss_compat-2.7.so
b7dc7000 4K r---- /lib/libnss_compat-2.7.so
b7dc8000 4K rw--- /lib/libnss_compat-2.7.so
b7dc9000 1740K r---- /usr/lib/locale/locale-archive
b7f7c000 8K rw--- [ anon ]
b7f9d000 8K rw--- [ anon ]
b7f9f000 8K r-x-- /usr/lib/gconv/ISO8859-15.so
b7fa1000 4K r---- /usr/lib/gconv/ISO8859-15.so
b7fa2000 4K rw--- /usr/lib/gconv/ISO8859-15.so
b7fa3000 28K r--s- /usr/lib/gconv/gconv-modules.cache
b7faa000 4K r-x-- [ anon ]
bfe0d000 84K rw--- [ stack ]
[b] total 7332K[/b]
|
64-bit:
Code: |
64bitbox# pmap 7765
7765: -bash
0000000000400000 632K r-x-- /bin/bash
000000000059d000 44K rw--- /bin/bash
00000000005a8000 288K rw--- [ anon ]
00002b28104ad000 108K r-x-- /lib64/ld-2.7.so
00002b28104c8000 4K rw--- [ anon ]
00002b28104c9000 4K r---- /usr/lib64/locale/it_IT/LC_IDENTIFICATION
00002b28104ca000 4K r---- /usr/lib64/locale/it_IT/LC_MEASUREMENT
00002b28104cb000 4K r---- /usr/lib64/locale/it_IT/LC_TELEPHONE
00002b28104cc000 4K r---- /usr/lib64/locale/it_IT/LC_ADDRESS
00002b28104cd000 4K r---- /usr/lib64/locale/it_IT/LC_NAME
00002b28104ce000 4K r---- /usr/lib64/locale/it_IT/LC_PAPER
00002b28104cf000 4K r---- /usr/lib64/locale/it_IT/LC_MESSAGES/SYS_LC_MESSAGES
00002b28104d0000 4K r---- /usr/lib64/locale/it_IT/LC_MONETARY
00002b28104d1000 20K r---- /usr/lib64/locale/it_IT/LC_COLLATE
00002b28104d6000 4K r---- /usr/lib64/locale/it_IT/LC_TIME
00002b28104d7000 4K r---- /usr/lib64/locale/it_IT/LC_NUMERIC
00002b28104f5000 4K rw--- [ anon ]
00002b28104f6000 288K r-x-- /lib64/libncurses.so.5.6
00002b281053e000 1020K ----- /lib64/libncurses.so.5.6
00002b281063d000 60K rw--- /lib64/libncurses.so.5.6
00002b281064c000 216K r---- /usr/lib64/locale/it_IT/LC_CTYPE
00002b2810682000 28K r--s- /usr/lib64/gconv/gconv-modules.cache
00002b28106c7000 4K r---- /lib64/ld-2.7.so
00002b28106c8000 4K rw--- /lib64/ld-2.7.so
00002b28106c9000 8K r-x-- /lib64/libdl-2.7.so
00002b28106cb000 2048K ----- /lib64/libdl-2.7.so
00002b28108cb000 4K r---- /lib64/libdl-2.7.so
00002b28108cc000 4K rw--- /lib64/libdl-2.7.so
00002b28108cd000 1268K r-x-- /lib64/libc-2.7.so
00002b2810a0a000 2048K ----- /lib64/libc-2.7.so
00002b2810c0a000 16K r---- /lib64/libc-2.7.so
00002b2810c0e000 4K rw--- /lib64/libc-2.7.so
00002b2810c0f000 28K rw--- [ anon ]
00002b2810c16000 28K r-x-- /lib64/libnss_compat-2.7.so
00002b2810c1d000 2044K ----- /lib64/libnss_compat-2.7.so
00002b2810e1c000 4K r---- /lib64/libnss_compat-2.7.so
00002b2810e1d000 4K rw--- /lib64/libnss_compat-2.7.so
00002b2810e1e000 80K r-x-- /lib64/libnsl-2.7.so
00002b2810e32000 2044K ----- /lib64/libnsl-2.7.so
00002b2811031000 4K r---- /lib64/libnsl-2.7.so
00002b2811032000 4K rw--- /lib64/libnsl-2.7.so
00002b2811033000 8K rw--- [ anon ]
00002b2811035000 36K r-x-- /lib64/libnss_nis-2.7.so
00002b281103e000 2048K ----- /lib64/libnss_nis-2.7.so
00002b281123e000 4K r---- /lib64/libnss_nis-2.7.so
00002b281123f000 4K rw--- /lib64/libnss_nis-2.7.so
00002b2811240000 40K r-x-- /lib64/libnss_files-2.7.so
00002b281124a000 2044K ----- /lib64/libnss_files-2.7.so
00002b2811449000 4K r---- /lib64/libnss_files-2.7.so
00002b281144a000 4K rw--- /lib64/libnss_files-2.7.so
00002b281144b000 8K r-x-- /usr/lib64/gconv/ISO8859-1.so
00002b281144d000 2044K ----- /usr/lib64/gconv/ISO8859-1.so
00002b281164c000 4K r---- /usr/lib64/gconv/ISO8859-1.so
00002b281164d000 4K rw--- /usr/lib64/gconv/ISO8859-1.so
00002b281164e000 8K rw--- [ anon ]
00007fff9a5e7000 88K rw--- [ stack ]
ffffffffff600000 8192K ----- [ anon ]
[b] total 26940K[/b]
|
Here are emerge --info on
32bit: http://pastebin.com/f7d8e500d
64bit: http://pastebin.com/ff203a6f
I wonder if i can do something (kernel configuration, cflags, glibc use flags...) to reduce the 64-bit memory footprint.
Thanks in advance. |
|
Back to top |
|
|
zyko l33t
Joined: 01 Jun 2008 Posts: 620 Location: Munich, Germany
|
Posted: Thu Oct 16, 2008 9:58 am Post subject: |
|
|
Quote: | but here it is about a 20% more! |
That is consistent with my experiences: amd64 is at least 20% larger than i686. I don't think there's anything that can be done, especially since you already seem to have things compiled with -Os. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|