[nSLUG] Help: CPAN session "killed", "0-order allocation failed"

Ian Campbell ian at slu.ms
Tue May 12 21:08:01 ADT 2009

On Tue, May 12, 2009 at 08:03:27PM -0300, Mike Spencer wrote:
> Jason wrote:
> > Hmm, try adding some more swap space.   Because you said "nothing is
> > running that should max out memory", I am going to presume you didn't
> > actually *look* at the amount of free memory/swap and you are in fact
> > running out.
> Um......ummmm..............
> I know I set up swap space when I installed.  There's a 500M swap
> partition.  But what do you know?  There's no swap entry in /etc/fstab
> for swapon -a to see when it's run in rc.S.  And that depsite much
> manual fiddling in /etc/fstab to set up loop amd nfs mounts.
> FWIW, /usr/bin/top always shows memory nearly maxed out no matter what
> I'm doing.  I assumed that was a kernel feature of some kind that I
> didn't understand.  I've never had the "__alloc_pages: 0-order
> allocation failed" message before, even when, say, running gimp on a
> pair of big images.  Googling that  phrase turns up a lot of
> inconclusive head scratching.

Top lies. Free memory in Linux is widely misunderstood, so hopefully I
get this right ;)

Basically, the number in free/top/whatnot is... technically true but
not what you want.

ian at blackhole [~]
$ free
             total       used       free     shared    buffers  cached
Mem:       2063020    1821864     241156          0     159372  1131012
-/+ buffers/cache:     531480    1531540
Swap:      2000084         32    2000052

Most people will look at that and say they only have ~240MB free. The
'real' numbers are right below it though, the kernel uses whatever
free memory it can for internal buffers and disk cache. The memory is
'in use', but if requested by userspace apps the memory will be

... so basically I've got ~500MB in use and ~1.5GB free.

More information about the nSLUG mailing list