Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id A97029F9DAE for ; Mon, 27 Aug 2007 07:21:35 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 58760-04 for ; Mon, 27 Aug 2007 07:21:28 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from wx-out-0506.google.com (wx-out-0506.google.com [66.249.82.230]) by postgresql.org (Postfix) with ESMTP id 1F8EB9F997B for ; Mon, 27 Aug 2007 07:21:31 -0300 (ADT) Received: by wx-out-0506.google.com with SMTP id r21so1450389wxc for ; Mon, 27 Aug 2007 03:21:31 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:subject:from:reply-to:to:in-reply-to:references:content-type:date:message-id:mime-version:x-mailer:content-transfer-encoding; b=i6L9UAxRQQv3mpEfL0cT9zdDIPSdbU5dKUkwlm9dtc8RlTd4vuz4Np1rDFxcgnh/vfj6N2/L20lZaa5z65fnL+LXO9gQNF8Zsf4UxXHyeefirh4PEdl6lYrhM49T7vBhriyFRrtn0YR1yKPoIByuqRaIfqthgnA17eqqX3zfODE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:subject:from:reply-to:to:in-reply-to:references:content-type:date:message-id:mime-version:x-mailer:content-transfer-encoding; b=I8sWltlMFCE3C6sqYjK+HXbkfj7HNk7i5uJoJxFyEbsFViub3IlSGYqEfmOVjTPmvu7Hhl/XgkaxxXep+cvsUjLMPYFdBnDPAMyK76ku9gqsB4E/SCMPC4469QwNL0NCcZ6UhmvO6GI4nIyrdlXdZDxzuD49CAJfXfJIELcsdak= Received: by 10.90.118.12 with SMTP id q12mr10927805agc.1188210090788; Mon, 27 Aug 2007 03:21:30 -0700 (PDT) Received: from ?192.168.3.150? ( [68.79.189.145]) by mx.google.com with ESMTPS id 38sm13636528agd.2007.08.27.03.21.23 (version=SSLv3 cipher=RC4-MD5); Mon, 27 Aug 2007 03:21:29 -0700 (PDT) Subject: Re: Shared memory usage From: Adam Tauno Williams Reply-To: adamtaunowilliams@gmail.com To: pgsql-performance@postgresql.org In-Reply-To: References: Content-Type: text/plain Date: Mon, 27 Aug 2007 06:21:43 -0400 Message-Id: <1188210103.4723.4.camel@aleph.wmmi.net> Mime-Version: 1.0 X-Mailer: Evolution 2.8.2 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200708/315 X-Sequence-Number: 26445 > I have a postgres 8.0 and ~400mb database with lots of simple selects > using indexes. > I've installed pgpool on the system. I've set num_init_children to 5 and > here is the top output. > One of postmasters is my demon running some insert/update tasks. I see > that they all use cpu heavily, but do not use the shared memory. > shared_buffers is set to 60000, yet they use a minimal part of that. I'd > like to know why won't they use more? This just looks like the output of top; what is telling you that PostgreSQL is not using the shared memory? Enable statistics collection and then look in pg_statio_user_tables. > top - 00:12:35 up 50 days, 13:22, 8 users, load average: 4.84, 9.71, > 13.22 > Tasks: 279 total, 10 running, 268 sleeping, 1 stopped, 0 zombie > Cpu(s): 50.0% us, 12.9% sy, 0.0% ni, 33.2% id, 1.8% wa, 0.0% hi, 2.1% > si > Mem: 6102304k total, 4206948k used, 1895356k free, 159436k buffers > Swap: 1959888k total, 12304k used, 1947584k free, 2919816k cached > PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND > 11492 postgres 16 0 530m 72m 60m S 14 1.2 0:50.91 postmaster > 11493 postgres 16 0 531m 72m 60m R 14 1.2 0:48.78 postmaster > 11490 postgres 15 0 530m 71m 59m S 13 1.2 0:50.26 postmaster > 11491 postgres 15 0 531m 75m 62m S 11 1.3 0:50.67 postmaster > 11495 postgres 16 0 530m 71m 59m R 10 1.2 0:50.71 postmaster > 10195 postgres 15 0 536m 84m 66m S 6 1.4 1:11.72 postmaster -- Adam Tauno Williams, Network & Systems Administrator Consultant - http://www.whitemiceconsulting.com Developer - http://www.opengroupware.org