Google Cloud Compute + FreeBSD + PostgreSQL = timecounter issue - Mailing list pgsql-hackers

From Maeldron T.
Subject Google Cloud Compute + FreeBSD + PostgreSQL = timecounter issue
Date
Msg-id 0cca4ce1-a3fa-adc7-c894-08960ff7cc0f@gmail.com
Whole thread Raw
Responses Re: Google Cloud Compute + FreeBSD + PostgreSQL = timecounter issue  ("Maeldron T." <maeldron@gmail.com>)
List pgsql-hackers
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 30000ms 
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.00000          0     2      0.00000          0     4      0.00000
0    8     96.37600     455552    16      2.26939      10727    32      0.62727       2965    64      0.08801
416  128      0.56634       2677   256      0.04824        228   512      0.01523         72  1024      0.00508
24 2048      0.00275         13  4096      0.00085          4  8192      0.00042          2 16384      0.00000
032768      0.00021          1 65536      0.00000          0
 
131072      0.00021          1




pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: [bugfix] commit timestamps ERROR on lookup of FrozenTransactionId
Next
From: "Maeldron T."
Date:
Subject: Re: Google Cloud Compute + FreeBSD + PostgreSQL = timecounter issue