Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 5798E6325BF for ; Fri, 25 Jun 2010 08:28:48 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 84782-03 for ; Fri, 25 Jun 2010 11:28:37 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wy0-f174.google.com (mail-wy0-f174.google.com [74.125.82.174]) by mail.postgresql.org (Postfix) with ESMTP id 10FD8632C23 for ; Fri, 25 Jun 2010 08:28:38 -0300 (ADT) Received: by wyb38 with SMTP id 38so113908wyb.19 for ; Fri, 25 Jun 2010 04:28:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=PeYjKOujUqH34PqPx5jnnd2k4waWdOsAymLT6yMIxXo=; b=CsGf7PJPz/84LXXhrprwh07Ym8SuH4k9B4zt6j8SxKq2VMnI4XbrshCh8auWqA/Z2A lwjz98U5uPwVJhLRg1diNJN6ry5o5Dl/vXw313Iu0/OtO/qGzrELsklfXFNQyvQa5ZFk FMG9TUy+8eGORmaBCa62D8YSc+kylJ2eW+r0k= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=CrMFMhiEDbP+mdgViXF+0gmRnFsyl9Kkqyspao64nGXk5oU5oIyi/+fZpcI3t0q3iJ JOEbg9FnkOiXLrvVqLBOTYHPztN4B6vO1LqudvEPgL7dI+xnjhk0OZcG9PyVOCjN8GYD LlZ+dFTuxGnUMyBVUV4vrNfbFQlhz65f0mUAU= Received: by 10.227.144.17 with SMTP id x17mr472193wbu.4.1277465316818; Fri, 25 Jun 2010 04:28:36 -0700 (PDT) Received: from [0.0.0.0] (5357DA75.cable.casema.nl [83.87.218.117]) by mx.google.com with ESMTPS id t15sm77851020wbc.5.2010.06.25.04.28.35 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 25 Jun 2010 04:28:36 -0700 (PDT) Message-ID: <4C2492F9.2020706@gmail.com> Date: Fri, 25 Jun 2010 13:28:57 +0200 From: Yeb Havinga User-Agent: Thunderbird 2.0.0.24 (Windows/20100228) MIME-Version: 1.0 To: Rajesh Kumar Mallah CC: Kevin Grittner , pgsql-performance@postgresql.org Subject: Re: sudden spurt in swap utilization (was:cpu bound postgresql setup.) References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.001 tagged_above=-10 required=5 tests=BAYES_20=-0.001, RCVD_IN_DNSWL_NONE=-0.0001 X-Spam-Level: X-Archive-Number: 201006/461 X-Sequence-Number: 39317 Rajesh Kumar Mallah wrote: > A scary phenomenon is being exhibited by the server , which is the server > is slurping all the swap suddenly > > 8 1 4192912 906164 6100 27873640 0 0 2277 858 13440 16235 > 63 8 19 10 0 > > I reduced work_mem from 4GB to 2GB to 512MB (now). I clearly remember that this > abnormal consumption of swap was NOT there even when work_mem was 4GB. > eg during happier times swap utilisation was: http://pastebin.com/bnE1pFZ9 > > the question is whats making postgres slurp the swap? i am posting my > current postgresql.conf > once again. > > # cat postgresql.conf | grep -v "^\s*#" | grep -v "^\s*$" > listen_addresses = '*' # what IP address(es) to listen on; > port = 5432 # (change requires restart) > max_connections = 300 # (change requires restart) > Hello Rajesh, In constrast with e.g. shared_buffers and effective_cache_size, work_mem is amount of memory per 'thing' (e.g. order/group by) that wants some working memory, so even a single backend can use several pieces of work_mem memory. Looking at your postgresql.conf, other memory values seem a bit too high as well for a 32GB ram server. It is probably a good idea to use pgtune (on pgfoundry) to get some reasonable ball park settings for your hardware. regards, Yeb Havinga