Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 189CE1337BF9 for ; Tue, 5 Apr 2011 10:08:15 -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 83742-07 for ; Tue, 5 Apr 2011 13:08:07 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-iy0-f174.google.com (mail-iy0-f174.google.com [209.85.210.174]) by mail.postgresql.org (Postfix) with ESMTP id A47201337BF2 for ; Tue, 5 Apr 2011 10:08:07 -0300 (ADT) Received: by iyb14 with SMTP id 14so359374iyb.19 for ; Tue, 05 Apr 2011 06:08:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=qIJGobVFf57rjr42TfjLrw+AiJEnU4fJAotCRpBPv8U=; b=ALUht5J9dPZIgpFkp1PoikLGaXdKIkgxajQjvPxpLnrfnljPkdBX+kN4fW5wxaJ0OI yd9qcLmL+Q+CFjYbp15LPZDIzkGvegPyni4BIduLtiHPP1Qvw2NASpIe3hmLlOBXHnUg V/UmUIQjqU/1JKNv9ogyvjImWyV2HP78FOZk0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=xrtrFJn8fBu9HcsyZAJWi/88ynAZPrrypivoqKSrOiFaYJ6jxCq39Vk4sptA/jHe6q jsppSPHmObta8XFlFhCxIcq5nP7Bee3Hbf7kQmnjyTSx3tzzIeWlD4ogPPFAYl1ScUWV Ie3Qs0+11qtGuenbzaeE/yiyrwrpAzYA5mkfs= MIME-Version: 1.0 Received: by 10.231.24.193 with SMTP id w1mr8613773ibb.41.1302008887750; Tue, 05 Apr 2011 06:08:07 -0700 (PDT) Received: by 10.231.154.132 with HTTP; Tue, 5 Apr 2011 06:08:07 -0700 (PDT) In-Reply-To: <4D9AC5B1.8080204@orkash.com> References: <4D999211.9080507@orkash.com> <4D99ACC0.5090009@orkash.com> <4D99B0B1.4020702@orkash.com> <4D9AC5B1.8080204@orkash.com> Date: Tue, 5 Apr 2011 07:08:07 -0600 Message-ID: Subject: Re: Postgres Performance Tuning From: Scott Marlowe To: Adarsh Sharma Cc: Raghavendra , pgsql-performance@postgresql.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.899 tagged_above=-10 required=5 tests=BAYES_00=-1.9, FREEMAIL_FROM=0.001 X-Spam-Level: X-Archive-Number: 201104/28 X-Sequence-Number: 43090 On Tue, Apr 5, 2011 at 1:33 AM, Adarsh Sharma wr= ote: > > [root@s8-mysd-2 ~]# free -m > =A0 =A0 =A0 =A0 =A0 =A0total =A0 =A0 =A0 used =A0 =A0 =A0 free =A0 =A0 sh= ared =A0 =A0buffers =A0 =A0 cached > Mem: =A0 =A0 =A0 =A0 15917 =A0 =A0 =A015826 =A0 =A0 =A0 =A0 90 =A0 =A0 = =A0 =A0 =A00 =A0 =A0 =A0 =A0101 =A0 =A0 =A015013 > -/+ buffers/cache: =A0 =A0 =A0 =A0711 =A0 =A0 =A015205 > Swap: =A0 =A0 =A0 =A016394 =A0 =A0 =A0 =A0143 =A0 =A0 =A016250 > > It means 15 GB memory is cached. Note that the kernel takes all otherwise unused memory and uses it for cache. If, at any time a process needs more memory, the kernel just dumps some cached data and frees up the memory and hands it over, it's all automatic. As long as cache is large, things are OK. You need to be looking to see if you're IO bound or CPU bound first. so, vmstat (install the sysstat package) is the first thing to use.