From owner-freebsd-questions@FreeBSD.ORG Sun May 26 12:37:15 2013 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 6E9C2A97 for ; Sun, 26 May 2013 12:37:15 +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 33C3B6A4 for ; Sun, 26 May 2013 12:37:15 +0000 (UTC) Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1UgaC2-0002SB-Qm for freebsd-questions@freebsd.org; Sun, 26 May 2013 14:37:03 +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 ; Sun, 26 May 2013 14:36:58 +0200 Received: from jb.1234abcd by 79-139-19-75.prenet.pl with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 26 May 2013 14:36:58 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-questions@freebsd.org From: jb Subject: Re: "swap" partition leads to instability? Date: Sun, 26 May 2013 12:36:42 +0000 (UTC) Lines: 37 Message-ID: References: <1369558712.96152.YahooMailNeo@web165006.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: Sun, 26 May 2013 12:37:15 -0000 M. V. yahoo.com> writes: > > hi everyone, > > I have a 24/7 network server/gateway with FreeBSD-8.2 on a SSD drive. it's partitioned as normal (/ , /tmp, > /var , /usr and swap) for a long time now. But recently I heard from a FreeBSD expert that I shouldn't have > swap partition for my server, and having swap partition could make my server unstable. this was so strange > for me, and I searched a lot but couldn't find a reason for this claim. > > so my question is simple: > - could having a "swap" partition, be a bad thing for my FreeBSD server? and if so, why and in what conditions? > > Cheers! Hi, I think your FB expert was up to something. I bet he spoke out of experience. 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. Badly written, architected, or tuned server app or system are the reason. Think of RDBMS/SQL server processing real-time on-line transactions and how much it goes into setting it up properly for a heavy use. On a smaller scale, consider this example: http://blog.jcole.us/2010/09/28/mysql-swap-insanity-and-the-numa-architecture/ jb