Re: [HACKERS] Google Cloud Compute + FreeBSD + PostgreSQL = timecounter issue

2016-11-23 Thread Maeldron T.

On 23.11.16 20:43, Maeldron T. wrote:



pg_test_timing doesn’t show the problem, or I read the output wrong.


Or it does. I checked another output than the one I attached at the end.




--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


[HACKERS] Google Cloud Compute + FreeBSD + PostgreSQL = timecounter issue

2016-11-23 Thread Maeldron T.

In short:

The available timecounters on Google Compute Instances seem to be random.

The setting in the official FreeBSD image is wrong (not available on any 
of my test instances). FreeBSD will pick up a timecounter at random.


When either the TSC or the TSC-low counter is used, explain analyze 
behaves normally. The system clock will be wrong with a few seconds in 
each minute. ntpd won’t (and shouldn’t) fix that. Daemons panic. Time 
travel gets real.


When ACPI-fast is used, the system clock stays normal. However, an 
"explain analyze select count(1) from table" will run for 3ms 
instead of 300ms.


pg_test_timing doesn’t show the problem, or I read the output wrong.


In long:

https://forums.freebsd.org/threads/58666/


Notes:

$ pg_test_timing
Testing timing overhead for 3 seconds.
Per loop time including overhead: 6346.80 nsec
Histogram of timing durations:
< usec   % of total  count
 1  0.0  0
 2  0.0  0
 4  0.0  0
 8 96.37600 42
16  2.26939  10727
32  0.62727   2965
64  0.08801416
   128  0.56634   2677
   256  0.04824228
   512  0.01523 72
  1024  0.00508 24
  2048  0.00275 13
  4096  0.00085  4
  8192  0.00042  2
 16384  0.0  0
 32768  0.00021  1
 65536  0.0  0
131072  0.00021  1



--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers