From owner-freebsd-questions@FreeBSD.ORG Tue May 3 19:18:37 2005 Return-Path: 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 7F7BE16A4DC for ; Tue, 3 May 2005 19:18:37 +0000 (GMT) Received: from pyro.cenergynetworks.com (pyro.cenergynetworks.com [196.30.191.122]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9502143D81 for ; Tue, 3 May 2005 19:18:36 +0000 (GMT) (envelope-from savage@savage.za.org) Received: from [127.0.0.1] (helo=pyro.cenergynetworks.com) by pyro.cenergynetworks.com with smtp (Exim 4.50) id 1DT2ub-000FLa-qJ; Tue, 03 May 2005 21:18:29 +0200 Received: from wblv-146-195-133.telkomadsl.co.za ([165.146.195.133] helo=netphobia) by pyro.cenergynetworks.com with esmtpa (Exim 4.50) id 1DT2ua-000FLT-qu; Tue, 03 May 2005 21:18:28 +0200 Message-ID: <007b01c55014$e304ae70$0a01a8c0@ops.cenergynetworks.com> From: "Chris Knipe" To: "Clifton Royston" References: <000601c5500e$85b4f3c0$0a01a8c0@ops.cenergynetworks.com> <20050503185614.GA17658@tikitechnologies.com> Date: Tue, 3 May 2005 21:18:27 +0200 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2527 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527 X-PMX-Version: 4.7.1.128075, Antispam-Engine: 2.0.3.0, Antispam-Data: 2005.3.10.17 cc: freebsd-questions@freebsd.org Subject: Re: swap space X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Chris Knipe List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 May 2005 19:18:37 -0000 >> We made the mistake however of just allocating 512MB swap as we did not >> know accurately at the time of installation what the resouce requires are >> going to be (especially not that it would be this high). > > A traditional rule of thumb is to have 1x - 2x the total RAM size in > swap space. This assures that you can do a crash dump and that you can > deal with peak load of 2x the normal maximum number of processes by > swapping them out. Beyond that, you are probably better off with the > system just refusing to fork more processes or allocate them memory. i.e. 4GB Ram, approx 8GB Swap? In that case we'll need to install a secondary HDD in any case. The current drive is already partitioned and what not, so reinstall isn't a option. Having 2 or more swap partitions should also not be a big deal? And this might be a extremely stupid question, but both are used at the same time right? Some of our other high end perl systems use allot of memory as well. We normally use stuff like SYSVSHM, SYSVMSG and SYSVSEM (Plus allot of parameters / options for it which I do not currently have with me unfortunately). Me personally, are not 100% on what the drawbacks or benefits are, but would this make a difference? In some of our production environments, we have applications terminating within seconds of reaching peak load without SYSV + "magic" options in the kernel. This is not because of bad code, but because of severe load (thousands of concurrent connections). The server in question right now is basically a high end anti-spam / anti-virus solution (which by nature is extremely resource intensive - look at big SA installations for example). We are already running with MAXUSERS 512 and NMBCLUSTERS=65535 as "advanced" features in the kernel currently. I suppose I should recompile and add SYSV (after I got the "magic" options again). Those two options are also so far the only options I found to "tune" for a high performance FBSD config... If anyone have additional resources, please feel free to share... :) I'm talking under correction, but I believe the "magic" options to the SYSV stuff is related to specifying the ammounts of ram to use, etc. Thanks for all the answers and suggestions!!! -- Chris.