ntpperf icon indicating copy to clipboard operation
ntpperf copied to clipboard

Virtual clients

Open inkdot7 opened this issue 1 year ago • 2 comments

The commits makes it possible to have more clients available without using a large netmask for the source IP.

The virtual client number is encoded in the local_id, i.e. the transmit timestamp.

The virtual client bits are used to extended the number of available clients.

Note: not tested for PTP or interleave mode.

See it as WIP:

Should perhaps more masks be precalculated?

Some checks against too-large virtual bit numbers are needed as well.

inkdot7 avatar Feb 09 '23 20:02 inkdot7

What is the use case? Testing in a network where routing cannot be configured, or testing if the server performance degrades if all requests come from a single address (possibly matching a single NIC queue)? I'm wondering if this could be simplified to a special case with one IP address.

mlichvar avatar Feb 13 '23 14:02 mlichvar

Initially it was for the reason of network which I did not want to reconfigure, but now that you say it, it would actually also be nice to have this capability in order to test various rate-limiting measures. And then I think it would be useful to keep the ability to have multiple clients as well.

Would it be a reasonable start to precalculate things like 1U << (32 - config->src_bits) into num_sources (or something such) variable? If so, inside the struct config, or as some global variable?

inkdot7 avatar Feb 19 '23 23:02 inkdot7