Re: [chrony-dev] New online/offline command

[ Thread Index | Date Index | More chrony.tuxfamily.org/chrony-dev Archives ]




On Thu, May 24, 2018 at 2:45 PM, Miroslav Lichvar <mlichvar@xxxxxxxxxx> wrote:
On Thu, May 24, 2018 at 02:11:58PM +0200, Christian Ehrhardt wrote:
> On auto-deployed config changes of virt systems (with plenty of switch
> interfaces for example) I've seen three digits per second (rare, but
> existing).

And each one runs all NM dispatcher scripts? I suspect the bottleneck
is in the execution of the scripts and the chronyc binary, not in
handling of the request in chronyd. It takes just few system calls per
source.

That was just the max of the event's I've seen.
I did not see them clogging up due to chrony yet.
I just wanted to share that these events can be frequent and to mind about that in the design of your new command. 
 
Have you tried profiling?

> second    event
> 1         net event 1 triggers "probe I"
> 2         Events 2-20 trigger 19 more
> ...
> 7         probe I completes and returns to caller "event 1"
> 8         the formerly waiting probe II (just one) runs now
> ...
> 14        probe II completes and returns to all callers Events 2-20
>
> This is synchronous + batching as I'd think of it

This sounds like a major complication of the code. If I understand it
correctly, chronyd would need to cache responses and check when was a
request received.
 
I wanted to raise awareness, not insist on implementing it.
If you are sure your code is rather fast also in huge setups then you are good.
Just ensure that the code is either safe against concurrent calling/execution or we might get odd rare and hard to debug issues.

> You wrote later:
>   "How about "onoffline" or "maybeonline"?"
>
> I'd like auto-onoffline or something like it more than any of the two above

That looks better, but would it be correct to call it "auto" when it
works only once when the command is issued and not all the time,
unlike the "auto_offline" option does for instance?

You put too much meaning in too much words already :-)
Without an auto- prefix I'd have wondered at first on which rational it does the online/offline.
With auto-onoffline I felt better, but I see the similarity to auto-online being an issue.

"check-onoffline" maybe, but that sounds as if it would be a read-only check action.
If you want go with "onoffline", it is not too bad if we make sure the manpage entry is clear enough.
 
--
Miroslav Lichvar

--
To unsubscribe email chrony-dev-request@chrony.tuxfamily.org with "unsubscribe" in the subject.
For help email chrony-dev-request@chrony.tuxfamily.org with "help" in the subject.
Trouble?  Email listmaster@xxxxxxxxxxxxxxxx.org.




--
Christian Ehrhardt
Software Engineer, Ubuntu Server
Canonical Ltd


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/