Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hhe2s-0005uL-BE for pgsql-general@arkaria.postgresql.org; Sun, 30 Jun 2019 17:55:23 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hhe2r-0004P2-3Y for pgsql-general@arkaria.postgresql.org; Sun, 30 Jun 2019 17:55:21 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hhe2p-0004Ov-RB for pgsql-general@lists.postgresql.org; Sun, 30 Jun 2019 17:55:20 +0000 Received: from smtp51.i.mail.ru ([94.100.177.111]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hhe2m-0003Rq-8R for pgsql-general@postgresql.org; Sun, 30 Jun 2019 17:55:18 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mail.ru; s=mail2; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To:Subject; bh=rDqo1/UL/jlZOuW6nlV0NCM4W+/LkqN+tvyomvB2BgY=; b=YpJ8kEUwDG33jdx+BiokU8VxaiWIcj9xIxNLVefX5eIW5dQvBtrF3gcJw/K+Vm2L/Je+LlhVoJCiQZpaZSylQzP7xyMCaFDukwdaYHjPJJY4F7eDugMF3sxbBeGVpywHMhrDdOtRIRZkHIkI9vTKi9Z3/NhGzcOjqov/PyKPZJY=; Received: by smtp51.i.mail.ru with esmtpa (envelope-from ) id 1hhe2i-00012J-GU; Sun, 30 Jun 2019 20:55:12 +0300 Subject: Re: "Time of latest checkpoint" stays too old on both master and slave To: Andrew Gierth Cc: pgsql-general General References: <86255d9c-51b0-aca3-1757-016952c73c67@mail.ru> <4a7c5b2e-9e27-3cd0-baa8-f0ad4df6b440@mail.ru> <87h887q8i1.fsf@news-spur.riddles.org.uk> From: rihad Message-ID: Date: Sun, 30 Jun 2019 21:55:09 +0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <87h887q8i1.fsf@news-spur.riddles.org.uk> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Authentication-Results: smtp51.i.mail.ru; auth=pass smtp.auth=rihad@mail.ru smtp.mailfrom=rihad@mail.ru X-77F55803: 689590B63E0A4B015A78504BD2AC2941196E1FB3E32064EE6CA8CE5E1341CF214A154BBF62B3A964833E554AD95A5D64 X-7FA49CB5: 0D63561A33F958A56C47543D695B43542598E788F0B899CD9D7D26F4F89F6E068941B15DA834481FA18204E546F3947C78444BBB7636F62AF6B57BC7E64490618DEB871D839B7333395957E7521B51C2545D4CF71C94A83E9FA2833FD35BB23D27C277FBC8AE2E8B55D5BE2F85BDEC5FA471835C12D1D977C4224003CC8364767815B9869FA544D8D32BA5DBAC0009BE9E8FC8737B5C2249F657401E1635F1D73AA81AA40904B5D9CF19DD082D7633A093541453170D46FCD81D268191BDAD3D78DA827A17800CE72AC4711D416BF240CD04E86FAF290E2DBBC930A3941E20C675ECD9A6C639B01B78DA827A17800CE7A8A84C0B5AACBEFE201C2F7B6CE4A0E975ECD9A6C639B01B4E70A05D1297E1BBC6867C52282FAC8519DC0BE04022C72727F269C8F02392CD5571747095F342E88FB05168BE4CE3AF X-Mailru-Sender: B19AB4DAF1EA2FB5C00A13E8F74C9B2A7F22F1CD8DDACBD48FC13FD3C22C89445487183757F714DFABBFE0CF075BC50BFB559BB5D741EB96004FA9CEFBA991DA3A5DB60FBEB33A8A0DA7A0AF5A3A8387 X-Mras: OK List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 06/30/2019 09:45 PM, Andrew Gierth wrote: >>>>>> "rihad" == rihad writes: > rihad> There's a weird problem, even when the time is initially set by > rihad> openntpd it keeps lagging by one second every few seconds: > > rihad> $ sudo /usr/local/etc/rc.d/openntpd restart > > What OS is this? > > I've seen this kind of thing with FreeBSD where the kernel timecounter > source has been chosen badly (i.e. choosing TSC when the TSC isn't > actually invariant enough). Forcing TSC not to be used fixes it. The > configuration I've especially noticed it on is when running in a VM with > a single virtual CPU. > Exactly. You're right. It's on FreeBSD 11.2. After some googling earlier I changed kern.timecounter.hardware=HPET and solved the problem. The default chosen value TSC-low seems to misbehave for this box, although it works on others (running the same FreeBSD version).