22 Nov 2010, 15:14
Tags: , , , , , ,
Comments Off

Maximum allocated memory per process

A process in Linux can allocate memory without actually using it. This can create situations in which you have far more memory allocated than you have physically in the machine. We had one process that kept allocating memory without using it, until it ran into a barrier. Look at this munin graph to see what happened there:

Now I was puzzled by the 250GB limit. A 2.6 kernel should be able to allocate 1TB of memory on a machine, if it’s available. So why would it run out of allocatable space at 250GB? Took me a little while, but after a tip from jtopper on IRC, I looked at the vm sysctl documentation and found the overcommit_ratio setting. Which happened to be 50. And the machine just happened to have about 5GB of RAM. Well look there, 5×50 is 250GB… We found the reason why the graph stops increasing at about 250GB!

Tags: , , , , , ,

 
  • Calender

    November 2010
    M T W T F S S
    « Oct   Dec »
    1234567
    891011121314
    15161718192021
    22232425262728
    2930  
  • Twitter

    Powered by Twitter Tools

  • RSS Delicious feed

  • Archives