Re: Go GC

2023-09-12 Thread Gary E. Miller via devel
Yo Hal!

On Tue, 12 Sep 2023 18:49:35 -0700
Hal Murray via devel  wrote:

> I think it's worth some effort to investigate this area.  I'm
> prepared to give up if we find a fatal problem.  Again, I'm assuming
> that we split ntpd into client and server parts so all we have to
> work on is the server half.


I look forward to your results.  I found working with Go was nice.


RGDS
GARY
---
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
g...@rellim.com  Tel:+1 541 382 8588

Veritas liberabit vos. -- Quid est veritas?
"If you can't measure it, you can't improve it." - Lord Kelvin


pgpHZrLIVFtSe.pgp
Description: OpenPGP digital signature
___
devel mailing list
devel@ntpsec.org
https://lists.ntpsec.org/mailman/listinfo/devel


Re: Go GC

2023-09-12 Thread Hal Murray via devel


Gary said:
> Avoiding creating garbage is hard.

In general, yes.  But the inner loop of the server side is not very 
complicated.

The APIs that I'm looking at are read-into-my-buffer rather than return a new 
buffer that needs to be GCed.

I think it's worth some effort to investigate this area.  I'm prepared to give 
up if we find a fatal problem.  Again, I'm assuming that we split ntpd into 
client and server parts so all we have to work on is the server half.


-- 
These are my opinions.  I hate spam.



___
devel mailing list
devel@ntpsec.org
https://lists.ntpsec.org/mailman/listinfo/devel


Re: Go GC

2023-09-12 Thread Gary E. Miller via devel
Yo Hal!

On Tue, 12 Sep 2023 16:55:12 -0700
Hal Murray via devel  wrote:

> Gary said:
> >James Browning via devel  wrote:  
> >> It would appear there is a way to turn off GC under runtime/,  
> > How?  Link?   
> 
> https://pkg.go.dev/runtime/debug#SetGCPercent
> 
> It's not clear to me how to take advantage of that.  You still have
> to turn it on occasionally or your world will fill up with garbage.

Assuming you create garbage.  Avoiding creating garbage is hard.

> I poked around a bit.  I'm pretty sure that we can write a server
> that doesn't generate any garbage when processing a normal client
> request.

The problem is not when you generate garbage, but when the garbage
collector wakes up.

> Occasinally, there is something in the 60-70 microseconds range.
> They are rare enough that it's easy to miss one in a million sample
> pairs of reading the clock.

Which is why NTP slowly adjusts PLL's instead of jumping around.

RGDS
GARY
---
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
g...@rellim.com  Tel:+1 541 382 8588

Veritas liberabit vos. -- Quid est veritas?
"If you can't measure it, you can't improve it." - Lord Kelvin


pgpkyZe9wWCRx.pgp
Description: OpenPGP digital signature
___
devel mailing list
devel@ntpsec.org
https://lists.ntpsec.org/mailman/listinfo/devel