Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id E7EAD9FB7AE for ; Thu, 1 Mar 2007 17:06:39 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-new, port 10024) with ESMTP id 39188-01 for ; Thu, 1 Mar 2007 17:06:36 -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.226]) by postgresql.org (Postfix) with ESMTP id EBF729FB75A for ; Thu, 1 Mar 2007 17:06:35 -0400 (AST) Received: by wx-out-0506.google.com with SMTP id i28so551916wxd for ; Thu, 01 Mar 2007 13:06:35 -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=hZuG56L2LzgIof2YjethqilTRDRETS6lszCjLhe23X9WiDfjTThhzlZFfqmJGL2SvXWR1wE2KOugy45tJrAx/MtTD5Gd9P5c8/B5iiYO9s6nZO00HlIgnWctYX9xHUnd3YI2tJ40mil56pLAzh/MhO+pbxI7fl3VoDh77daR3vQ= 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=Q5xD7u2alvjafcHsv02lG70AzZCDjrVHl8dFZrSvVmJOEdxZp+XVm3lVRqVv2n7HbFl+GIGQ7Qb6Np2mU6nMSTxnIL7qT8S4nieSlU1qB7xMEj0qt7/vp+EIdcIekmYNQgmCrx7p83w4XyDwqIBndPDLPS02wsVbpIZCSt7bjEs= Received: by 10.90.98.10 with SMTP id v10mr1352177agb.1172783195059; Thu, 01 Mar 2007 13:06:35 -0800 (PST) Received: by 10.90.116.10 with HTTP; Thu, 1 Mar 2007 13:06:34 -0800 (PST) Message-ID: Date: Thu, 1 Mar 2007 16:06:34 -0500 From: "Alex Deucher" To: "Joshua D. Drake" Subject: Re: strange performance regression between 7.4 and 8.1 Cc: pgsql-performance@postgresql.org In-Reply-To: <45E73C90.2080206@commandprompt.com> 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/18 X-Sequence-Number: 23423 On 3/1/07, Joshua D. Drake wrote: > Alex Deucher wrote: > > Hello, > > > > I have noticed a strange performance regression and I'm at a loss as > > to what's happening. We have a fairly large database (~16 GB). The > > original postgres 7.4 was running on a sun v880 with 4 CPUs and 8 GB > > of ram running Solaris on local scsi discs. The new server is a sun > > Opteron box with 4 cores, 8 GB of ram running postgres 8.1.4 on Linux > > (AMD64) on a 4 Gbps FC SAN volume. When we created the new database > > it was created from scratch rather than copying over the old one, > > however the table structure is almost identical (UTF8 on the new one > > vs. C on the old). The problem is queries are ~10x slower on the new > > hardware. I read several places that the SAN might be to blame, but > > testing with bonnie and dd indicates that the SAN is actually almost > > twice as fast as the scsi discs in the old sun server. I've tried > > adjusting just about every option in the postgres config file, but > > performance remains the same. Any ideas? > > 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. Thanks, Alex > Sincerely, > > Joshua D. Drake > > > > > > Thanks, > > > > Alex > > > > ---------------------------(end of broadcast)--------------------------- > > TIP 3: Have you checked our extensive FAQ? > > > > http://www.postgresql.org/docs/faq > > > > > -- > > === The PostgreSQL Company: Command Prompt, Inc. === > Sales/Support: +1.503.667.4564 || 24x7/Emergency: +1.800.492.2240 > Providing the most comprehensive PostgreSQL solutions since 1997 > http://www.commandprompt.com/ > > Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate > PostgreSQL Replication: http://www.commandprompt.com/products/ > >