From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 53D89138330 for ; Sat, 8 Oct 2016 12:10:04 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 5B8AF21C06C; Sat, 8 Oct 2016 12:09:57 +0000 (UTC) Received: from mail-qk0-f177.google.com (mail-qk0-f177.google.com [209.85.220.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 12436E0BD2 for ; Sat, 8 Oct 2016 12:09:57 +0000 (UTC) Received: by mail-qk0-f177.google.com with SMTP id f128so44012521qkb.1 for ; Sat, 08 Oct 2016 05:09:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=nT1L1dZ+Iua9fBBQvEUctSgcUnb/2VsrU57doMP0fvE=; b=jo0MvpUvhCmLcuFOi6iKUVoMpETekA1ftis6THi/8m6F+FYlZ2euRNi6XPh5E9z0MC uiDnrp11fyUdl6jQ57bQ1UO1vcm8G12P9f2y7lFJU7WvFQemSKzU9FqJK0q40Vi5sfJ3 8nMKrSX6XphDeDnB8CR8a8bu1uE6gU/mGQnFkAxNRsgfuyFlMyg3UiKCcnGSqsbD9NIh dKY94LvRaXRFhVlMBT6eQcm3z7mvAqQTrG7I2HkjppMLXTmyvHPVDw8vtxG7W6HD8R7u ueFG7fXBVpd2Q6rlhtgODJnmtR8EbupObNVqB8RzT+1h0+H1t48D6Z/su8bkbswYBaCb /9FA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=nT1L1dZ+Iua9fBBQvEUctSgcUnb/2VsrU57doMP0fvE=; b=hfAshYxLHQ9iHCruDKwMYfRum7Hexa7xVt4+LxbWFfx8ZsnJAhYwvSFQbYkzEtUm7O qAZcPCGF2AQG39V/yFKyD08iPV7nV2Dwxr7VFW4JhujEkK9guq7cJT/bUE+ZzckU6MIj Dfgn9yaNoBh8Mkhl+aZ8Zx0wCp7ahzFFc120OdXRKEcNCJejdjhxRHISSO9x4hKBjsI5 Klgp3fDPPesw2v+W6C3cYtpum5uVocHcXSHWRIrvspDaz/xV+bhuuYaMPGWHKqs8IhRM OWzvj4Kx1DKaLaq21RV4hsL+9YNrAtACVL66sQyCuzsL57z6Z4BbZje64ZydmRtvBiUt e1yA== X-Gm-Message-State: AA6/9RnxMc0c0nurxzKm1iozv/TdWleCUPBFx7zT1SInn3MAAAScnVTATCAVwIlnQCBEejoDUUYnuLUmk7vUGg== X-Received: by 10.55.198.85 with SMTP id b82mr22511760qkj.171.1475928586540; Sat, 08 Oct 2016 05:09:46 -0700 (PDT) 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.140.38.133 with HTTP; Sat, 8 Oct 2016 05:09:46 -0700 (PDT) In-Reply-To: References: <15716586.VkCrMUdRYY@serenity> From: Grant Date: Sat, 8 Oct 2016 05:09:46 -0700 Message-ID: Subject: Re: [gentoo-user] Strive for zero swap usage? To: Gentoo mailing list Content-Type: text/plain; charset=UTF-8 X-Archives-Salt: c023a970-10d7-484b-9b24-9064e5ba8231 X-Archives-Hash: 21910b85b2d51fe185bf154cb7c8dd71 >> "Swapping excessively" is inherently a use-case-specific problem, but it comes >> down to two questions: >> >> * Do you notice your system spending time in iowait swapping data in while >> you're waiting on it? >> * Do you notice your system spending time in iowait swapping data out while >> you're waiting on it? (I.e. as it tries to make room for new memory >> allocations) I just ran sar from the sysstat package and this looks like a lot of iowait to me: 00:00:02 CPU %user %nice %system %iowait %steal %idle 00:10:01 all 48.11 0.86 0.83 1.38 0.00 48.82 00:20:01 all 43.98 0.85 0.64 0.54 0.00 53.99 00:30:01 all 48.17 0.90 1.04 0.82 0.00 49.07 00:40:01 all 48.69 0.85 1.06 0.48 0.00 48.92 00:50:01 all 49.74 0.87 0.58 0.49 0.00 48.33 01:00:01 all 46.21 0.85 0.48 0.41 0.00 52.05 01:10:01 all 48.10 0.86 0.79 0.61 0.00 49.64 01:20:01 all 54.00 0.86 0.60 0.65 0.00 43.89 01:30:01 all 45.81 0.85 0.49 0.49 0.00 52.36 01:40:01 all 52.04 0.86 0.56 0.56 0.00 45.99 01:50:01 all 48.49 0.85 0.52 0.47 0.00 49.66 02:00:01 all 43.18 0.85 0.48 0.50 0.00 54.99 02:10:01 all 45.48 1.12 1.74 20.65 0.00 31.01 02:20:02 all 46.20 10.22 1.97 9.70 0.00 31.90 02:30:01 all 64.93 0.88 1.98 12.54 0.00 19.67 02:40:01 all 46.24 0.86 0.93 5.08 0.00 46.90 02:50:01 all 43.49 0.85 0.45 0.60 0.00 54.60 03:00:01 all 43.28 0.85 0.45 0.45 0.00 54.97 03:10:01 all 39.58 0.85 0.81 5.22 0.00 53.54 03:20:01 all 42.04 0.91 0.72 3.97 0.00 52.35 03:30:01 all 46.60 0.85 0.74 0.49 0.00 51.31 03:40:01 all 47.30 0.85 0.82 0.82 0.00 50.22 03:50:01 all 49.43 0.85 0.84 0.59 0.00 48.29 04:00:01 all 45.50 0.85 1.02 0.71 0.00 51.91 04:10:01 all 44.35 0.86 1.13 2.32 0.00 51.35 04:20:01 all 44.29 0.85 1.17 4.91 0.00 48.77 04:30:01 all 42.69 0.85 0.47 1.41 0.00 54.59 04:40:01 all 48.22 0.85 1.00 7.23 0.00 42.70 04:50:01 all 44.70 0.86 0.49 1.49 0.00 52.45 Average: all 46.92 1.19 0.86 2.95 0.00 48.08 > If I do find a correlation between iowait and web server response > times, should I just decrease memory usage until the problem goes > away? > > What I do notice is that my web server's response time increases along > with the swapping peaks in the graph I posted before. > > >> There are ways other than swap to find yourself in iowait, though. I wonder >> what might a good metric of combining iowait numbers with swap event counts. >> Swap events without iowait are likely imperceptible. I do see a clear correlation between iowait above and swap in on the munin graph. Is that enough to conclude that swap activity is slowing down the system and I need to reduce memory usage or perhaps tune swappiness? - Grant