Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 29 Aug 2001 11:57:07 -0500 (CDT)
From:      David Scheidt <dscheidt@tumbolia.com>
To:        Dan <dphoenix@bravenet.com>
Cc:        <freebsd-hackers@freebsd.org>
Subject:   Re: memory + apache
Message-ID:  <Pine.BSF.4.32L2.0108291138210.42975-100000@shell-2.enteract.com>
In-Reply-To: <20010828054406.Q99717-100000@gandalf.bravenet.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 28 Aug 2001, Dan wrote:

:
:i am seeing problems where apache is running into swap at times.
:When all is said and done...i see alot of available memory from top
:and alot still stuck in swap. Restarting apache at that point clears the
:swap space right out and memory is used properly again.

Is there an actual performance hit here?  Stuff that gets paged out is going
to stay there until it's used.   On a system that's not normally pressed for
memory may well mean never.  What you've described here isn't a problem.

:
:These seem to be short bursting peeks which i can;t get to in time to run
:vmstat on. When i login i never see any paging or swapping going on maybe

Then leave it running.

$ while true
do
date >> logfile
vmstat -c 3600 -w 1 | tee -a logfile
done

will put the date in your logfile every hour, and vmstat's output both to
the screen and the logfile everysecond.  Next time this happens, look at the
logfile, and I'll bet you find you really are running out of memory.  Figure
out when it starts, and look at the apache logs, and you may be able to
figure out what's causing it.  It might be unusually heavy load, or memory
hogging script, or something like that.  It's also possible it's something
other than the webserver, like a cronjob that does something ugly, or an
interactive user.

:2 blocked processes waiting to run seems the average under the b column
:in vmstat. Another thing to note is cpu sky rockets when those burts
:happen. How can a process go into swap really badly yet seem to not use
:all available memory first. Disk I/O does not seem like a factor. What I

Do you have any evidence that there's free memory when the box starts
swapping?  Free memory after the memory shortage has gone away is not
evidence that there was memory available when it was swapping.  The VM
system is smarter than you are.  Don't try and tune it before you know
what's wrong.

-- 
dscheidt@tumbolia.com
Bipedalism is only a fad.


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?Pine.BSF.4.32L2.0108291138210.42975-100000>