Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1aHFOj-00089E-Dg for pgsql-performance@arkaria.postgresql.org; Thu, 07 Jan 2016 18:34:57 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1aHFOi-0002Ih-P0 for pgsql-performance@arkaria.postgresql.org; Thu, 07 Jan 2016 18:34:56 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aHFOh-0002I5-N6 for pgsql-performance@postgresql.org; Thu, 07 Jan 2016 18:34:55 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aHFOf-00007E-4f for pgsql-performance@postgresql.org; Thu, 07 Jan 2016 18:34:54 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id u07IYpw6013017; Thu, 7 Jan 2016 13:34:51 -0500 From: Tom Lane To: Rick Otten cc: "pgsql-performance@postgresql.org" Subject: Re: Queries intermittently slow In-reply-to: References: <2A061A33-9E7C-44ED-A8A4-411FE128A1C9@motus.com> <25400.1452093555@sss.pgh.pa.us> <7EC59C76-D8FF-4880-8A50-9F1195D5D00E@motus.com> <26050.1452094727@sss.pgh.pa.us> <27999.1452096879@sss.pgh.pa.us> <28587.1452097950@sss.pgh.pa.us> <568DE640.5070508@BlueTreble.com> <13261.1452179944@sss.pgh.pa.us> <9E456947-7273-4D62-A5A1-D66F24052A00@yahoo.com> Comments: In-reply-to Rick Otten message dated "Thu, 07 Jan 2016 13:07:24 -0500" Date: Thu, 07 Jan 2016 13:34:51 -0500 Message-ID: <13016.1452191691@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) 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 Rick Otten writes: > On Thu, Jan 7, 2016 at 12:51 PM, Scott Rankin wrote: >> Winner! Both of those settings were set to always, and as soon as I >> turned them off, the query times smoothed right out. > Is this generally true for all PostgreSQL systems on Linux, or only for > specific use cases? It's fairly well established that the implementation of transparent huge pages in Linux kernels from the 2.6-or-so era sucks, and you're best off turning it off if you care about consistency of performance. I am not sure whether modern kernels have improved this area. I think you can get an idea of how big a problem you have by noting the accumulated runtime of the khugepaged daemon. (BTW, it would likely be a good thing to collect some current wisdom in this area and add it to section 17.4 of our docs.) regards, tom lane -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance