From owner-freebsd-hackers Wed Aug 29 9:57:23 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from smtp-2.enteract.com (smtp-2.enteract.com [207.229.143.4]) by hub.freebsd.org (Postfix) with ESMTP id C4BE737B403 for ; Wed, 29 Aug 2001 09:57:08 -0700 (PDT) (envelope-from dscheidt@tumbolia.com) Received: from shell-2.enteract.com (shell-2.enteract.com [207.229.143.41]) by smtp-2.enteract.com (Postfix) with ESMTP id 014617458; Wed, 29 Aug 2001 11:57:08 -0500 (CDT) Date: Wed, 29 Aug 2001 11:57:07 -0500 (CDT) From: David Scheidt X-X-Sender: To: Dan Cc: Subject: Re: memory + apache In-Reply-To: <20010828054406.Q99717-100000@gandalf.bravenet.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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