On 2006.08.16, Hossein Sharifi <[EMAIL PROTECTED]> wrote:
> I'm trying to set up a new installation of AOLServer (on Fedora Core 5), 
> and I've hit a problem that I can't seem to resolve.
> 
> The issue is that the nsd process consistently dies (every 20 seconds - 
> 5 minutes) with the error message "unable to realloc XXXXX bytes" (some 
> example values for X: 819200, 1005215, 1367511).

It seems that a lot of folks are getting odd "out of memory" errors with
FC5:

    http://www.google.com/search?q=fedora%20fc5%20%22out%20of%20memory%22

> nsd on my current FC4 typically hovers around 600M (lots of caching)
> and is stable.

This is good to know.  I wonder what's changed between FC4 and FC5 ...

> Stacksize: 2MB

Try bringing this down to 512 KB.  If that works, bring it up to 1 MB.
A 2 MB is probably much larger than it needs to be.

One suggestion that was made to me by Jasper (autopsy) in #fedora was to
turn off kernel overcommit accounting.  See:

    /usr/share/doc/kernel-doc-2.6.17/Documentation/vm/overcommit-accounting

Before you make any changes to your FC5 box, can you tell me what your
current settings are, as per the documentation:

$ grep Commit /proc/meminfo 
CommitLimit:   4453692 kB
Committed_AS:  1224220 kB

$ sysctl vm.overcommit_{memory,ratio}
vm.overcommit_memory = 0
vm.overcommit_ratio = 50

That's an example from my Debian 3.1 box.

This raises another question ...

> This might normailly indicate that I've run out of memory - however,
> the server isn't even close to that state.  It has 3GB of RAM, more
> than 2GB free, [...]

How much swap do you have configured?  If you think "I have 3GB of RAM,
I don't need swap," (which is a common myth today,) I suggest you read
this:

    http://sourcefrog.net/weblog/software/linux-kernel/swap.html

    || [...]
    || 
    || If you don't have swap space, then anonymous mappings can't be
    || flushed. They have to stay in memory until they're deleted. The
    || kernel can only obtain clean memory and free memory by flushing
    || out file-backed pages: programs, libraries, and data files. Not
    || having swap space constrains and unbalances the kernel's page
    || allocation.  However unlikely it is that the data pages will be
    || used again -- even if they're never used again -- they still need
    || to stay in memory sucking up precious RAM. That means the kernel
    || has to do more work to write out file-backed pages, and to read
    || them back in after they're discarded. The kernel needs to throw
    || out relatively valuable file-backed pages, because it has nowhere
    || to write relatively worthless anonymous pages.
    || 
    || [...]

Lets see if we can get to the bottom of your problem.

-- Dossy

-- 
Dossy Shiobara              | [EMAIL PROTECTED] | http://dossy.org/
Panoptic Computer Network   | http://panoptic.com/
  "He realized the fastest way to change is to laugh at your own
    folly -- then you can let go and quickly move on." (p. 70)


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> 
with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
field of your email blank.

Reply via email to