Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Wl53h-0003zT-5p for pgsql-performance@arkaria.postgresql.org; Thu, 15 May 2014 23:27:29 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Wl53f-0004Kb-Tx for pgsql-performance@arkaria.postgresql.org; Thu, 15 May 2014 23:27:27 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Wl53e-0004KU-Ri for pgsql-performance@postgresql.org; Thu, 15 May 2014 23:27:26 +0000 Received: from smtp-out2.gransy.com ([77.78.126.49]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Wl53b-0001Kn-UW for pgsql-performance@postgresql.org; Thu, 15 May 2014 23:27:26 +0000 Received: from smtp-out.gransy.com (localhost [127.0.0.1]) by smtp-out2.gransy.com (Postfix) with ESMTP id 7C6773F0122 for ; Fri, 16 May 2014 01:27:22 +0200 (CEST) Received: from smtp.gransy.com (smtp.simplia.cz [77.78.126.20]) by smtp-out2.gransy.com (Postfix) with ESMTP id 121B73F011D for ; Fri, 16 May 2014 01:27:22 +0200 (CEST) Received: from [192.168.1.163] (ip-78-45-139-138.net.upcbroadband.cz [78.45.139.138]) (Authenticated sender: tv@fuzzy.cz) by smtp.gransy.com (Postfix) with ESMTPSA id 5047B19A0128 for ; Fri, 16 May 2014 01:27:21 +0200 (CEST) Message-ID: <53754D59.3060800@fuzzy.cz> Date: Fri, 16 May 2014 01:27:21 +0200 From: Tomas Vondra User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 MIME-Version: 1.0 To: pgsql-performance@postgresql.org Subject: Re: Stats collector constant I/O References: In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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 On 15.5.2014 06:18, Craig James wrote: > Day and night, the postgres stats collector process runs at about 20 > MB/sec output. vmstat shows this: > > $ vmstat 2 > procs -----------memory---------- ---swap-- -----io---- -system-- > ----cpu---- > r b swpd free buff cache si so bi bo in cs us sy > id wa > 0 0 55864 135740 123804 10712928 4 6 445 2642 0 0 5 > 1 92 2 > 1 0 55864 134820 123804 10713012 0 0 0 34880 540 338 1 > 1 98 0 > 0 0 55864 135820 123812 10712896 0 0 0 20980 545 422 1 > 1 98 0 > > iotop(1) shows that it's the stats collector, running at 20 MB/sec. Which PostgreSQL version are you running? And how many databases / objects (tables, indexes) are there? With versions up to 9.1, and large number of objects this is quite normal. The file size is proportional to the number of objects, and may get written quite frequently. The newer versions (since 9.2) have per-database file, which usually significantly decreases the load - both CPU and I/O. But if you have all the objects are in a single database, this is not going to help. I'd recommend moving the stat directory to tmpfs (i.e. memory-based filesystem) - this improves the I/O load, but it may still consume nontrivial amount of CPU time to read/write it. Tomas -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance