Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id CE60663309F for ; Fri, 13 Feb 2009 17:21:45 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 64031-01-5 for ; Fri, 13 Feb 2009 17:21:40 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-gx0-f224.google.com (mail-gx0-f224.google.com [209.85.217.224]) by mail.postgresql.org (Postfix) with ESMTP id 3BD616330C6 for ; Fri, 13 Feb 2009 17:21:40 -0400 (AST) Received: by gxk24 with SMTP id 24so1394404gxk.19 for ; Fri, 13 Feb 2009 13:21:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=fZVf7f8hbY33n9qxzjTZSYC5vufdAR5+Yg5yQk4iHm0=; b=pmwkNKTS1GvpU1B3+hT5ICaS+XdnF+QgKdGxTNmPoZFexDMg/OB03K62UjQdNVKihG UPFjOlnoME/u0iODKismsS4lZ1MdWqNowVhfFwh52FNFFQkaMSlxGcw3Ium0oyxjvZC+ QCf8efYuYMqd9QsFBINJq3did4g5Lsp+7z0Hg= 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=QvFUgdgTP9AWIVku/4IGyC7QPP3hLK/s7st8vALh/evNZiN2v2hfxUxAfsOpOZNIZI Yzevxg8KcDYoAKZk3GiBiIvoGS2gmOscFv4An4uX13Yq3ZC1FukT71aytA+J+W5grzSV OUmBCsAEh99/23zJUbXbo631hhE/4LEqHzm04= MIME-Version: 1.0 Received: by 10.151.149.6 with SMTP id b6mr507602ybo.122.1234560099106; Fri, 13 Feb 2009 13:21:39 -0800 (PST) In-Reply-To: <4995ABC0.4090401@musicreports.com> References: <4995ABC0.4090401@musicreports.com> Date: Fri, 13 Feb 2009 14:21:39 -0700 Message-ID: Subject: Re: Vacuum wait time problem From: Scott Marlowe To: Roger Ging Cc: pgsql-admin@postgresql.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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: 200902/88 X-Sequence-Number: 31309 On Fri, Feb 13, 2009 at 10:20 AM, Roger Ging wrote: > Hi, > > I'm running vacuum full analyze verbose on a table with 20million rows and > 11 indexes. In top, I'm seeing [pdflush] and postgres: writer process each > using diferent cpu cores, with wait time well above 90% on each of them. > The vacuum has been running for several hours, and the last thing to show > on screen, over an hour ago, was : > > DETAIL: 8577281 index row versions were removed. > 736 index pages have been deleted, 736 are currently reusable. > CPU 7.57s/52.52u sec elapsed 381.70 sec. > > That's the last index > > The vacuum process itself is using less than 2% of a core. > The pg version is 8.3.1 running on Suse. Hardware is 2X dual core Opterons, > 16 GB RAM, 24 drives in RAID 50 > > It would seem to me that the system is extremely IO bound, but I don't know > how to find out what specifically is wrong here. Any advice greatly > appreciated. A couple of questions. Why Vacuum full as opposed to vacuum (regular)? Why 8.3.1 which has known bugs, instead of 8.3.latest? What do "vmstat 10" and iostat -x 10 have to say about your drive arrays while this vacuum is running?