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 D5E7DD1B4B3 for ; Tue, 27 Apr 2004 15:23:27 -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 17850-02 for ; Tue, 27 Apr 2004 15:23:20 -0300 (ADT) Received: from net2.micro-automation.com (net2.micro-automation.com [64.7.141.29]) by svr1.postgresql.org (Postfix) with SMTP id 6C4C8D1B575 for ; Tue, 27 Apr 2004 15:23:17 -0300 (ADT) Received: (qmail 21878 invoked from network); 27 Apr 2004 18:23:15 -0000 Received: from dcdsl.ebox.com (HELO ?192.168.1.36?) (davec@64.7.143.116) by net2.micro-automation.com with SMTP; 27 Apr 2004 18:23:15 -0000 Subject: Re: Wierd context-switching issue on Xeon patch for 7.4.1 From: Dave Cramer Reply-To: pg@fastcrypt.com To: Josh Berkus Cc: Tom Lane , pgsql-performance@postgresql.org In-Reply-To: <200404271105.00395.josh@agliodbs.com> References: <4BAFBB6B9CC46F41B2AD7D9F4BBAF78509814A@vt-pe2550-001.vantage.vantage.com> <200404261703.25631.josh@agliodbs.com> <1083024960.14759.166.camel@localhost.localdomain> <200404271105.00395.josh@agliodbs.com> Content-Type: text/plain Organization: Cramer Consulting Message-Id: <1083090452.14759.224.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Date: Tue, 27 Apr 2004 14:27:33 -0400 Content-Transfer-Encoding: 7bit X-AntiVirus: scanned for viruses by AMaViS 0.2.1 (http://amavis.org/) X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200404/463 X-Sequence-Number: 6763 Josh, I think you can safely increase by orders of magnitude here, instead of by +100, my wild ass guess is that the sweet spot is the spin time should be approximately the time it takes to consume the resource. So if you have a really fast machine then the spin count should be higher. Also you have to take into consideration your memory bus speed, with the pause instruction inserted in the loop the timing is now dependent on memory speed. But... you need a baseline first. Dave On Tue, 2004-04-27 at 14:05, Josh Berkus wrote: > Dave, > > > Are you testing this with Tom's code, you need to do a baseline > > measurement with 10 and then increase it, you will still get lots of cs, > > but it will be less. > > No, that was just a test of 1000 straight up. Tom outlined a method, but I > didn't see any code that would help me find a better level, other than just > trying each +100 increase one at a time. This would take days of testing > ... -- Dave Cramer 519 939 0336 ICQ # 14675561