Comment 18 for bug 785394

Bryan Quigley (bryanquigley) wrote :

@Daniel
I'm wrong, not fixed in 13.04+

I ran some tests:
@Chiluk first up vm images do only need 64 mb reserved:
Trusty 512 MB (m1.tiny) image on OpenStack: allocted 64 MB of ram for crashdump and it worked. (dump size of 23 mb)

Desktop images fail
Trusty 2047 MB (Vagrant/Virtualbox desktop image) - allocated 64 MB of ram for crashdump and hung.
Reran with 100MB for crashdump, worked (dump size of 32 mb)

Is there any way to not be guessing here and generate the right number for the kernel you are using and modules that have been loaded? (In other words, get current kernel size and add percentage buffer). Per another private case we may have situations where 128 MB is not enough.

If we can't auto-detect this (building upon chiluk's' comment), I would suggest something like (the numbers can change but I think we do need more levels):
< 1.5 GB of RAM: is it virtual kernel? then do 64 mb, if not do 128 mb
1.5 GB to 4 GB: everything do 192 mb
4 GB+: 256 mb
12 GB+: 512 mb (is there a point when we should stop?)