X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id E50633A5D62 for ; Wed, 12 Jan 2005 17:36:54 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 50812-01 for ; Wed, 12 Jan 2005 17:36:46 +0000 (GMT) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.202]) by svr1.postgresql.org (Postfix) with ESMTP id 0B5CD3A5D52 for ; Wed, 12 Jan 2005 17:36:46 +0000 (GMT) Received: by wproxy.gmail.com with SMTP id 71so585782wra for ; Wed, 12 Jan 2005 09:36:46 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=F/m90/DOIWf+T91cnDe8/1cEZKrVp1H9+FNzlLQtZeABc690430Dyl31AbAAUqk9SUew3IJPmeCxi83EoHl3BBExV1hleWKCnlvSMKXk9QCWhgLJNfbT8MSgDsLccDrk/8fh5kyrcS3psKhU+S9SHHN7TLZ8zY7U5tUwJcTsAr4= Received: by 10.54.36.60 with SMTP id j60mr286980wrj; Wed, 12 Jan 2005 09:36:45 -0800 (PST) Received: by 10.54.18.72 with HTTP; Wed, 12 Jan 2005 09:36:45 -0800 (PST) Message-ID: <33c6269f0501120936525abaee@mail.gmail.com> Date: Wed, 12 Jan 2005 12:36:45 -0500 From: Alex Turner Reply-To: alex@neteconomist.com To: Greg Stark Subject: Re: which dual-CPU hardware/OS is fastest for PostgreSQL? Cc: Merlin Moncure , pgsql-performance@postgresql.org In-Reply-To: <87y8eyzhj0.fsf@stark.xeocode.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <6EE64EF3AB31D5448D0007DD34EEB3412A75A3@Herge.rcsinc.local> <87zmzg0ycq.fsf@stark.xeocode.com> <33c6269f050112085763aff4a6@mail.gmail.com> <87y8eyzhj0.fsf@stark.xeocode.com> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.024 tagged_above=0 required=5 tests=AWL, RCVD_BY_IP X-Spam-Level: X-Archive-Number: 200501/153 X-Sequence-Number: 9843 No - I agree - Analysis cache hit rate as a single indicator is dangerous. You can easily increase cache hit rate by de-optimizing a good query so it uses more CPU cylces, and therefore has a higher cache hit rate. All information has to be taken as a whole when performing optimization on a system. Cache hit rate is just one factor. For data warehousing, it's obviously that you are going to have a lower cache hit rate because you are often performing scans across large data sets that will never fit in memory. But for most system, not necesarily just OLTP, a high cache hit ratio is acheivable. Cache hit ratio is just one small indication of performance. Relating to that - How to extract this kind of information from postgresql? Is there a way to get the cache hti ratio, or determine the worst 10 queries in a database? Alex Turner NetEconomist On 12 Jan 2005 12:25:23 -0500, Greg Stark wrote: > > Alex Turner writes: > > > Infact the cache hit ratio that Oracle suggests is the minimum good > > value is 95%. Anything below that is bad news. > > Well that seems very workload dependent. No amount of cache is going to be > able to achieve that for a DSS system chugging sequentially through terabytes > of data. Whereas for OLTP systems I would wouldn't be surprised to see upwards > of 99% hit rate. > > Note that a high cache hit rate can also be a sign of a problem. After all, it > means the same data is being accessed repeatedly which implicitly means > something is being done inefficiently. For an SQL database it could mean the > query plans are suboptimal. > > On several occasions we found Oracle behaving poorly despite excellent cache > hit rates because it was doing a sequential scan of a moderately sized table > instead of an index lookup. The table was small enough to fit in RAM but large > enough to consume a significant amount of cpu, especially with the query being > run thousands of times per minute. > > -- > greg > >