X-Original-To: pgsql-hackers-win32-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 20BC356487 for ; Tue, 8 Mar 2005 03:53:01 +0000 (GMT) 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 18170-07 for ; Tue, 8 Mar 2005 03:52:50 +0000 (GMT) Received: from boutiquenumerique.com (boutiquenumerique.com [82.67.9.10]) by svr1.postgresql.org (Postfix) with ESMTP id B518152A8F for ; Tue, 8 Mar 2005 03:52:48 +0000 (GMT) Received: (qmail 14677 invoked from network); 8 Mar 2005 04:53:41 +0100 Received: from unknown (HELO localhost) (boutiquenumerique-lists@192.168.0.4) by boutiquenumerique.com with SMTP; 8 Mar 2005 04:53:41 +0100 To: "Steinar H. Gunderson" , "Tom Lane" Cc: "Dave Held" , "Greg Stark" , "John A Meinel" , "Magnus Hagander" , "Ken Egervari" , pgsql-performance@postgresql.org, pgsql-hackers-win32@postgresql.org Subject: Re: [PERFORM] Help with tuning this query (with References: <49E94D0CFCD4DB43AFBA928DDD20C8F90261846C@asg002.asg.local> <20050308013750.GA29367@uio.no> <1971.1110247358@sss.pgh.pa.us> <20050308020624.GA753@uio.no> Message-ID: Date: Tue, 08 Mar 2005 04:51:43 +0100 From: PFC Organization: =?iso-8859-15?Q?La_Boutique_Num=E9rique?= Content-Type: text/plain; format=flowed; delsp=yes; charset=iso-8859-15 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit In-Reply-To: <20050308013750.GA29367@uio.no> User-Agent: Opera M2(BETA2)/8.0 (Linux, build 987) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.003 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200503/65 X-Sequence-Number: 3023 From the Linux Kernel (make menuconfig) there seem to be two new reliable sources for timing information. Note the remark about "Time Stamp Counter" below. Question is, which one of these (or others) are your API functions using ? I have absolutely no idea ! CONFIG_HPET_TIMER: This enables the use of the HPET for the kernel's internal timer. HPET is the next generation timer replacing legacy 8254s. You can safely choose Y here. However, HPET will only be activated if the platform and the BIOS support this feature. Otherwise the 8254 will be used for timing services. Choose N to continue using the legacy 8254 timer. Symbol: HPET_TIMER [=y] Prompt: HPET Timer Support Defined at arch/i386/Kconfig:440 Location: -> Processor type and features CONFIG_X86_PM_TIMER: The Power Management Timer is available on all ACPI-capable, in most cases even if ACPI is unusable or blacklisted. This timing source is not affected by powermanagement features like aggressive processor idling, throttling, frequency and/or voltage scaling, unlike the commonly used Time Stamp Counter (TSC) timing source. So, if you see messages like 'Losing too many ticks!' in the kernel logs, and/or you are using this on a notebook which does not yet have an HPET, you should say "Y" here. Symbol: X86_PM_TIMER [=y] Prompt: Power Management Timer Support Defined at drivers/acpi/Kconfig:319 Depends on: !X86_VOYAGER && !X86_VISWS && !IA64_HP_SIM && (IA64 || X86) && X86 && ACPI && ACPI_ Location: -> Power management options (ACPI, APM) -> ACPI (Advanced Configuration and Power Interface) Support -> ACPI Support (ACPI [=y]) On Tue, 08 Mar 2005 03:06:24 +0100, Steinar H. Gunderson wrote: > On Mon, Mar 07, 2005 at 09:02:38PM -0500, Tom Lane wrote: >> One thought that was bothering me was that if the CPU goes idle while >> waiting for disk I/O, its clock might stop or slow down dramatically. >> If we believed such a counter for EXPLAIN, we'd severely understate >> the cost of disk I/O. >> >> I dunno if that is the case on any Windows hardware or not, but none >> of this thread is making me feel confident that we know what >> QueryPerformanceCounter does measure. > > I believe the counter is actually good in such a situation -- I'm not a > Win32 > guru, but I believe it is by far the best timer for measuring, well, > performance of a process like this. After all, it's what it was designed > to > be :-) > > OBTW, I think I can name something like 15 or 20 different function > calls to > measure time in the Win32 API (all of them in use); it really is a giant > mess. > > /* Steinar */