X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 875FCD1B7F0 for ; Mon, 19 Apr 2004 19:56:39 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 50509-01 for ; Mon, 19 Apr 2004 19:56:39 -0300 (ADT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 8698CD1B4BE for ; Mon, 19 Apr 2004 19:56:36 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.11/8.12.11) with ESMTP id i3JMtYNE029785; Mon, 19 Apr 2004 18:55:35 -0400 (EDT) To: josh@agliodbs.com Cc: Joe Conway , "scott.marlowe" , Bruce Momjian , lutzeb@aeccom.com, pgsql-performance@postgresql.org, Neil Conway Subject: Re: Wierd context-switching issue on Xeon In-reply-to: <200404191455.04068.josh@agliodbs.com> References: <40843E63.7050101@joeconway.com> <200404191455.04068.josh@agliodbs.com> Comments: In-reply-to Josh Berkus message dated "Mon, 19 Apr 2004 14:55:04 -0700" Date: Mon, 19 Apr 2004 18:55:34 -0400 Message-ID: <29784.1082415334@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200404/280 X-Sequence-Number: 6580 Josh Berkus writes: >> I've got a quad 2.8Ghz MP Xeon (IBM x445) that I could test on. Does >> anyone have a test set that can reliably reproduce the problem? > Unfortunately we can't seem to come up with one. > It does seem to require a database which is in the many GB (> 10GB), and a > situation where a small subset of the data is getting hit repeatedly by > multiple processes. I do not think a large database is actually necessary; the test case Josh's client has is only hitting a relatively small amount of data. The trick seems to be to cause lots and lots of ReadBuffer/ReleaseBuffer activity without much else happening, and to do this from multiple backends concurrently. I believe the best way to make this happen is a lot of relatively simple (but not short) indexscan queries that in aggregate touch just a bit less than shared_buffers worth of data. I have not tried to make a self-contained test case, but based on what I know now I think it should be possible. I'll give this a shot later tonight --- it does seem that trying to reproduce the problem on different kinds of hardware is the next useful step we can take. regards, tom lane