Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id DE318B5F39C for ; Wed, 8 Jun 2011 01:19:36 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 82260-04 for ; Wed, 8 Jun 2011 04:19:29 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sam.nabble.com (sam.nabble.com [216.139.236.26]) by mail.postgresql.org (Postfix) with ESMTP id 06014B5F399 for ; Wed, 8 Jun 2011 01:19:29 -0300 (ADT) Received: from [192.168.236.26] (helo=sam.nabble.com) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1QUAEq-0000OV-85 for pgsql-performance@postgresql.org; Tue, 07 Jun 2011 21:19:28 -0700 Date: Tue, 7 Jun 2011 21:19:28 -0700 (PDT) From: bakkiya To: pgsql-performance@postgresql.org Message-ID: <1307506768241-4465765.post@n5.nabble.com> Subject: 100% CPU Utilization when we run queries. MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.766 tagged_above=-10 required=5 tests=BAYES_00=-1.9, FREEMAIL_FROM=0.001, RFC_ABUSE_POST=0.001, T_TO_NO_BRKTS_FREEMAIL=0.01, URI_HEX=1.122 X-Spam-Level: X-Archive-Number: 201106/51 X-Sequence-Number: 43984 We have a postgresql 8.3.8 DB which consumes 100% of the CPU whenever we run any query. We got vmstat output Machine details are below: # /usr/bin/lscpu Architecture: x86_64 CPU(s): 2 Thread(s) per core: 1 Core(s) per socket: 1 CPU socket(s): 2 NUM node(s): 1 Vendor ID: GenuineIntel CPU family: 6 Model: 26 Stepping: 4 CPU MHz: 2666.761 L1d cache: 32K L1i cache: 32K L2 cache: 256K L3 cache: 12288K Memory: Total Used Free Shared Buffers Cached Mem: 3928240 3889552 38688 0 26992 2517012 Swap: 2097144 312208 1784936 # /bin/uname -a Linux wdhsen01 2.6.32.12-0.7-default #1 SMP 2010-05-20 11:14:20 +0200 x86_64 x86_64 x86_64 GNU/Linux . Postgresql Memory parameters: shared_buffers = 1GB work_mem = 128MB maintenance_work_mem = 64MB I have attached the o/p of vmstat command alsp. Can you please help us in tuning any other parameters. http://postgresql.1045698.n5.nabble.com/file/n4465765/untitled.bmp -- View this message in context: http://postgresql.1045698.n5.nabble.com/100-CPU-Utilization-when-we-run-queries-tp4465765p4465765.html Sent from the PostgreSQL - performance mailing list archive at Nabble.com.