LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 10-27-2006, 08:58 AM   #1
Marel
Member
 
Registered: May 2005
Location: Serbia
Distribution: Debian, Ubuntu, Red Hat, Gentoo
Posts: 64

Rep: Reputation: 15
Less memory on 64-bit system


I have found out that on 64-bit compiled linux you always have around 70MB less memory. For example i run amd64 debian etch and free says total = 703768K. When I boot 32-bit live CD, than total memory is around 775000K. I tried with Ubuntu 5.04 32-bit and 64-bit, Slackware 10.2 32-bit, Ubuntu 6.06.1 64-bit, Ubuntu 6.06 32-bit and of course with this Debian I mentioned.

I would like to know what is the reason for this. I assume it is normal behavior, since I tried also on other machine. But I am curious. Does someone know about this?
 
Old 10-27-2006, 10:41 AM   #2
b0uncer
LQ Guru
 
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131

Rep: Reputation: Disabled
I'd start off by taking a closer look: what exactly is consuming memory, and then see if the 64-bit systems have some processes that eat up more memory than their 32-bit relatives etc. I think that might explain something. But really can't say straightforwardly why..maybe 64-bit needs more buffer memory or something?
 
Old 10-28-2006, 05:05 AM   #3
Marel
Member
 
Registered: May 2005
Location: Serbia
Distribution: Debian, Ubuntu, Red Hat, Gentoo
Posts: 64

Original Poster
Rep: Reputation: 15
That memory is not consumed by any process, it is substracted before anything, so it is not even calculated in total memory available to system. So I have no idea where does it go. I had some thoughts about it is used by kernel bzImage, since modules loaded in this remaining "total" memory.

But isn't there anyone with 64-bit system to tell us his result so we can compare them?

Last edited by Marel; 10-28-2006 at 05:10 AM.
 
Old 10-28-2006, 05:29 AM   #4
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Ubuntu/WSL
Posts: 9,782

Rep: Reputation: 481Reputation: 481Reputation: 481Reputation: 481Reputation: 481
64 bit code is bigger, and you run a 64 bit kernel and 64 bit drivers. They all consume more memory.
 
Old 10-28-2006, 12:56 PM   #5
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
To add on to that -- the kernel requires some memory to be mapped exclusively for its use. It's never available for user processes and therefore doesn't show up in free. I am not 100% sure of this, but as jillagre says 64 bit code requires more memory and therefore it would make sense that the amount of memory the kernel needs to completely close up would be larger under a 64 bit kernel.
 
Old 10-28-2006, 01:30 PM   #6
Marel
Member
 
Registered: May 2005
Location: Serbia
Distribution: Debian, Ubuntu, Red Hat, Gentoo
Posts: 64

Original Poster
Rep: Reputation: 15
It sounds logical, just it is strange that it is 6 times larger. I would expect up to 2 times.
 
Old 10-28-2006, 02:18 PM   #7
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Ubuntu/WSL
Posts: 9,782

Rep: Reputation: 481Reputation: 481Reputation: 481Reputation: 481Reputation: 481
6 times larger is something you didn't report before.

There is no reason for a 64 bit code to be more than twice the size of its 32 bit equivalent.
Perhaps is it allocating larger arrays of structures when in 64 mode.
 
Old 10-28-2006, 02:24 PM   #8
Marel
Member
 
Registered: May 2005
Location: Serbia
Distribution: Debian, Ubuntu, Red Hat, Gentoo
Posts: 64

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by jlliagre
6 times larger is something you didn't report before.
In fact I did, just not explicitly. I sad it is 70MB less and since 32-bit takes 14MB, then it is 14+70=84 for 64bit. And 84/14=6.
 
Old 10-28-2006, 02:54 PM   #9
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Ubuntu/WSL
Posts: 9,782

Rep: Reputation: 481Reputation: 481Reputation: 481Reputation: 481Reputation: 481
You didn't mention the 14MB figure, so there was no way to guess the x6 factor.

Can you post your /proc/meminfo content for 32 and 64 bit ?
 
Old 10-29-2006, 04:16 AM   #10
Marel
Member
 
Registered: May 2005
Location: Serbia
Distribution: Debian, Ubuntu, Red Hat, Gentoo
Posts: 64

Original Poster
Rep: Reputation: 15
Here it is for Ubuntu 6.06 32bit and 6.06.1 64bit.

