eldukae
eldukae

Reputation: 91

Linux Kernel 'Reserved' Memory

I am trying to compile a kernel ( 3.14, arm64 arch ) for a low memory system ( 16MB ram ). I have managed to turn off all the features that I dont need, basically no devices, no fs, no modules, no ZONE_DMA, a very very basic kernel.

However, when I boot the kernel I see this:

Memory: 860K/16384K available (789K kernel code, 67K rwdata, 56K rodata, 64K init, 38K bss, 15524K reserved)

Thanks in advance!

Upvotes: 5

Views: 13022

Answers (2)

Karim Manaouil
Karim Manaouil

Reputation: 1249

It is the minimum amount of memory that should always be there to satisfy critical memory allocations. Setting it too low might lead to a broken system and setting to high might instantly OOM your system. You can modify this value by writing to /proc/sys/vm/min_free_kbytes.

To read it:

$ cat /proc/sys/vm/min_free_kbytes 
67584

To set it to 1024KB (1MB):
$ echo 1024 > /proc/sys/vm/min_free_kbytes

Upvotes: 3

skaushal
skaushal

Reputation: 705

Memory: 860K/16384K available (789K kernel code, 67K rwdata, 56K rodata, 64K init, 38K bss, 15524K reserved)

This is the structure of process in memory: text/code segment, data segment(bss,rodata etc), heap and stack. Kernel always resides in RAM and reserve some memory space for its usages. But when the RAM is small it is shared by kernel and user space processes.

To know more on embedded linux read this post.

Upvotes: -1

Related Questions