Received: from makus.postgresql.org ([98.129.198.125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1T9TBc-0007Gq-JG for pgsql-performance@postgresql.org; Thu, 06 Sep 2012 03:55:24 +0000 Received: from moutng.kundenserver.de ([212.227.17.9]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1T9TBb-0005uq-4b for pgsql-performance@postgresql.org; Thu, 06 Sep 2012 03:55:23 +0000 Received: from [192.168.1.6] (mail.highperformancepostgresql.com [71.179.240.8]) by mrelayeu.kundenserver.de (node=mreu1) with ESMTP (Nemesis) id 0Lxru4-1TfaQP45bA-015qPL; Thu, 06 Sep 2012 05:55:22 +0200 Message-ID: <50481EA9.6060904@2ndQuadrant.com> Date: Wed, 05 Sep 2012 23:55:21 -0400 From: Greg Smith User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.24) Gecko/20111120 Icedove/3.1.16 MIME-Version: 1.0 To: pgsql-performance@postgresql.org Subject: Re: exponential performance decrease in ISD transaction References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V02:K0:cygWGoFuCS/eVTAFyzCjDHXVi2lZWGos1KGuRy/6Zh2 rBwOBHdPvL2iwbXWzb9sMbDPsM2+iQqWA4ept/xz1U+GYHlDgq yY0aAJGYcxpiRIDJi14PNC5V3AONZGjxp6j91cYpAkTyxzI356 GXDkeA4gvhbnDOGFsa3Kn7o7xTuhRt29LIkWKLRbAcw5U+rtRV ADqPu6lztKHGsbcSzOk2AI87ZlVAQQn7xdnF4J/nAjri5hFw28 7lJ5e6qOViqeaPh0JuF7RMqrxzT89a/GQnSejjt11E18MJRog0 g8TLKcpA4Xi8j2H3FeX3vGzIeg24booBB0B5ho+V97RfGGOmJE TBgu22w6C/GT3AlYbjWU= X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201209/14 X-Sequence-Number: 47760 On 09/03/2012 01:27 PM, Jeff Janes wrote: > In any case, the behavior you report is exactly would would be > expected if autovacuum is not running. The config file you posted > shows autovac is turned on, but I suspect that is not the config file > actually being used by the running server. It's also important to note that: 1) autovacuum doesn't kick in until a moderate number of changes have been made. Having it turned on doesn't mean it runs continuously. The table can accumulate a lot of dead junk before autovacuum decides to clean things up. 2) When autovacuum *does* start, that can be a source of slowdowns itself. I suspect that some level of table cleanup issue is here. I would also bet that the performance seen initially is inflated because Linux's write cache is absorbing writes at the beginning. The first few hundred megabytes or possibly more you write to the database don't wait for physical I/O at all. Once that cache fills, though, performance drops hard. Most benchmarks like this will start out really fast, then drop off dramatically once the write cache is full, and real-world disk performance limits progress. In those cases, the slower performance after things have been running a while is actually the real sustainable speed of the server. The much faster ones may only be possible when the write cache is relatively empty, which makes them representative more of burst performance. A look at the "Dirty:" line in /proc/meminfo as the test runs will give you an idea if write cache filling is actually an issue here. If that number just keeps going up and speeds keep on dropping, that's at least one cause here. This could easily be both that and an autovacuum related too though. -- Greg Smith 2ndQuadrant US greg@2ndQuadrant.com Baltimore, MD PostgreSQL Training, Services, and 24x7 Support www.2ndQuadrant.com