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 204EE32A10B for ; Fri, 8 Oct 2004 23:32:45 +0100 (BST) 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 85620-03 for ; Fri, 8 Oct 2004 22:32:33 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id C639732A102 for ; Fri, 8 Oct 2004 23:32:35 +0100 (BST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id i98MWWwB021490; Fri, 8 Oct 2004 18:32:33 -0400 (EDT) To: "J. Andrew Rogers" Cc: josh@agliodbs.com, pgsql-performance@postgresql.org Subject: Re: First set of OSDL Shared Mem scalability results, In-reply-to: <1097273580.25588.18.camel@vulture.corp.neopolitan.com> References: <200410081443.16109.josh@agliodbs.com> <1097273580.25588.18.camel@vulture.corp.neopolitan.com> Comments: In-reply-to "J. Andrew Rogers" message dated "08 Oct 2004 15:13:00 -0700" Date: Fri, 08 Oct 2004 18:32:32 -0400 Message-ID: <21489.1097274752@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200410/114 X-Sequence-Number: 8590 "J. Andrew Rogers" writes: > As I understand it (and I haven't looked so I could be wrong), the > buffer cache is searched by traversing it sequentially. You really should look first. The main-line code paths use hashed lookups. There are some cases that do linear searches through the buffer headers or the CDB lists; in theory those are supposed to be non-performance-critical cases, though I am suspicious that some are not (see other response). In any case, those structures are considerably more compact than the buffers proper, and I doubt that cache misses per se are the killer factor. This does raise a question for Josh though, which is "where's the oprofile results?" If we do have major problems at the level of cache misses then oprofile would be able to prove it. regards, tom lane