Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
64bit vs 32bit memory footprint.
View unanswered posts
View posts from last 24 hours

Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message

Joined: 06 May 2005
Posts: 72

PostPosted: Thu Oct 16, 2008 8:49 am    Post subject: 64bit vs 32bit memory footprint. Reply with quote

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.


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/
411a7000      4K r----  /lib/
411a8000      4K rw---  /lib/
42543000    224K r-x--  /lib/
4257b000     28K r----  /lib/
42582000      8K rw---  /lib/
42584000      4K rw---    [ anon ]
42825000   1352K r-x--  /lib/
42977000      8K r----  /lib/
42979000      4K rw---  /lib/
4297a000     12K rw---    [ anon ]
429a8000      8K r-x--  /lib/
429aa000      4K r----  /lib/
429ab000      4K rw---  /lib/
43726000     92K r-x--  /lib/
4373d000      4K r----  /lib/
4373e000      4K rw---  /lib/
4373f000      8K rw---    [ anon ]
b7daa000     36K r-x--  /lib/
b7db3000      4K r----  /lib/
b7db4000      4K rw---  /lib/
b7db5000     36K r-x--  /lib/
b7dbe000      4K r----  /lib/
b7dbf000      4K rw---  /lib/
b7dc0000     28K r-x--  /lib/
b7dc7000      4K r----  /lib/
b7dc8000      4K rw---  /lib/
b7dc9000   1740K r----  /usr/lib/locale/locale-archive
b7f7c000      8K rw---    [ anon ]
b7f9d000      8K rw---    [ anon ]
b7f9f000      8K r-x--  /usr/lib/gconv/
b7fa1000      4K r----  /usr/lib/gconv/
b7fa2000      4K rw---  /usr/lib/gconv/
b7fa3000     28K r--s-  /usr/lib/gconv/gconv-modules.cache
b7faa000      4K r-x--    [ anon ]
bfe0d000     84K rw---    [ stack ]
[b] total     7332K[/b]


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/
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/
00002b281053e000   1020K -----  /lib64/
00002b281063d000     60K rw---  /lib64/
00002b281064c000    216K r----  /usr/lib64/locale/it_IT/LC_CTYPE
00002b2810682000     28K r--s-  /usr/lib64/gconv/gconv-modules.cache
00002b28106c7000      4K r----  /lib64/
00002b28106c8000      4K rw---  /lib64/
00002b28106c9000      8K r-x--  /lib64/
00002b28106cb000   2048K -----  /lib64/
00002b28108cb000      4K r----  /lib64/
00002b28108cc000      4K rw---  /lib64/
00002b28108cd000   1268K r-x--  /lib64/
00002b2810a0a000   2048K -----  /lib64/
00002b2810c0a000     16K r----  /lib64/
00002b2810c0e000      4K rw---  /lib64/
00002b2810c0f000     28K rw---    [ anon ]
00002b2810c16000     28K r-x--  /lib64/
00002b2810c1d000   2044K -----  /lib64/
00002b2810e1c000      4K r----  /lib64/
00002b2810e1d000      4K rw---  /lib64/
00002b2810e1e000     80K r-x--  /lib64/
00002b2810e32000   2044K -----  /lib64/
00002b2811031000      4K r----  /lib64/
00002b2811032000      4K rw---  /lib64/
00002b2811033000      8K rw---    [ anon ]
00002b2811035000     36K r-x--  /lib64/
00002b281103e000   2048K -----  /lib64/
00002b281123e000      4K r----  /lib64/
00002b281123f000      4K rw---  /lib64/
00002b2811240000     40K r-x--  /lib64/
00002b281124a000   2044K -----  /lib64/
00002b2811449000      4K r----  /lib64/
00002b281144a000      4K rw---  /lib64/
00002b281144b000      8K r-x--  /usr/lib64/gconv/
00002b281144d000   2044K -----  /usr/lib64/gconv/
00002b281164c000      4K r----  /usr/lib64/gconv/
00002b281164d000      4K rw---  /usr/lib64/gconv/
00002b281164e000      8K rw---    [ anon ]
00007fff9a5e7000     88K rw---    [ stack ]
ffffffffff600000   8192K -----    [ anon ]
[b] total            26940K[/b]

Here are emerge --info on

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
View user's profile Send private message

Joined: 01 Jun 2008
Posts: 620
Location: Munich, Germany

PostPosted: Thu Oct 16, 2008 9:58 am    Post subject: Reply with 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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

Jump to:  
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