Total RAM amount fluctuates?

Does anyone know how this would be possible? I have the total amount of RAM fluctuate by several MBs after several reboots. I think it goes up after I reinstall BIOS and then decreases slowly. It was 32005 MB then now it’s 32001.9 MB, as seen in top.

Hello @soconfused ,
With memory, there are always some ambiguity in totals reported. For instance I have 32GB as per the mfg. But my system reports somewhat less. Why? Well it is very likely that the mfg claims are based on a thousand Kb making a megabyte instead of the binary correct 1024Kb, hence when the computer converts your claimed size to actual size it is less.

And the BIOS also reserves some RAM as well.
I think the total memory reported in /proc/meminfo is everything the kernal is allowed to use.

No its not a decimal vs. power of 2 issue as is the case with storage.

When the kernel boots up this is logged for my system:

[  +0.000000] BIOS-provided physical RAM map:
[  +0.000000] BIOS-e820: [mem 0x0000000000000000-0x000000000009dfff] usable
[  +0.000000] BIOS-e820: [mem 0x000000000009e000-0x000000000009efff] reserved
[  +0.000000] BIOS-e820: [mem 0x000000000009f000-0x000000000009ffff] usable
[  +0.000000] BIOS-e820: [mem 0x00000000000a0000-0x00000000000fffff] reserved
[  +0.000000] BIOS-e820: [mem 0x0000000000100000-0x0000000063e94fff] usable
[  +0.000000] BIOS-e820: [mem 0x0000000063e95000-0x0000000063e95fff] reserved
[  +0.000000] BIOS-e820: [mem 0x0000000063e96000-0x0000000063e9bfff] usable
[  +0.000000] BIOS-e820: [mem 0x0000000063e9c000-0x0000000063e9cfff] reserved
[  +0.000000] BIOS-e820: [mem 0x0000000063e9d000-0x00000000745cefff] usable
[  +0.000000] BIOS-e820: [mem 0x00000000745cf000-0x00000000782cefff] reserved
[  +0.000000] BIOS-e820: [mem 0x00000000782cf000-0x000000007851efff] ACPI data
[  +0.000000] BIOS-e820: [mem 0x000000007851f000-0x000000007871efff] ACPI NVS
[  +0.000000] BIOS-e820: [mem 0x000000007871f000-0x0000000079ffefff] reserved
[  +0.000000] BIOS-e820: [mem 0x0000000079fff000-0x0000000079ffffff] usable
[  +0.000000] BIOS-e820: [mem 0x000000007a000000-0x000000007dffffff] reserved
[  +0.000000] BIOS-e820: [mem 0x000000007ee00000-0x000000007fffffff] reserved
[  +0.000000] BIOS-e820: [mem 0x00000000c0000000-0x00000000cfffffff] reserved
[  +0.000000] BIOS-e820: [mem 0x00000000fe000000-0x00000000fe010fff] reserved
[  +0.000000] BIOS-e820: [mem 0x00000000fec00000-0x00000000fec00fff] reserved
[  +0.000000] BIOS-e820: [mem 0x00000000fed00000-0x00000000fed00fff] reserved
[  +0.000000] BIOS-e820: [mem 0x00000000fed20000-0x00000000fed7ffff] reserved
[  +0.000000] BIOS-e820: [mem 0x00000000fee00000-0x00000000fee00fff] reserved
[  +0.000000] BIOS-e820: [mem 0x00000000ff000000-0x00000000ffffffff] reserved
[  +0.000000] BIOS-e820: [mem 0x0000000100000000-0x000000087fffffff] usable

There are lots more logs about this memory as the kernel proceeds.

That’s a good idea, thanks. I’ll compare that table between changes in total memory and see what changes.

Would total RAM available shown exclude whatever memory space that Linux kernel occupies?

I can comment once I know where you are you seeing the total RAM reported.
Where are you seeing this?

From my original post.

What kind of GPU do you have? Systems with integrated GPUs may dynamically allocate memory based on usage and that is deducted from total system memory (since you don’t want the OS to be messing around with that area that’s dedicated to the GPU).

But this total RAM memory number from top gets allocated on each boot and seems to be stable across boots. When this size changes, it varies by a MB or two at a time. I think it changed last time when I recompiled my kernel, I noticed. So I’m wondering if kernel memory gets allocated and subtracted, and then it reports RAM with kernel memory taken out.

If you use the values for memory that you see in the /proc/meminfo file the advantage is that the values are documented in the kernel documentation.

The “MemTotal” in /proc/meminfo is the value I’m talking about, it’s the same as what top shows for total memory that sometimes fluctuates (I suspect due to kernel size differences, but need this confirmed).

The value only changes when you boot a different kernel?
If so then it is related to the kernels code.