1

I'm currently using Linux Mint 32 bit mainly because it generally consumes less RAM and recognizes 100MB more RAM than the 64 bit version. I only have 4GB installed in my computer and I know that all systems don't use the full memory installed but a little bit less instead. For example, 4GB = 3,8GB in 32 bit systems. The problem is that all 64 bit Linux I tried recognize only 3,7GB. You can say the difference isn't that big but it is when you don't have a lot of RAM.

Is it the default for 64 bit architecture? Is there something I can do to change that?

  • Guessing: uefi vs bios boot, or the 64 kernel decompressed is is larger, and your metric doesn't include the kernel size, only what the kernel itself can address. – jiggunjer Feb 1 '17 at 17:25
1

A 32 bit system can deal with 2^32 bit sizes (4294967296 bytes = 4GB), as opposed to a 64 bit system which can deal with 2^64 bit sizes (18446744073709551616 bytes = a lot more than current hardware can handle). The RAM limit on 64 bit systems is therefore related to hardware limitations, rather than addressing limits.

What you see as less means that a portion of the memory is reserved for something else on the system, most likely as video memory which is done at the BIOS level.

64 bit applications are always slightly bigger in terms of program size and memory usage because variables that are typically stored on 4 bytes like long integers, floating points, and pointers, are all upgraded to 8 bytes to do the same job to support 64 bit addressing. Note that there is otherwise no performance impact.

  • I would hesitate to call 2^64 "near infinite". Also, the silicon in 64-bit chips frequently only supports 2^48 memory. See en.wikipedia.org/wiki/X86-64#Canonical_form_addresses – DepressedDaniel Feb 1 '17 at 5:49
  • @DepressedDaniel: I hesitated too so I changed it. For the limit I did mention it would be limited by the hardware but I changed it to be more flexible. – Julie Pelletier Feb 1 '17 at 6:34
  • This doesn't explain why the reserved amount of memory is different on the same system depending on the kernel's "64-bitness". – Stephen Kitt Feb 1 '17 at 6:50
1

I think it's unlikely that the difference is really 100MB. More likely, the difference is small but it happens across a rounding boundary, so that it turns 3.8GB into 3.7GB. For example, it could be difference between 3.76 and 3.74.

Also, it's perfectly reasonable to use 32-bit Linux on a system with only 4GB of RAM.

  • It's an interesting hypothesis but whatever way I do the calculation, I can see none that can cause this rounding difference. – Julie Pelletier Feb 1 '17 at 7:31
  • @JuliePelletier Lol, fixed. – DepressedDaniel Feb 1 '17 at 16:05
1

A significant part of this could be kernel related. I stumbled over the following threads discussing a significant increase in reserved memory in the Linux kernel in the 2.6 series:

https://forum.linode.com/viewtopic.php?t=7194

https://forum.linode.com/viewtopic.php?t=7229

Long story short: A significant increase in reserved memory appears to have been introduced in kernel version 2.6.38, and subsequently reduced again, for 32-bit kernels only, in version 2.6.39.1.

As of kernel version 4.9.0-3-amd64, I'm seeing 167500K memory reserved on a 4 GB Linode instance, so this issues appears to grow with time.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.