linode 512 has not a ram of 512M?

free -m

total used free shared buffers cached

Mem: 498 120 378 0 5 92

-/+ buffers/cache: 22 476

Swap: 255 0 255

Is this normal?

5 Replies

Yes, it's just how your kernel reports the figures, mine shows more

total used free shared buffers cached

Mem: 527 498 29 0 6 287

-/+ buffers/cache: 203 323

Swap: 255 101 154

Linode is giving you your 512M, but your kernel keeps a bit of it reserved and doesn't report it as available. Check your kernel log for a line like this:

Feb  4 14:01:35 ??? kernel: Memory: 760348k/786432k available (5818k kernel code, 388k absent, 25696k reserved, 2951k data, 520k init)

That is from a linode 768, and the "786432k" divided by 1024 just happens to exactly equal 768M.

I see now. Thank you all.

I am new to Linode and Linux:)

````

dmesg | grep Memory

Memory: 503652k/524288k available (5835k kernel code, 388k absent, 20248k reserved, 2894k data, 516k init)


dmesg | grep Free

Freeing SMP alternatives: 28k freed
Freeing unused kernel memory: 516k freed
Freeing unused kernel memory: 288k freed
Freeing unused kernel memory: 464k freed

503652k + 28k + 516k + 288k + 464k = 504948k

free

         total       used       free     shared    buffers     cached

Mem: 504948 480784 24164 0 16428 217180
-/+ buffers/cache: 247176 257772
Swap: 524284 88644 435640
````

The behaviour is slightly different between old-style Xen kernels (Linode "stable") and modern pv_ops kernels (Linode "latest") causing the memory usage to be reported slightly differently, but the difference is mainly just in the way it's reported.

From memory, I think it may have been something like this:

Some RAM (in this case, from the Xen instance) is needed just to load the kernel. In pv_ops kernels, inside the VM you see this as just a reduction in the number reported as system RAM whereas in a Xen kernel, inside the VM you see this as memory that exists but is used.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct