64bitOS takes/uses more memory?

is it documented that 64 bit os uses more GB RAM than 32 bit OS for the same kind of operation? if yes, what will be the technical reason for that?
LVL 5
25112Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

it_saigeDeveloperCommented:
It depends on the data-type used for the operation.  For example, an integer uses 4 bytes of memory while a 64-bit integer uses 8 bytes of memory.

http://msdn.microsoft.com/en-us/library/47zceaw7.aspx

Since we are dealing with a 64-bit OS versus a 32-bit OS.  A 64-bit OS has been written exclusively to utilize data-types that support 64-bit operations.

-saige-
0
dbruntonCommented:
Yes.

See http://windowsitpro.com/windows-server/q-does-64-bit-version-os-use-more-memory-32-bit-version-same-os

There isn't much difference.  The main reason for the increase is pointer size which increases from 4 bytes to 8 bytes.
0
Lieven EmbrechtsSenior IT ConsultantCommented:
The answer is yes, but it’s generally only a small difference, maybe 100MB of extra memory space. That’s not a huge price to pay for the advantages of the 64-bit platform, providing you actually are taking advantage of the 64-bit benefits.

The logical next question is WHY does the 64-bit version use up more memory?

It uses up more memory for several reasons. First, you can run 32-bit applications on a 64-bit OS, which means a 64-bit OS has to load some 32-bit libraries into memory in addition to its native 64-bit libraries, which is the bulk of the memory difference.

Additionally we use 64-bit memory addresses instead of 32-bit memory addresses. This means each pointer to memory takes up 8 bytes instead of 4 bytes, causing some additional memory use there as well. However, that’s unlikely to be a huge factor.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Introducing the "443 Security Simplified" Podcast

This new podcast puts you inside the minds of leading white-hat hackers and security researchers. Hosts Marc Laliberte and Corey Nachreiner turn complex security concepts into easily understood and actionable insights on the latest cyber security headlines and trends.

Dr. KlahnPrincipal Software EngineerCommented:
Surprisingly, in one respect a 64-bit operating system can save memory.

In a 32-bit operating system the video card occupies address space in the 3 to 4 GB range.  That address space is lost for other uses including physical memory.  Typically the range is from 3.25 to 4 GB.  No matter how much memory is installed in a computer with a 32-bit operating system, the actual usable memory is limited to about 3.25 GB.

In a 64-bit operating system the video card is mapped into memory space that is not used by real memory, so all memory installed is usable.

Given two systems with 4 GB of physical memory, one with a 32-bit and one with a 64-bit operating system, the 64-bit operating system has about 700MB more physical memory available.
0
25112Author Commented:
>>
an integer uses 4 bytes of memory while a 64-bit integer uses 8 bytes of memory.
There isn't much difference.
maybe 100MB of extra memory space.
<<
for the same operation, if all it takes extra is 100MB, then that is a easy choice indeed.
---------------
>>
In a 64-bit operating system the video card is mapped into memory space that is not used by real memory, so all memory installed is usable.

This is phenomenal, too.

So, if we had only 4GB RAM for a machine, then it is always better to go to 64 bit, since you will have more memory to play with.
---------------
But could it be ever that a 64bit machine gets overwhelmed at 4GB compared to a 32 but machine, for any other or some other reason, not covered already in this post (assuming the same operation only will be performed- in this case for example: SQL 2008R2)?
0
it_saigeDeveloperCommented:
Depending on the application(s) and their respective workloads, it is very possible for *any* computer to get overwhelmed no matter the amount of memory they have installed.  The simple premise for this is because the amount of memory that is installed is finite.  Services like SQL and Exchange have for years been using a *take all available resources, but share them when needed* approach.

When SQL Server is using memory dynamically, it queries the system periodically to determine the amount of free physical memory. SQL Server uses the memory notification API QueryMemoryResourceNotification to determine when the buffer pool may allocate memory and release memory.

Allowing SQL Server to use memory dynamically is recommended; however, you can set the memory options manually and restrict the amount of memory that SQL Server can access. Before you set the amount of memory for SQL Server, determine the appropriate memory setting by subtracting, from the total physical memory, the memory required for the operating system, and any other instances of SQL Server (and other system uses, if the computer is not wholly dedicated to SQL Server). This difference is the maximum amount of memory you can assign to SQL Server.


So no matter the amount of memory installed in the server, SQL is going to eat up as much of it as possible with the idea of releasing memory when the operating system needs it.  These settings, though, can be changed.

http://msdn.microsoft.com/en-us/library/ms178067(v=sql.105).aspx

So in this case, it is not the operating system utilizing the memory, but the program.

-saige-
0
Lieven EmbrechtsSenior IT ConsultantCommented:
sql is a different matter: the sql server will use the memory it gets to maximize caching & perforance, so in a 64-bit environment (with 4Gb or more) it will be better performing.
frankly: 32-bit is the past, 64-bit is the only valid choice currently.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Hardware

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.