Re: Reduce timing overhead of EXPLAIN ANALYZE using rdtsc? - Mailing list pgsql-hackers

From David Geier
Subject Re: Reduce timing overhead of EXPLAIN ANALYZE using rdtsc?
Date
Msg-id 3bdce15d-25ec-4c49-9906-818803462897@gmail.com
Whole thread Raw
In response to Re: Reduce timing overhead of EXPLAIN ANALYZE using rdtsc?  (David Geier <geidav.pg@gmail.com>)
List pgsql-hackers
> Based on Robert's suggestion I wanted to add a "fast_clock_source" enum
> GUC which can have the following values "auto", "rdtsc", "try_rdtsc" and
> "off". With that, at least no additional checks are needed and
> performance will remain as previously benchmarked in this thread.

The attached patch set is rebased on latest master and contains a commit
which adds a "fast_clock_source" GUC that can be "try", "off" and
"rdtsc" on Linux.

Alternatively, we could call the GUC "clock_source" with "auto",
"clock_gettime" and "rdtsc". Opinions?

I moved the call to INSTR_TIME_INITIALIZE() from InitPostgres() to
PostmasterMain(). In InitPostgres() it kept the database in a recovery
cycle.

> I'll still add unlikely() around the if (has_rdtsc).

Done.

--
David Geier
Attachment

pgsql-hackers by date:

Previous
From: Andrey Borodin
Date:
Subject: Re: Compression of bigger WAL records
Next
From: Lukas Fittl
Date:
Subject: Re: pg_plan_advice