Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 16 Jul 2001 10:55:13 -0700
From:      David Greenman <dg@root.com>
To:        Rob <rob@breakbeat.net>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Inactive/leak memory
Message-ID:  <20010716105513.G49840@nexus.root.com>
In-Reply-To: <Pine.BSF.4.21.0107161837370.1233-100000@phoenix.shells.co.uk>; from rob@breakbeat.net on Mon, Jul 16, 2001 at 06:49:46PM %2B0100
References:  <Pine.BSF.4.21.0107161837370.1233-100000@phoenix.shells.co.uk>

next in thread | previous in thread | raw e-mail | index | archive | help
>Hi,
>
>I'm running 4.3 on a dual P3-550, with 1Gb RAM, and have been noticing odd
>reports in the 'top' values. After a reboot, the server slowly begins to lose
>memory from the free column into the inactive column, resulting in a bizarre set
>of values.
>This server is a live webserver, running Apache, with PHP and PostgreSQL. The
>laods are fairly low, and since I've had this box constantly CVSupped, with the
>latest updates to the webserver etc, I'm pretty stumped as to why this situation
>is happening.
>
>Here's the top part of the top output, after only 15 days of uptime:
>
>last pid: 99471;  load averages:  0.56,  0.24,  0.13 
>                           up 15+21:26:00  17:13:02
>50 processes:  1 running, 49 sleeping
>CPU states:  1.9% user,  0.0% nice,  1.4% system,  0.4% interrupt, 96.3% idle
>Mem: 22M Active, 668M Inact, 87M Wired, 152K Cache, 112M Buf, 227M Free
>Swap: 512M Total, 512M Free
>
>  PID USERNAME PRI NICE  SIZE    RES STATE  C   TIME   WCPU    CPU COMMAND
>  189 pgsql      2   0  4408K  1552K select 1  11:36  0.00%  0.00% postgres
>  207 root       2   0  4856K  4012K select 1   4:43  0.00%  0.00% httpd
>72058 www        2   0  5252K  4624K sbwait 1   0:55  0.00%  0.00% httpd
>79544 www       18   0  5300K  4584K lockf  0   0:35  0.00%  0.00% httpd
>80731 www        2   0  5184K  4488K sbwait 1   0:35  0.00%  0.00% httpd
>80748 www        2   0  5168K  4536K sbwait 1   0:35  0.00%  0.00% httpd
>85255 www       18   0  5176K  4544K lockf  0   0:26  0.00%  0.00% httpd
>  154 root       2   0  1256K   884K select 1   0:26  0.00%  0.00% sshd1
>  147 root      10   0   968K   736K nanslp 0   0:07  0.00%  0.00% cron
>  150 root       2   0  2484K  2036K select 0   0:06  0.00%  0.00% sendmail
>  124 root       2   0   924K   612K select 1   0:05  0.00%  0.00% syslogd
>95582 www        2   0  5244K  4604K sbwait 1   0:04  0.00%  0.00% httpd
>95470 www        2   0  5068K  4368K sbwait 1   0:04  0.00%  0.00% httpd
>98534 www        2   0  5076K  4432K sbwait 0   0:01  0.00%  0.00% httpd
>  194 root       2   0  1236K   888K select 0   0:01  0.00%  0.00% sshd1
>
>This seems to happen slowly, until it reaches about 20M Free, upon which I tend
>to reboot.
>
>Any ideas? I thought that perhaps as inactive memory is still available to the
>system if needed that it might be okay to leave it, but a explanation may put my
>heart at rest..

   The active, inactive, cache, and free above are actually page queues, and
not an indication of actual memory usage. The system moves the pages between
the queues as part of the page reclaimation procedure. The 'free' pages are
the easiest to reclaim because they contain no valid data. The 'free'
number will generally be *low* because FreeBSD tries to keep pages filled
with useful cached file data (and those pages will show up on any of the
other queues depending on how/when they were last accessed).
   The bottom line is that you can't determine anything about truely
allocated memory by looking at those page queue numbers.

-DG

David Greenman
Co-founder, The FreeBSD Project - http://www.freebsd.org
President, TeraSolutions, Inc. - http://www.terasolutions.com
Pave the road of life with opportunities.

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




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