Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id 9B9A78BCCF2 for ; Thu, 14 Jun 2012 12:16:14 -0300 (ADT) Received: from mailhost.elitecore.com ([203.88.135.194] helo=elitecore.com) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SfBmM-0005qe-HG for pgsql-performance@postgresql.org; Thu, 14 Jun 2012 15:16:13 +0000 Received: (qmail 29381 invoked from network); 14 Jun 2012 15:15:54 -0000 Received: from unknown (HELO [10.103.6.145]) (siddharth.shah@[10.103.6.145]) (envelope-sender ) by elitecore.com (qmail-ldap-1.03) with SMTP for ; 14 Jun 2012 15:15:54 -0000 Message-ID: <4FDA002E.2080605@elitecore.com> Date: Thu, 14 Jun 2012 20:45:58 +0530 From: Siddharth Shah User-Agent: Mozilla/5.0 (X11; Linux i686; rv:11.0) Gecko/20120327 Thunderbird/11.0.1 MIME-Version: 1.0 To: pgsql-performance@postgresql.org Subject: High CPU Usage Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Cyberoam-smtpxy-version: 1.0.6.3 X-Cyberoam-AV-Policy: Default Rule X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201206/102 X-Sequence-Number: 47128 Hello, I have around 1000 schema in database, Each schema having similar data structure with different data Each schema has few tables which never updates (Read only table) and other tables rewrites almost everyday so I prefer to TRUNCATE those tables and restores with new data Now facing issue on high CPU & IO on database primarily of Stats Collector & Vacuuming, size of statfile is almost 28MB and when I manually vacuum analyze complete database it takes almost 90 minutes though auto vacuum is configured Restoring dump on each schema may minor data variations Executing SQL statements on schema are few , Affecting less than 50 touple / day My Questions : Increasing Maintainace_Work_Mem improves auto / manual vacuum performance ? If it improves will it require more IO / CPU resource ? If I stops Stats Collector process & auto vaccuming & Execute manual vaccum based on schema restoration with major change what performance parameter I need to consider ? (Restoring data has vary few changes) Is Vacuuming & Stats required here for Metadata for improving performance ? (Table structures remain same) Any more on this which can help to reduce IO without affecting major performance regards, Siddharth