Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 9 May 2002 16:07:19 +0200
From:      Erik Trulsson <ertr1013@student.uu.se>
To:        MikeM <MyRaQ@mgm51.com>
Cc:        freebsd-stable@freebsd.org
Subject:   Re: Steadily increasing memory usage on a lightly loaded server
Message-ID:  <20020509140719.GA28169@student.uu.se>
In-Reply-To: <200205090919510568.03BA6562@sentry.24cl.com>
References:  <200205090919510568.03BA6562@sentry.24cl.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, May 09, 2002 at 09:19:51AM -0400, MikeM wrote:
> I'm running a web server that is lightly loaded, only about 15MB of
> bandwidth usage per day.  Ever since the recent kernel patches, I
> have been noticing that the memory usage is slowly, but surely,
> notching up.  The server has about 700MB of memory.  About a day
> after a reboot, the top command shows all except for 40MB being used,
> but I do not see any process that is using it.  About three days
> after a reboot, swap starts to be used, albeit only a little swap. 
> I've been running 4.5 on this server since it came out, and I never
> saw these symtpoms until the recent kernel patches.  How can I find
> out what is using all this memory?
> 
> Following are three snapshots:  (1)dmesg   (2)top command right after
> a reboot (3)top command after 5 days of running.

[snip dmesg]

> 
> 2)top command right after a reboot ***************************************
> last pid:   264;  load averages:  0.07,  0.07,  0.03
> up 0+00:03:00  10:19:07
> 31 processes:  1 running, 30 sleeping
> CPU states:  0.0% user,  0.0% nice,  0.0% system,  0.0% interrupt,  100% idle
> Mem: 11M Active, 10M Inact, 22M Wired, 32K Cache, 26M Buf, 707M Free
> Swap: 500M Total, 500M Free

[snip]

> 
> (3)top command after 5 days of running.************************************
> last pid: 12100;  load averages:  0.00,  0.00,  0.00
>  up  5+22:26:36  08:42:43
> 33 processes:  1 running, 32 sleeping
> CPU states:  0.0% user,  0.0% nice,  0.0% system,  0.0% interrupt,  100% idle
> Mem: 23M Active, 618M Inact, 69M Wired, 40M Cache, 86M Buf, 1328K Free
> Swap: 500M Total, 64K Used, 500M Free

[snip]


Looks normal to me.

The memory that is marked as 'Inactive' is also available for
allocation just as the 'Free' memory.
In practice you can just add together the 'Inactive' and the 'Free'
memory to get the total of free memory.

The 'Inactive' memory contains data that *can* be reused (such as the
code for programs that has recently been run) but that can also be
thrown away without further notice if necessary.


I wouldn't worry about swap being used either. FreeBSD tends to write
some things to swap before it is actually *necessary* to do it.



-- 
<Insert your favourite quote here.>
Erik Trulsson
ertr1013@student.uu.se

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




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