0

I recently upgraded an old CentOS 7 server at AWS to a Rocky 9 server.

The old t2.micro (x86 architecture) server reported a single 1G node under Early memory node ranges. About 92MB of RAM was held in reserve.

The new t4g.micro (AMD Nitro architecture) shows 192MB reserved. Additionally, instead of dmesg only showing a single range in the Early memory node ranges, there are now seven. Thus only the first range shows as available RAM, and everything else appears to be reserved.

[ 0.000000] Early memory node ranges [ 0.000000] node 0: [mem 0x0000000040000000-0x0000000075c2ffff] [ 0.000000] node 0: [mem 0x0000000075c30000-0x0000000075c3ffff] [ 0.000000] node 0: [mem 0x0000000075c40000-0x0000000075ceffff] [ 0.000000] node 0: [mem 0x0000000075cf0000-0x0000000075d2ffff] [ 0.000000] node 0: [mem 0x0000000075d30000-0x00000000791fffff] [ 0.000000] node 0: [mem 0x0000000079200000-0x00000000795dffff] [ 0.000000] node 0: [mem 0x00000000795e0000-0x000000007d5fffff] [ 0.000000] Initmem setup node 0 [mem 0x0000000040000000-0x000000007d5fffff] 

In /proc/iomem, I see

40000000-75c2ffff : System RAM 75c30000-75c3ffff : reserved 75c40000-75ceffff : System RAM 75cf0000-75d2ffff : reserved 75d30000-791fffff : System RAM 79200000-795dffff : reserved 795e0000-7d5fffff : System RAM 

The first range is 860MB, which is approximately what /proc/meminfo shows (MemTotal: 868744 kB). The amount of each range is:

40000000-75c2ffff : System RAM 860MB 75c30000-75c3ffff : reserved 64KB 75c40000-75ceffff : System RAM 703KB 75cf0000-75d2ffff : reserved 256KB 75d30000-791fffff : System RAM 52MB 79200000-795dffff : reserved 4MB 795e0000-7d5fffff : System RAM 64MB 

I'd really like to reclaim that 118MB (52+64 for the 5th and 7th range) that it's calling "System RAM" but not making available.

Does anyone know how the kernel decides to create those early ranges, and if there is any way to make adjustments?

1 Answer 1

0

Boot time memory management is mostly irrelevant by the time the full featured mm is started.

As the system boot progresses, the architecture specific mem_init() function frees all the memory to the buddy page allocator.

The memory ranges, both these early ranges and those for I/O, are very architecture specific and inscrutable to people who are not kernel developers. Personally I have little time to learn about them operationally, not when it successfully boots.

Regarding capacity planning, the real mm will tell you some numbers. MemAvailable in /proc/meminfo is an estimate of how much can be reclaimed. /proc/pressure/memory is what to watch for if you are low on memory.

The difference between MemTotal and MemAvailable, is an approximation of everything allocated. Both kernel and user. With your workload not running, this is an estimate of overhead at idle. Stop everything running (runlevel 1 aka rescue.target) for a better estimate of just the kernel and a shell, minus many daemon processes.

1
  • The issue is that the system is supposed to have 1G of RAM, but only reports 868808 kB MemTotal. Obviously some need to be reserved, but I believe that 106M gets lost because of the way early memory is being allocated. Total "System RAM" should be 964M or so, but only the first 850M is actually available. It seems like a configuration error, but I don't know how to change the maps. Commented Apr 22 at 20:36

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.