Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 4F4D19FBDB5 for ; Thu, 3 May 2007 18:05:59 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 85174-03-3 for ; Thu, 3 May 2007 18:05:43 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from mail.net-domino.com (www.net-domino.com [74.208.11.96]) by postgresql.org (Postfix) with ESMTP id 2F05E9FBDDA for ; Thu, 3 May 2007 18:05:42 -0300 (ADT) Received: from [127.0.0.1] (u15245314.onlinehome-server.com [74.208.11.96]) by mail.net-domino.com (8.13.7/8.13.6) with ESMTP id l43L5WM9014703 for ; Thu, 3 May 2007 17:05:36 -0400 Message-ID: <463A4ED6.2040907@mochima.com> Date: Thu, 03 May 2007 17:06:30 -0400 From: Carlos Moreno User-Agent: Thunderbird 2.0.0.0 (X11/20070326) MIME-Version: 1.0 To: pgsql-performance@postgresql.org Subject: Re: Feature Request --- was: PostgreSQL Performance Tuning References: <200705010923.47951.josh@agliodbs.com> <200705031221.56226.josh@agliodbs.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Added-Header: Sample_milter accepted message X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200705/30 X-Sequence-Number: 24420 >> CPUs, 32/64bit, or clock speeds. So any attempt to determine "how >> fast" >> a CPU is, even on a 1-5 scale, requires matching against a database of >> regexes which would have to be kept updated. >> >> And let's not even get started on Windows. > > I think the only sane way to try and find the cpu speed is to just do > a busy loop of some sort (ideally something that somewhat resembles > the main code) and see how long it takes. you may have to do this a > few times until you get a loop that takes long enough (a few seconds) > on a fast processor I was going to suggest just that (but then was afraid that again I may have been just being naive) --- I can't remember the exact name, but I remember using (on some Linux flavor) an API call that fills a struct with data on the resource usage for the process, including CPU time; I assume measured with precision (that is, immune to issues of other applications running simultaneously, or other random events causing the measurement to be polluted by random noise). As for 32/64 bit --- doesn't PG already know that information? I mean, ./configure does gather that information --- does it not? Carlos --