Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id DB2D364FCEA for ; Mon, 15 Sep 2008 12:53:57 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 05661-06 for ; Mon, 15 Sep 2008 12:53:55 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.228]) by postgresql.org (Postfix) with ESMTP id 1A6AF64FCE7 for ; Mon, 15 Sep 2008 12:53:54 -0300 (ADT) Received: by rv-out-0506.google.com with SMTP id b25so2905032rvf.43 for ; Mon, 15 Sep 2008 08:53:53 -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:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=LUbXadkLPPCu5OyPs2feso+fVFLqvv2xSLhAnZis/s0=; b=dWpCG1cN6MKodi/3hWZtYLZNgKmN72b3EGDc+fqfMrRNsTRlNsIlIhFO0O1irS09P4 lLrjmY4CKygGs7JrIkbVbrWrEYBtZXGe1TFE+Hv86myismPBhTZtn4ByjFP0VDOV10EM KWb0vdHEMsJecRv+gZ5eVsp7uKjJiPq3WCNR8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=LEE/GGJFJsQPCcaQ0i410uiYh4evbmAeHA7uzQhsjzPp4z2DvQhljzh2PmwWlJNhvO zi/Gqbc8P7aR5ZplBW+QeLw5CgOXpDuhJj00opRP/pua6c4mGMmToSieDiM3VBUhjvhP HojcwF1WwnhHK1MuhVgmEPk9kSGXnDSsr8dPU= Received: by 10.140.133.10 with SMTP id g10mr4901339rvd.151.1221494033593; Mon, 15 Sep 2008 08:53:53 -0700 (PDT) Received: by 10.141.74.11 with HTTP; Mon, 15 Sep 2008 08:53:53 -0700 (PDT) Message-ID: Date: Mon, 15 Sep 2008 09:53:53 -0600 From: "Scott Marlowe" To: Vivek_Sharan Subject: Re: Heavy postgres process Cc: "pgsql-admin@postgresql.org" In-Reply-To: <5465CC59A600E2408FFBF84350B9383450F4933AB6@AUSMELMBX01.ad.infosys.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <5465CC59A600E2408FFBF84350B938345031E95B93@AUSMELMBX01.ad.infosys.com> <5465CC59A600E2408FFBF84350B9383450F4933AB6@AUSMELMBX01.ad.infosys.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200809/131 X-Sequence-Number: 30224 Run top, hit M and the attach the output to a reply here and we'll take a look. On Mon, Sep 15, 2008 at 5:33 AM, Vivek_Sharan wrote: > Thanks for your reply but how would I calculate which processes are eating up more memory, When I check process list, its only postgres and apache processes running on my system and only postgres processes are heavy. System runs out of memory quickly. > > Regards, > ~Vivek > > > -----Original Message----- > From: Scott Marlowe [mailto:scott.marlowe@gmail.com] > Sent: Friday, September 12, 2008 11:18 PM > To: Vivek_Sharan > Cc: pgsql-admin@postgresql.org > Subject: Re: [ADMIN] Heavy postgres process > > On Fri, Sep 12, 2008 at 2:12 AM, Vivek_Sharan wrote: >> Hi Admin, >> >> I'm new to this I have few queries as listed below >> >> 1) Number of connections made with a particular database. > > Wait, how to find out how many connections there are, or how many can > a particular db handle. > > For this kind of thing, look at the admin functions in the pgsql-sql docs: > > http://www.postgresql.org/docs/8.3/interactive/functions-admin.html > > specifically you want something like: > > select datname from pg_stat_activity; > select datname, count(datname) from pg_stat_activity group by datname; > >> 2) And how can I check which process (PID) is responsible for the >> connection and > > That table up there ^^^ > >> 3) what all can make a postgres process as heavy as 70-80 MB in size > > you may not be measuring properly. When you say it's using 70-80 MB > how do you know this? The numbers you see in top aren't necessarily > what some folks think they ar. > > **************** CAUTION - Disclaimer ***************** > This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely > for the use of the addressee(s). If you are not the intended recipient, please > notify the sender by e-mail and delete the original message. Further, you are not > to copy, disclose, or distribute this e-mail or its contents to any other person and > any such actions are unlawful. This e-mail may contain viruses. Infosys has taken > every reasonable precaution to minimize this risk, but is not liable for any damage > you may sustain as a result of any virus in this e-mail. You should carry out your > own virus checks before opening the e-mail or attachment. Infosys reserves the > right to monitor and review the content of all messages sent to or from this e-mail > address. Messages sent to or from this e-mail address may be stored on the > Infosys e-mail system. > ***INFOSYS******** End of Disclaimer ********INFOSYS*** >