Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 007A39FB430 for ; Thu, 3 May 2007 19:41:28 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 87489-04 for ; Thu, 3 May 2007 19:41:21 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from mail.net-domino.com (www.net-domino.com [74.208.11.96]) by postgresql.org (Postfix) with ESMTP id B81719FB42B for ; Thu, 3 May 2007 19:41:25 -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 l43MfD63016905 for ; Thu, 3 May 2007 18:41:22 -0400 Message-ID: <463A6544.4090605@mochima.com> Date: Thu, 03 May 2007 18:42:12 -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> <463A4ED6.2040907@mochima.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/32 X-Sequence-Number: 24422 >> 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). > > since what we are looking for here is a reasonable first > approximation, not perfection I don't think we should worry much about > pollution of the value. Well, it's not as much worrying as it is choosing the better among two equally difficult options --- what I mean is that obtaining the *real* resource usage as reported by the kernel is, from what I remember, equally hard as it is obtaining the time with milli- or micro-seconds resolution. So, why not choosing this option? (in fact, if we wanted to do it "the scripted way", I guess we could still use "time test_cpuspeed_loop" and read the report by the command time, specifying CPU time and system calls time. >> As for 32/64 bit --- doesn't PG already know that information? I mean, >> ./configure does gather that information --- does it not? > > we're not talking about comiling PG, we're talking about getting sane > defaults for a pre-compiled binary. if it's a 32 bit binary assume a > 32 bit cpu, if it's a 64 bit binary assume a 64 bit cpu (all hardcoded > into the binary at compile time) Right --- I was thinking that configure, which as I understand, generates the Makefiles to compile applications including initdb, could plug those values as compile-time constants, so that initdb (or a hypothetical additional utility that would do what we're discussing in this thread) already has them. Anyway, yes, that would go for the binaries as well --- we're pretty much saying the same thing :-) Carlos --