From owner-freebsd-questions@freebsd.org Fri Sep 29 10:08:42 2017 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 67C0BE28F87 for ; Fri, 29 Sep 2017 10:08:42 +0000 (UTC) (envelope-from 4250.10.freebsd-questions=freebsd.org@email-od.com) Received: from bca5.email-od.com (bca5.email-od.com [207.246.239.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 07A6AF7F for ; Fri, 29 Sep 2017 10:08:40 +0000 (UTC) (envelope-from 4250.10.freebsd-questions=freebsd.org@email-od.com) DKIM-Signature: v=1; a=rsa-sha256; d=email-od.com;i=@email-od.com;s=dkim; c=relaxed/relaxed; q=dns/txt; t=1506679721; x=1509271721; h=x-thread-info:date:from:to:subject:message-id:in-reply-to:references:mime-version:content-type:content-transfer-encoding; bh=74fIsbikya1tuyKnBekH3Xd5LsolGtivw03jHk+MZDA=; b=YgJtCDpdzAK4e6bjX7GeIqjqZlzHWGGwK6be73rOdH4zWQ7O7wn9siIqiu+uJPni6boG3MosxDujK7mmiB3qcJtnQd8OkmVRY/iJrJr3SAHlAgrgMUlFcgQTrpth43TLIpi9+192E3t1bkAM1alabkwkvjba1PjV2KS/6DO6k6o= X-Thread-Info: NDI1MC4xMi5lMzAwMDAwMDAzNTBjMS5mcmVlYnNkLXF1ZXN0aW9ucz1mcmVlYnNkLm9yZw== Received: from r3.us-west-2a.aws.in.socketlabs.com (r3.us-west-2a.aws.in.socketlabs.com [54.187.94.11]) by bca2.email-od.com with ESMTP(version=Tls12 cipher=Aes256 bits=256); Fri, 29 Sep 2017 05:08:17 -0400 Received: from smtp.lan.sohara.org (EMTPY [89.127.62.20]) by r3.us-west-2a.aws.in.socketlabs.com with ESMTP(version=Tls12 cipher=Aes256 bits=256); Fri, 29 Sep 2017 05:08:17 -0400 Received: from [192.168.63.1] (helo=steve.lan.sohara.org) by smtp.lan.sohara.org with smtp (Exim 4.89 (FreeBSD)) (envelope-from ) id 1dxrHK-0002oQ-6L for freebsd-questions@freebsd.org; Fri, 29 Sep 2017 09:08:14 +0000 Date: Fri, 29 Sep 2017 10:08:14 +0100 From: Steve O'Hara-Smith To: freebsd-questions@freebsd.org Subject: Re: A few questions about FreeBSD Message-Id: <20170929100814.7b2e0d46dedd603240f14d86@sohara.org> In-Reply-To: References: X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.31; amd64-portbld-freebsd11.0) X-Clacks-Overhead: "GNU Terry Pratchett" Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Sep 2017 10:08:42 -0000 On Fri, 29 Sep 2017 05:37:10 +0000 Manish Jain wrote: > 1) As a desktop system, is it needed to have a swap partition at all ? > My system is AMD Athlon X2 270 with 8 GB DDR3 RAM and no swap, running > KDE4. The box works wonderfully for me. > > Is swap advisable for 8 GB ? 4 GB ? 2GB RAM ? Short answer yes. Long answer - these days you should size your system so that it doesn't need swap under normal or even common abnormal conditions because the disparity between memory speed and swap is dramatic even with SSDs. Usually when there is swap the OS will make use of it for long unused pages which frees a little more memory for active work. However it is the behaviour under abnormal conditions that makes having swap desirable. Without swap the first thing a runaway memory eater causes is random process killings, with swap the first symptom is things getting slow but still working so you (as sysadmin) have a chance to do something constructive about the problem. Graceful degradation is a good thing to have. Also memory is cheap but disc (or SSD) space even cheaper allocating a few gigs to swap is practically free. -- Steve O'Hara-Smith