From owner-freebsd-questions@FreeBSD.ORG Tue Jun 6 14:23:22 2006 Return-Path: X-Original-To: questions@freebsd.org Delivered-To: freebsd-questions@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0237116A4A9 for ; Tue, 6 Jun 2006 14:23:22 +0000 (UTC) (envelope-from wmoran@collaborativefusion.com) Received: from mx00.pub.collaborativefusion.com (mx00.pub.collaborativefusion.com [206.210.89.199]) by mx1.FreeBSD.org (Postfix) with ESMTP id 50FDD43D45 for ; Tue, 6 Jun 2006 14:23:20 +0000 (GMT) (envelope-from wmoran@collaborativefusion.com) Received: from collaborativefusion.com (mx01.pub.collaborativefusion.com [206.210.89.201]) (TLS: TLSv1/SSLv3,256bits,AES256-SHA) by wingspan with esmtp; Tue, 06 Jun 2006 10:23:19 -0400 id 00056413.44858FD7.00014F30 Received: from Internal Mail-Server by mx01 (envelope-from wmoran@collaborativefusion.com) with AES256-SHA encrypted SMTP; 6 Jun 2006 10:16:57 -0400 Date: Tue, 6 Jun 2006 10:23:18 -0400 From: Bill Moran To: Paul Schmehl Message-Id: <20060606102318.6b4da83c.wmoran@collaborativefusion.com> In-Reply-To: <44858D82.80500@utdallas.edu> References: <060620061251.3465.44857A490003444500000D89220076106408099A0E0B0B0703D20D010D@comcast.net> <1149598670.44857bce3f0b0@196.22.132.16> <44858D82.80500@utdallas.edu> Organization: Collaborative Fusion X-Mailer: Sylpheed version 2.2.5 (GTK+ 2.8.18; i386-portbld-freebsd6.1) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: questions@FreeBSD.org Subject: Re: Running out of swap space???? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jun 2006 14:23:27 -0000 On Tue, 06 Jun 2006 09:13:22 -0500 Paul Schmehl wrote: > cknipe@savage.za.org wrote: > > Quoting bob.middaugh@comcast.net: > > > >>> -------------- Original message ---------------------- > >>> From: pauls@utdallas.edu > >>> +pid 37308 (mysqld), uid 88, was killed: out of swap space > >>> +swap_pager: out of swap space > >>> +swap_pager_getswapspace(1): failed > >> > >> If you kill mysql server, does the swap space free up? Are there any known > >> issues between the version of MySQL that you're running and FreeBSD 6.0? > > > > MySQL not having a properly tuned config file for the system it runs on? It is > > known to consume vast amounts of resources if not properly configured... > > > I wrote a one line shell script that runs swapinfo -h and cron'd it to > run once an hour. Each hour the amount of swap space being used has > increased by 100 to 200 MB. Eventually swap is exhausted and the system > kills a binary. (It's not just mysql. Other things are being killed as > well.) This is typical. I believe that the process killed is the one swapped out the longest, or maybe it's random? Either way, the one killed usually isn't the one using all the memory. > What would cause swap to increase steadily like that? Something not > releasing swap when it's no longer needed? One of two things: 1) You have misconfigured an application to think it has _way_ more memory available than it does, so it just keeps using more and more memory, because you told it that it was OK to do so. 2) You are running an application with a memory leak. Meaning: it allocates memory, then loses track of said allocation and re-allocates it later. Since it lost track, it's no longer using the memory, but can't tell the kernel to release the memory for other applications to use either. This is a bug in the application, not FreeBSD. If you provide the full output of top to the list, I'm sure some problem will jump out for someone on the list. Wait till the system is close to having no swap, then do "top > somefile" and paste the file into your mailer. -- Bill Moran Collaborative Fusion Inc.