From owner-freebsd-hackers@FreeBSD.ORG Thu Jul 31 00:15:26 2014 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1B1C53E9 for ; Thu, 31 Jul 2014 00:15:26 +0000 (UTC) Received: from mail-wi0-x22a.google.com (mail-wi0-x22a.google.com [IPv6:2a00:1450:400c:c05::22a]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A73B9289C for ; Thu, 31 Jul 2014 00:15:25 +0000 (UTC) Received: by mail-wi0-f170.google.com with SMTP id f8so455978wiw.5 for ; Wed, 30 Jul 2014 17:15:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=date:from:to:subject:message-id:in-reply-to:references:mime-version :content-type:content-transfer-encoding; bh=nzCMT3NDHtmn99XHotv/dZvV0gP/efnl89yuZlMcSYU=; b=xeh/Jn0hkjqDgDt4Gs7ahRuggNFIX4j3DThkL+NA65nxX8q5rbtsQ6ngCFDQDrmcIL D2IPOWXOFTfUF0yl3ZQo+Da7OMt3iOiEVXaHzl0IoJhhGcQW2EPqdmdj9W5oQKIqw4CI NnJiBWMO3MRngKTc5uGubn+W4RESQV7y1sDHo1HD/aZDO236CnvvclL7nrxemS6+M73z ZSRlIHMAx4IacuU2SN/xBVrmpKVO+iDaWJJ2ZspiUR+2HS7lHHv9aPuKhVg/Edzrj8wj +mRYKWvf6Eolk4r8gpt0UgCjuZwPe3Y/2cUgsSJBLRgY18GF6A5iAHDd0pPpRFgfLEYp V+kA== X-Received: by 10.180.183.165 with SMTP id en5mr7501302wic.41.1406765723633; Wed, 30 Jul 2014 17:15:23 -0700 (PDT) Received: from gumby.homeunix.com ([94.195.197.120]) by mx.google.com with ESMTPSA id au7sm9302064wjc.41.2014.07.30.17.15.21 for (version=SSLv3 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 30 Jul 2014 17:15:22 -0700 (PDT) Date: Thu, 31 Jul 2014 01:15:16 +0100 From: RW To: freebsd-hackers@freebsd.org Subject: Re: FreeBSD 10 swapping Idle processes :/ Message-ID: <20140731011516.21b1261d@gumby.homeunix.com> In-Reply-To: <53D97C71.3050806@freebsd.org> References: <53D962A7.5090105@gmail.com> <53D97C71.3050806@freebsd.org> X-Mailer: Claws Mail 3.10.1 (GTK+ 2.24.22; amd64-portbld-freebsd10.0) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Jul 2014 00:15:26 -0000 On Wed, 30 Jul 2014 19:14:57 -0400 Allan Jude wrote: > On 2014-07-30 17:24, Adi wrote: > > Hello > > > > i7-4770 , 32 GB RAM, FreeBSD 10.0-RELEASE-p7, AMD64, UFS2 > > > > Problem: Many idle processes is swapping :( > > > > That looks odd, the output of top shows 0 swap usage, but also 0 > resident memory for most of the processes... > My guess would be that these processes have had all their pages deactivated to accelerate their paging-out. Linux uses the terms swapping and paging interchangeably to mean paging. In FreeBSD swapping refers to the management of paging at the process level - in some cases it's more efficient to page-out all the memory from some idle or less active processes. I did think swapping was only used under abnormal memory shortage, but I just reproduced this by dd'ing a 16 GB file to tmpfs (with 16GB RAM, and 16GB swap). Some processes were marked as swapped before any actual paging occurred.