Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 19 Apr 2003 17:51:54 -0700 (PDT)
From:      Don Lewis <truckman@FreeBSD.org>
To:        tlambert2@mindspring.com
Cc:        freebsd-current@FreeBSD.org
Subject:   Re: Broken memory management on system with no swap
Message-ID:  <200304200051.h3K0psXB020260@gw.catspoiler.org>
In-Reply-To: <3EA19BAA.C133A3DC@mindspring.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 19 Apr, Terry Lambert wrote:
> Lucky Green wrote:
>> There appears to be a memory management bug that affects systems without
>> swap files. Processes are killed off due to the server being "out of
>> swap space" even though top shows some 800MB of "inactive" memory
>> available.
>> 
>> Apr 18 18:13:25 pakastelohi kernel: swap_pager_getswapspace: failed

I ran into something similar yesterday while compiling openoffice
because I hadn't noticed that geom had renamed my swap device and it was
no longer being enabled.  I just got the syslog message, but no
processes were killed

With my swap partition re-enabled and another openoffice compilation in
progress:

last pid: 81656;  load averages:  1.23,  1.24,  1.34    up 0+16:47:02  17:47:53
50 processes:  2 running, 47 sleeping, 1 stopped
CPU states:  0.0% user, 94.6% nice,  2.7% system,  2.7% interrupt,  0.0% idle
Mem: 285M Active, 402M Inact, 169M Wired, 35M Cache, 111M Buf, 108M Free
Swap: 2055M Total, 144K Used, 2055M Free

> This is generally an attempt to get a swap mapping for backing store
> for the process.  It could be that all your "inactive" memory has
> been spoken for.
> 
> 
>> I suspect that for some reason memory listed as "inactive" by top is not
>> being correctly allocated to new processes when no swapfile is
>> available, since the errors do not appear until memory listed as "free"
>> has dropped to about 1.5-3k.
> 
> If you had provided a traceback, I would guess that this happened
> as a call from swap_pager_reserve(), as opposed to a call from
> swap_pager_strategy() or swap_pager_putpages().  This can only
> happen if you are using an md device; are you using an md device
> (ramdisk)?  If so: cut it out, or make sure the MD_RESERVE bit is
> not set.

I'm not using md.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200304200051.h3K0psXB020260>