From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Greg Smith <greg(at)2ndquadrant(dot)com> |
Cc: | Szymon Guz <mabewlun(at)gmail(dot)com>, PostgreSQL <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: strange |
Date: | 2010-03-22 16:36:59 |
Message-ID: | 22231.1269275819@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Greg Smith <greg(at)2ndquadrant(dot)com> writes:
> Tom Lane wrote:
>> You've got a machine where gettimeofday() is really slow. This is
>> common on cheap PC hardware :-(
> I'd be curious to know more about the hardware and operating system
> Szymon is using if you suspect this is the case. I keep hearing about
> systems where this is slow, but despite claims that they're common I've
> never actually seen one.
Well, they're not as common as they used to be. My understanding is
that there are two independent issues:
* If you have to call into the kernel to read the RTC, you're already
hurting. Modern Unixen avoid this, but I think I've read that it's
generally only fixed on x86_64 hardware not i386.
* The original specs for reading the RTC on PC hardware did not foresee
the desire of being able to read it out in a small fraction of a
microsecond. I don't know the details on this exactly, but some
googling turned up this:
http://linux.derkeiler.com/Mailing-Lists/Kernel/2006-07/msg07415.html
The OP's example involved almost 21 seconds added by approximately
2*10000000 gettimeofday probes, or right about 1 microsecond per
probe...
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Thom Brown | 2010-03-22 16:37:01 | Re: Reducing excess files in pg_xlog |
Previous Message | Greg Smith | 2010-03-22 16:14:50 | Re: strange |