Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 613379FB312 for ; Thu, 1 Mar 2007 17:50:47 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-new, port 10024) with ESMTP id 22823-06 for ; Thu, 1 Mar 2007 17:50:34 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from wx-out-0506.google.com (wx-out-0506.google.com [66.249.82.224]) by postgresql.org (Postfix) with ESMTP id 7D6989FB1F6 for ; Thu, 1 Mar 2007 17:50:37 -0400 (AST) Received: by wx-out-0506.google.com with SMTP id i28so562598wxd for ; Thu, 01 Mar 2007 13:50:36 -0800 (PST) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; 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; b=R+Ojnz9KekeLXnIjV5pMxHIt4N2hrZLqCt23NZXheJyw0qthhbVlGEtUuG68rlOWyHRPzS6ivRVUQ0UO4FGZm9lYMIorD9N7tkSGxMPomrvzbD3oKJpj+uSJrnhnL74aJtRY+9A0lFS49QCCedxO73JoYipSBGcQT9rxc1HVeu8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=J2e/j5o3Fjwmz/3NoNLTkbmct6j3mY8UEsnn2rnbV2sDm+dF4DVnHq0v9bk/BGDQyv7rBWjuPZp4BpN7fsDMH2/OqoyDWM+xeKW8vPo1tx3WjeYqJw7jvgiTPxdVhmTpON/8oYEhub4gu2PPdg4+1ALnZ3gvpzu0SCCc9obygIY= Received: by 10.90.32.14 with SMTP id f14mr994846agf.1172785836606; Thu, 01 Mar 2007 13:50:36 -0800 (PST) Received: by 10.90.116.10 with HTTP; Thu, 1 Mar 2007 13:50:36 -0800 (PST) Message-ID: Date: Thu, 1 Mar 2007 16:50:36 -0500 From: "Alex Deucher" To: "Jeff Frost" Subject: Re: strange performance regression between 7.4 and 8.1 Cc: "Joshua D. Drake" , pgsql-performance@postgresql.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <45E73C90.2080206@commandprompt.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200703/23 X-Sequence-Number: 23428 On 3/1/07, Jeff Frost wrote: > On Thu, 1 Mar 2007, Alex Deucher wrote: > > >> Vacuum? Analayze? default_statistics_target? How many shared_buffers? > >> effective_cache_size? work_mem? > >> > > > > I'm running the autovacuum process on the 8.1 server. vacuuming on > > the old server was done manually. > > > > default_statistics_target and effective_cache_size are set to the the > > defaults on both. > > > > postgres 7.4 server: > > # - Memory - > > shared_buffers = 82000 # 1000 min 16, at least > > max_connections*2, 8KB each > > sort_mem = 8000 # 1024 min 64, size in KB > > vacuum_mem = 32000 # 8192 min 1024, size in KB > > # - Free Space Map - > > #max_fsm_pages = 20000 # min max_fsm_relations*16, 6 bytes each > > #max_fsm_relations = 1000 # min 100, ~50 bytes each > > # - Kernel Resource Usage - > > #max_files_per_process = 1000 # min 25 > > > > postgres 8.1 server: > > # - Memory - > > shared_buffers = 100000 # min 16 or max_connections*2, 8KB > > each > > temp_buffers = 2000 #1000 # min 100, 8KB each > > max_prepared_transactions = 100 #5 # can be 0 or more > > # note: increasing max_prepared_transactions costs ~600 bytes of shared > > memory > > # per transaction slot, plus lock space (see max_locks_per_transaction). > > work_mem = 10000 #1024 # min 64, size in KB > > maintenance_work_mem = 524288 #16384 # min 1024, size in KB > > #max_stack_depth = 2048 # min 100, size in KB > > > > I've also tried using the same settings from the old server on the new > > one; same performance issues. > > > > If this is a linux system, could you give us the output of the 'free' command? total used free shared buffers cached Mem: 8059852 8042868 16984 0 228 7888648 -/+ buffers/cache: 153992 7905860 Swap: 15631224 2164 15629060 > Postgresql might be choosing a bad plan because your effective_cache_size is > way off (it's the default now right?). Also, what was the block read/write yes it's set to the default. > speed of the SAN from your bonnie tests? Probably want to tune > random_page_cost as well if it's also at the default. > ------Sequential Output------ --Sequential Input- --Random- -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks-- Machine Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP /sec %CP luna12-san 16000M 58896 91 62931 9 35870 5 54869 82 145504 13 397.7 0 effective_cache_size is the default. Alex