Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 19 Jan 2000 22:54:30 -0800 (PST)
From:      Matthew Dillon <dillon@apollo.backplane.com>
To:        Alex Povolotsky <tarkhil@over.ru>
Cc:        hackers@FreeBSD.ORG
Subject:   Re: Strange behaviour of loaded system
Message-ID:  <200001200654.WAA43173@apollo.backplane.com>
References:   <20000119230850.A92960@over.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
:Hello!
:
:I've observed a VERY strange behaviour of a moderately-to-heavy loaded
:system (load average about 5.7 on a 2xPII-400 with 512Mb of RAM):
:
:(I have no access to the box right now, and I'm giving only general details;
:however, I'll be able to produce more details next morning)
:
:About 200-300 processes (230-280, something always creates and dies), some
:swapping (I recall 36% right now), and the most strange thing: always some
:(4-14M) of free RAM, and about 100 pageins per second. Most of processes are
:modperl'ed Apaches and self-written POP3 readers.
:
:I have no good understanding of such behaviour. Unfortunately I cannot find
:my "UNIX Internals: The New Frontier" for several days, so I'm really
:limited on books. Maybe some kind soul will tell me how can system behave
:that way?
:
:Alex.

    This sounds like proper behavior to me.  Whenever you have a situation
    where processes are being created and deleted you have a situation
    where burst memory use is occuring.  If the system does not have
    sufficient memory to handle the active load then you wind up eating
    the free memory in large chunks and causing the system to page.  The
    system will attempt to recover sufficient memory to handle the next
    cycle of burst memory allocation.

    The system is trying to manage the load as best it can.  For a machine
    with 512MB of ram maintaining 4-14M of truely free memory under the
    load conditions you have indicated is the correct response by the 
    system.  The paging rate you indicate, 100 pages/sec of paging activity,
    indicates that you are definitely overcommitting the machine's memory
    but haven't yet reached the point where you start thrashing.

    Perl is especially bad at memory management.  The active data set
    tends to be the whole enchillada.  If you are using perl your best bet
    is to either add memory to the machine or to track down why perl is
    eating so much memory and try to fix it.  If you are running POP 
    on the same box you should note that POP tends to place a heavy disk
    and memory load on any system as well, due to its tendancy to scan
    mailbox files and due to the frequency that users check their mail.
    Large mailbox files can be especially nasty.  

    You have several options.  First, you can add memory to the machine.
    Second, you can try tuning Apache and modperl.  Third you can attempt
    to track down where all the memory is going and work on that (it's
    probably the perl and/or POP related stuff).

					-Matt
					Matthew Dillon 
					<dillon@backplane.com>


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




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