Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YX8bU-0003h2-GT for pgsql-performance@arkaria.postgresql.org; Sun, 15 Mar 2015 13:29:16 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YX8bT-0007Fg-NR for pgsql-performance@arkaria.postgresql.org; Sun, 15 Mar 2015 13:29:15 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YX8bM-00074Q-KZ for pgsql-performance@postgresql.org; Sun, 15 Mar 2015 13:29:08 +0000 Received: from mail-wi0-f178.google.com ([209.85.212.178]) by magus.postgresql.org with esmtps (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1YX8bI-0006Ka-NQ for pgsql-performance@postgresql.org; Sun, 15 Mar 2015 13:29:06 +0000 Received: by wibg7 with SMTP id g7so16186029wib.1 for ; Sun, 15 Mar 2015 06:29:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:organization:user-agent :mime-version:to:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=CqlIKBFt9j3AjDYXDtBN8ESAznoaa5/ke2Qa1w6i4pI=; b=HST6FlM6VDKNVpEtsshBM3TES7vwysRTMtqwK3mFZ7aYVIQMc1ABuCzjIpTDq30ZOl 3e7ODo5g7wq4bb7DOcMNyf0HA2PXj/vwrBBjoFZ2Tilqd/8UtTJq+PZJFx7VgjPN0ZCs Rv5aMrmkNkPiBlKJaeYXHvePThyeOowYIw7rkP4cVmKkz1UjGo4ef5gYkPqK0tV9QIan eNd+wK00fAJvbsTH1D8N556P5qI5aaU1Pxzp33N/xDAH8t8fe+sVu6uljEFtqlH1ZSCk aQUwMqmB+Uy2CEZjEDk2Vuos/+GJ3jvIcSKbApSdC51b/KdLL0StiPkq9mTT6BFEhwcv WXBQ== X-Gm-Message-State: ALoCoQlY8OhGlkPb4OAdxzvS/+sxTXKmXk8ECyQxlMS3ST2fKBOcxopGDGTv+ik6ML0tAsgDP/SVIqxncKpL4XRuQfTeYQ94E/D6oXPqKfgv0HNkxa5qJuYQ26hkbCYz4CNVBVK/luyXvA7aiQWEjr6yUmfJaO1hvM/jCqSOfB5YOGgHRrQdbLJK53dhFYxuNwGyIjMYLLY1 X-Received: by 10.181.13.82 with SMTP id ew18mr29574180wid.84.1426426143153; Sun, 15 Mar 2015 06:29:03 -0700 (PDT) Received: from [192.168.1.163] (ip-78-45-139-138.net.upcbroadband.cz. [78.45.139.138]) by mx.google.com with ESMTPSA id uo6sm11013254wjc.49.2015.03.15.06.29.01 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 15 Mar 2015 06:29:02 -0700 (PDT) Message-ID: <5505891B.6060800@2ndquadrant.com> Date: Sun, 15 Mar 2015 14:28:59 +0100 From: Tomas Vondra Organization: 2ndQuadrant User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: pgsql-performance@postgresql.org Subject: Re: MusicBrainz postgres performance issues References: <9E71CCBE-4CDF-482E-878D-6C16027B6283@musicbrainz.org> In-Reply-To: <9E71CCBE-4CDF-482E-878D-6C16027B6283@musicbrainz.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-performance Precedence: bulk Sender: pgsql-performance-owner@postgresql.org On 15.3.2015 13:07, Robert Kaye wrote: > >> If the load problem really is being caused by swapping when things >> really shouldn't be swapping, it could be a matter of adjusting your >> swappiness - what does cat /proc/sys/vm/swappiness show on your server? > > 0 > > We adjusted that too, but no effect. > > (I’ve updated the blog post with these two comments) IMHO setting swappiness to 0 is way too aggressive. Just set it to something like 10 - 20, that works better in my experience. >> There are other linux memory management things that can cause >> postgres and the server running it to throw fits like THP and zone >> reclaim. I don't have enough info about your system to say they are >> the cause either, but check out the many postings here and other >> places on the detrimental effect that those settings *can* have. >> That would at least give you another angle to investigate. > > If there are specific things you’d like to know, I’ve be happy to be a > human proxy. :) I'd start with vm.* configuration, so the output from this: # sysctl -a | grep '^vm.*' and possibly /proc/meminfo. I'm especially interested in the overcommit settings, because per the free output you provided there's ~16GB of free RAM. BTW what amounts of data are we talking about? How large is the database and how large is the active set? I also noticed you use kernel 3.2 - that's not the best kernel version for PostgreSQL - see [1] or [2] for example. [1] https://medium.com/postgresql-talk/benchmarking-postgresql-with-different-linux-kernel-versions-on-ubuntu-lts-e61d57b70dd4 [2] http://www.databasesoup.com/2014/09/why-you-need-to-avoid-linux-kernel-32.html -- Tomas Vondra http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance