From owner-freebsd-questions@FreeBSD.ORG Mon May 27 09:57:16 2013 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id CC368D62 for ; Mon, 27 May 2013 09:57:16 +0000 (UTC) (envelope-from freebsd-questions@m.gmane.org) Received: from plane.gmane.org (plane.gmane.org [80.91.229.3]) by mx1.freebsd.org (Postfix) with ESMTP id 8FD9A132 for ; Mon, 27 May 2013 09:57:15 +0000 (UTC) Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1UguAt-0003C8-Cb for freebsd-questions@freebsd.org; Mon, 27 May 2013 11:57:11 +0200 Received: from 79-139-19-75.prenet.pl ([79.139.19.75]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 27 May 2013 11:57:07 +0200 Received: from jb.1234abcd by 79-139-19-75.prenet.pl with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 27 May 2013 11:57:07 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-questions@freebsd.org From: jb Subject: Re: Date: Mon, 27 May 2013 09:56:53 +0000 (UTC) Lines: 52 Message-ID: References: <1369558712.96152.YahooMailNeo@web165006.mail.bf1.yahoo.com> <1369644392.92027.YahooMailNeo@web165003.mail.bf1.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: sea.gmane.org User-Agent: Loom/3.14 (http://gmane.org/) X-Loom-IP: 79.139.19.75 (Mozilla/5.0 (X11; Linux i686; rv:21.0) Gecko/20100101 Firefox/21.0) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 May 2013 09:57:16 -0000 M. V. yahoo.com> writes: > ... > > Swapping by itself can decrease system reliability due to possible > > data corruption on swap disk or during two-way transfers, with > > > subsequent incorrect RAM and machine crash. > > > > But, swapping is also a symptom, not a problem. > > It is never a good idea to let it get to that point. > ... > > > http://blog.jcole.us/2010/09/28/mysql-swap-insanity-and-the-numa-architecture/ > > Very interesting point. > - do you think this could hurt my server's stability too? (most of its work is a noticeable amount of > packet-forwarding, and other network services, like firewall, dhcp server, ntp server, etc) > - if so, in what conditions? can I do something to prevent this? or should I just get rid of the swap partition? > > - does swap partition do any good for me at all? I mean if we even suppose nothing bad happens because of it, is > it worth risking to keep it? > > thank you. I wish there was a clear answer. There are two schools practised by server owners: - with swap space (partition or file) They see swapping as a symptom (of a problem, real or potential), and they treat it as a useful early warning device that gives them time to act. If prolonged or unattended, swapping may slow down the system and even end up in "thrashing", which is close to a terminal state. - no swap space They are "purists" - when they set up a server for a specific purpose they know it (requirements, apps run, resources assigned) and they are in charge. No "sissy" swapping, they do not trust those kernel algos, etc. They know that out-of-memory kernel killer may terminate a process (perhaps not the one they would expect) in case of memory crunch, but they think they can live with it by closely watching system and app state indicators to prevent that from happening. In the end it comes down to owner's preferences. If in doubt, try with and without swap space and see how it works in your particular environment. jb