Title 2014.03: grml2ram fails because of too less RAM despite there is plenty
Priority wish Status chatting
Superseder Nosy List whaid
Assigned To Topics

Created on 2014-04-03.09:30:04 by whaid, last changed 2014-04-03.11:06:17 by whaid.

msg4777 (view) Author: whaid Date: 2014-04-03.11:06:17
Oops, that's MemFree+(Buffers+Cached)*0.9 of course
msg4776 (view) Author: whaid Date: 2014-04-03.11:03:43
If the check is dropped (i.e. by using --force or commenting out), grml2ram
succeeds as expected.

However isn't the RAM check just a sanity check after all?
If so, something like MemFree-(Buffers-Cached)*0.9 > grmlsize would make sense.
msg4775 (view) Author: mika Date: 2014-04-03.10:05:36
Hm, what happens if you modify /usr/sbin/grml2ram to use "Inactive" instead and
what happens if you drop the check overall?

Because I'm not sure that "Inactive" would really help, example output from one
of my systems:

# grep MemFree /proc/meminfo  
MemFree:         3568244 kB
# grep Inactive: /proc/meminfo
Inactive:        2803648 kB
# free -m
             total       used       free     shared    buffers     cached
Mem:         15784      12357       3426          0       1733       5297
-/+ buffers/cache:       5326      10457
Swap:         2045         94       1951
msg4774 (view) Author: whaid Date: 2014-04-03.09:30:04
grml2ram fails reporting that there is too less free RAM despite there is plenty.

Problem: the MemFree entry of /proc/meminfo is parsed which is usually small
because free memory is used by buffers and caches.

# grml2ram
 * Sorry, not enough free RAM (246276kB) available for grml-image (387712kB).   
# free
             total       used       free     shared    buffers     cached
Mem:       6126996    5880344     246652     239016    4634320     290508

Probable fix:
Parse a different value from /proc/meminfo, like Inactive?
Date User Action Args
2014-04-03 11:06:17whaidsetmessages: + msg4777
2014-04-03 11:03:43whaidsetmessages: + msg4776
2014-04-03 10:05:36mikasetstatus: unread -> chatting
priority: bug -> wish
messages: + msg4775
2014-04-03 09:30:04whaidcreate