Code:
root@main:/sto# cat meminfo32
MemTotal:       776000 kB
MemFree:          6772 kB
Buffers:         83132 kB
Cached:         492740 kB
SwapCached:          0 kB
Active:         316684 kB
Inactive:       413028 kB
HighTotal:           0 kB
HighFree:            0 kB
LowTotal:       776000 kB
LowFree:          6772 kB
SwapTotal:     2104472 kB
SwapFree:      2104472 kB
Dirty:               0 kB
Writeback:           0 kB
Mapped:         220908 kB
Slab:            29996 kB
CommitLimit:   2492472 kB
Committed_AS:   374216 kB
PageTables:       1432 kB
VmallocTotal:   245752 kB
VmallocUsed:      5412 kB
VmallocChunk:   240060 kB
root@main:/sto# cat meminfo64
MemTotal:       704348 kB
MemFree:          6724 kB
Buffers:         68564 kB
Cached:         372008 kB
SwapCached:        136 kB
Active:         305924 kB
Inactive:       327392 kB
HighTotal:           0 kB
HighFree:            0 kB
LowTotal:       704348 kB
LowFree:          6724 kB
SwapTotal:     2104472 kB
SwapFree:      2104336 kB
Dirty:               0 kB
Writeback:           0 kB
Mapped:         270168 kB
Slab:            43972 kB
CommitLimit:   2456644 kB
Committed_AS:   435760 kB
PageTables:       6276 kB
VmallocTotal: 34359738367 kB
VmallocUsed:      2860 kB
VmallocChunk: 34359735507 kB
 
Old 10-29-2006, 04:25 AM   #11
Marel
Member
 
Registered: May 2005
Location: Serbia
Distribution: Debian, Ubuntu, Red Hat, Gentoo
Posts: 64

Original Poster
Rep: Reputation: 15
Also, I have found out this 32-bit Ubuntu is, paradoxaly, faster.
 
Old 10-29-2006, 04:26 AM   #12
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Ubuntu/WSL
Posts: 9,782

Rep: Reputation: 481Reputation: 481Reputation: 481Reputation: 481Reputation: 481
Where is the paradox ?
What CPU are you running on ?
 
Old 10-29-2006, 04:30 AM   #13
Marel
Member
 
Registered: May 2005
Location: Serbia
Distribution: Debian, Ubuntu, Red Hat, Gentoo
Posts: 64

Original Poster
Rep: Reputation: 15
Isn't it paradox that 32-bit system, compiled to work even on 386, is faster than 64-bit, compiled specificaly for x86_64 architecture? Processor is Sempron 2800+ AMD64.
 
Old 10-29-2006, 05:55 AM   #14
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Ubuntu/WSL
Posts: 9,782

Rep: Reputation: 481Reputation: 481Reputation: 481Reputation: 481Reputation: 481
Quote:
Originally Posted by Marel
Isn't it paradox that 32-bit system, compiled to work even on 386, is faster than 64-bit, compiled specificaly for x86_64 architecture?
I doesn't surprise me that much. There is no outstanding reason for a 64 bit program to run faster than its 32 bit version. The opposite is usually the case.
Quote:
Processor is Sempron 2800+ AMD64.
Under the AMD64 architecture, running on 64 bit mode enable extra CPU registers, so that should make some programs running faster.

How are you measuring your system performance ?
 
Old 10-29-2006, 06:14 AM   #15
Marel
Member
 
Registered: May 2005
Location: Serbia
Distribution: Debian, Ubuntu, Red Hat, Gentoo
Posts: 64

Original Poster
Rep: Reputation: 15
I measured system startup time, loading OpenOffice.org and loading a big document in OOo and 32bit was faster in all 3 cases.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Memory bus is 64 bit but data access and register is only 32 bit for i386 lilzz Linux - Newbie 3 09-02-2006 12:35 AM
Will a 32-bit OS be able to handle 32GB of memory on a quad dual-CPU system? theitguy Linux - Hardware 3 07-27-2006 04:31 PM
32 bit thunderbird/firefox on 64 bit system true_atlantis Fedora 6 07-19-2006 09:37 AM
Getting Konqueror to load 32 bit plugins on a 64 bit system slantoflight Linux - Software 1 05-28-2006 05:17 PM
32 bit emulation libs on 64 bit system csfalcon Linux - Software 1 12-23-2004 12:49 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 06:22 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration