Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 5E08064FEDB for ; Thu, 30 Oct 2008 20:38:18 -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 44700-08 for ; Thu, 30 Oct 2008 20:38:15 -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.235]) by postgresql.org (Postfix) with ESMTP id 779C864FD96 for ; Thu, 30 Oct 2008 20:38:15 -0300 (ADT) Received: by rv-out-0506.google.com with SMTP id b25so839866rvf.43 for ; Thu, 30 Oct 2008 16:38:14 -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=PXI2YFy7Mh7kf32Ogq9GEXgGV6xeqxnlhmS9ECQKiN0=; b=Ys/gP/lcTxxO5Z6bSEO3O2SItsg/jZod9UE8eOd++dcG9XDU7Sys21C7UHZOdS8Qvp CvOLWqKcBuGVjiiOJAwyn0I+rfkhLNKYPTu5YJCxP7ADVHTRi9E6IRMiw95UCe3yzlPN kXHxs2JfAtDKKUkOVeBnxdXhyj7pzWMLM5wJw= 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=iabWIxtiKzn9qNiwm+OXOJYkZ3ItnToOqc8I69+AfeazZIpROAXV6AXw94U/JBLMCD lT6uuDUXFw/zZunSwnW10tg/wEEr6p9tQuUFWEO0l2f5KG5/efZZV9EZ7rlFOSWFIsia pIz7iw+smSVi5ryzhojBal5gF65uf/DyO2t3s= Received: by 10.141.162.9 with SMTP id p9mr6218798rvo.68.1225409894047; Thu, 30 Oct 2008 16:38:14 -0700 (PDT) Received: by 10.141.86.18 with HTTP; Thu, 30 Oct 2008 16:38:14 -0700 (PDT) Message-ID: Date: Thu, 30 Oct 2008 17:38:14 -0600 From: "Oliver Johnson" To: "Scott Marlowe" Subject: Re: CPU utilization vs. IO wait, shared buffers? Cc: pgsql-performance@postgresql.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: 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: 200810/135 X-Sequence-Number: 31716 On Thu, Oct 30, 2008 at 4:41 PM, Scott Marlowe wrote: > On Thu, Oct 30, 2008 at 3:41 PM, Oliver Johnson > wrote: > >> Another thing to note, we have VACUUM ANALYZE running on an hourly >> interval and the switch from CPU to IO wait appears to always coincide >> with a vacuum. > > Why are you not using autovacuum with appropriate wait parameters to > keep it out of your way? Autovacuum tends to make pretty good > decisions and you can adjust the aggressiveness with which it kicks in > if you need to. Thanks for the quick feedback. I struggled with autovacuum in a past life and developed a favor for explicit table level vacuums. Also, vacuum'ing did not jump out to me as a culprit originally as there is no significant impact (or indicators of duress) during the early day vacuums. You and Alan have brought up some good points, though. I turned autovacuum on and increased the checkpoint_segments. I will let it run over night and see how things look. Thanks again. > >> What might cause this shift? >> >> I have tried adjusting buffer_cache from 512 MB to 1024 MB, but this >> did not appear to have an impact. > > Do you mean shared_buffers? It may well be that larger shared_buffers > aren't going to help if you're dealing with a largely random > transactional load. that said, 1G shared_buffers is not that big > nowadays. I'm assuming by your testing methods you're on a real db > server with several dozen gigs of ram... > >> I also tried upping the work_mem from 1MB to 10MB, and this did not >> appear to have an impact either. > > Look into upping your checkpoint_segments (64 or so is reasonable for > a large production server) and possibly increasing your > checkpoint_completion_target to something closer to 1.0 (0.7 to 0.8) > and see if that helps. >