From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id C7F1A138010 for ; Tue, 4 Sep 2012 16:12:52 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 71500E0417; Tue, 4 Sep 2012 16:12:32 +0000 (UTC) Received: from mail-bk0-f53.google.com (mail-bk0-f53.google.com [209.85.214.53]) by pigeon.gentoo.org (Postfix) with ESMTP id 51AEFE006E for ; Tue, 4 Sep 2012 16:10:49 +0000 (UTC) Received: by bkwj4 with SMTP id j4so2863677bkw.40 for ; Tue, 04 Sep 2012 09:10:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=G4NonTTJ3tUjgNvSNDzkByJt6NvICupMg6zCyi6i93Q=; b=CWuCrrC0CQp/+kdFm5WbW/fkACKeOBpcX/1ZNZnIFIlDUNoVxuHGAZAefeqOGDay7p zFKUeZgrFt05vcN4y+2IZy3NslLvoLNHXqxVEWWReadsap9Y+5/HJQGzcyUgaPWKODWl U2SZgymglm+8glPVC+AfqAGZmhS7Lvz+ZKxl+yRgo+B9N+2AvBAU/2yjMq/xeyVpC1EG QACgGqzvq9MGQk/4gimOWDfDizVwL6KfDOeNm29hN1cGNTflrbvTfPtZoQwWp8lFR/Cs K6xX7lkz/ckmzSd0DLX7pYOak/HPe4bgbP5wQkME9H4ZA9684eUyy4M5yimAK/vKLC+W cCgg== Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Received: by 10.205.134.139 with SMTP id ic11mr8575255bkc.40.1346775049147; Tue, 04 Sep 2012 09:10:49 -0700 (PDT) Received: by 10.204.112.211 with HTTP; Tue, 4 Sep 2012 09:10:49 -0700 (PDT) In-Reply-To: <50462402.6030102@gmail.com> References: <504518A3.7000207@binarywings.net> <50460D03.6070808@gmail.com> <20120904171426.7d2dab68@khamul.example.com> <50462402.6030102@gmail.com> Date: Tue, 4 Sep 2012 12:10:49 -0400 Message-ID: Subject: Re: [gentoo-user] dm-crypt + ext4 = where will the journal go? From: Michael Mol To: gentoo-user@lists.gentoo.org Content-Type: text/plain; charset=UTF-8 X-Archives-Salt: 0ec1215c-15ea-4927-adf1-53f2278a7518 X-Archives-Hash: 74911a6ca6875371e7ab8cd711952076 On Tue, Sep 4, 2012 at 11:53 AM, Dale wrote: > Alan McKinnon wrote: >> On Tue, 04 Sep 2012 09:15:31 -0500 >> Dale wrote: >> >>> I think the new method for determining swap is to use what makes sense >>> and not the old rule of 'twice the ram'. >> Alan's new rule of swap is: >> >> If you ever use swap as swap at all, find out how your machine is >> misconfigured. When my 16G is "not enough" anymore, something is badly >> wrong and it isn't not enough RAM and I need swap to wiggle around >> in :-) >> >> I think the 2 x RAM rule stopped being applicable when the average >> machine got to more than 16M. Some old memes are like zombies - very >> hard to kill. >> >> This laptop has a "swap" partition, but it's not for swap, it's for >> hibernate. And I never use it, it takes longer to come out of hibernate >> than to just boot up from cold! These days I just suspend. >> >> None of this changes the fact that the kernel still does get upset when >> it has no swap at all (even just a little bit). But that doesn't mean >> we should still be using it as full-blown swap. >> >> >> > > > Yup. I have swap but I have it set to where it won't use it unless it > is REALLY bad. I have swappiness set to like 20 or something. It will > fill up my ram with cache and such but it rarely uses more than a few > hundred kilobytes of swap. When I see it using that, I usually kill > swap and add it back. I just don't like a machine with 16Gbs of ram > using swap at all. I have thought about setting it to 10. Maybe then > it will leave it alone until it really hits the fan. ;-) Set swappiness to 0. Swap will be used if and only if absolutely necessary. Also, you're unlikely to notice a performance hit if the amount of data in swap is only a few tens of megabytes; the seek-and-read rate of even spinning platter disks should tend to cause that bit of latency to get lost in the normal noise of library linkage, data file loading, etc. (heck, it might even still be in the drive cache) The performance hit is there, but probably not subjectively noticeable. > > That said, I did roll over one night and notice that the CPU was going > ape. I got up and into my chair to notice it was using almost all the > ram and was starting to use a bit of swap. I switched to a console, ran > htop and noticed that some KDE process was using about ~15.5Gbs of ram. > It was crazy to see. I couldn't get it to die with kill -15 so I did a > kill -9. I guess it had to know I really wanted it dead. It has not > happened since so no clue on why it did that. Heck, it ran the same > version of KDE for a good while and still didn't do it. Cosmic rays > from Mars I guess. > > I would recommend at least 500Mbs or so of swap regardless of ram tho. > Some swap is a good idea. Just try not to use it since it is dog slow. Indeed. > If you are using hibernate/suspend thingys then that is different. > Isn't that when it has to be at least as much swap as you have ram? Yes. -- :wq