<font face="arial" size="2"><p style="margin:0;padding:0;font-family: arial; font-size: 10pt; overflow-wrap: break-word;">There are lots of easy ways to (using Intel standard CPUs) get *submicrosecond* precision on clock times.</p>
<p style="margin:0;padding:0;font-family: arial; font-size: 10pt; overflow-wrap: break-word;"> </p>
<p style="margin:0;padding:0;font-family: arial; font-size: 10pt; overflow-wrap: break-word;">In TidalScale where I work, our hyperkernel (hypervisor) synchronizes the TSC (which has about 0.3 nsec resolution) between 10 GigE switch connected servers to an accuracy of maybe 100 nsec. We use a custom algorithm I designed, but the Precision Time Protocol standard easily gets sub-microsecond accurate measurements.</p>
<p style="margin:0;padding:0;font-family: arial; font-size: 10pt; overflow-wrap: break-word;"> </p>
<p style="margin:0;padding:0;font-family: arial; font-size: 10pt; overflow-wrap: break-word;">Now if you aren't measuring in a hypervisor, or very low level Linux kernel stack, I suggest that using DPDK (another Intel goodie that works on Linux) lets you do a lot in userspace code - including doing the whole IP stack in userspace.</p>
<p style="margin:0;padding:0;font-family: arial; font-size: 10pt; overflow-wrap: break-word;"> </p>
<p style="margin:0;padding:0;font-family: arial; font-size: 10pt; overflow-wrap: break-word;">I understand that a lot of Cake usage is about non-Intel, low-end consumer router processors, and in those it is really hard to time anything (and the scheduler itself is often struggling to schedule stuff predictably), but not every idea where measurement leads to significant latency improvement has to be initially explored on those low end consumer MIPS and ARM chips.</p>
<p style="margin:0;padding:0;font-family: arial; font-size: 10pt; overflow-wrap: break-word;"> </p>
<p style="margin:0;padding:0;font-family: arial; font-size: 10pt; overflow-wrap: break-word;">There are a number of single board computers that have at least two GigE ports and are Intel-64 Celerons or better that have good nanosecond TSC clocks, PCIe slots that support high-end wifi, etc.</p>
<p style="margin:0;padding:0;font-family: arial; font-size: 10pt; overflow-wrap: break-word;"> </p>
<p style="margin:0;padding:0;font-family: arial; font-size: 10pt; overflow-wrap: break-word;">I can recommend some...</p>
<p style="margin:0;padding:0;font-family: arial; font-size: 10pt; overflow-wrap: break-word;"> </p>
<p style="margin:0;padding:0;font-family: arial; font-size: 10pt; overflow-wrap: break-word;"> </p>
<p style="margin:0;padding:0;font-family: arial; font-size: 10pt; overflow-wrap: break-word;">On Saturday, December 4, 2021 8:24pm, "Dave Taht" <dave.taht@gmail.com> said:<br /><br /></p>
<div id="SafeStyles1638906593">
<p style="margin:0;padding:0;font-family: arial; font-size: 10pt; overflow-wrap: break-word;">> I too have been trying to get below 1ms (heck, 3ms) precision or at<br />> least, resolution. I came up with the most promising thing I can think<br />> of for<br />> interactions in a multithreaded environment yet, I think. glibc has<br />> long mapped the kernel clock page into process memory, so i was<br />> thinking<br />> (hoping) that mmaping that on top of itself a zillion times and using<br />> that as my test data source for writes out across the network I'd get<br />> some<br />> really fine grained insights.<br />> <br />> Haven't got around to it yet.<br />> <br />> On Sat, Dec 4, 2021 at 3:01 PM David P. Reed <dpreed@deepplum.com> wrote:<br />> ><br />> > I agree with your broad assessment, Jonathan.<br />> ><br />> ><br />> ><br />> > The self-interference problem within a host isn't just a network problem.<br />> It's a user-space scheduler problem as well.<br />> ><br />> ><br />> ><br />> > There are lots of interactions between user-space scheduler (in the case of<br />> Linux, the "Completely Fair Scheduler" and its quantum, which is set by the HZ<br />> variable at boot) and the network stack in the kernel. This interactions have<br />> non-trivial effects when mutliple flows are independently created by concurrent<br />> processes).<br />> ><br />> ><br />> ><br />> > Lately, I've been studying, for reasons related to my day job, the complex<br />> interactions of timing at sub-millisecond scale among threads and processes on a<br />> single system in Linux. I/O driven by threads become highly correlated, and so<br />> assuming "independence" among flow timing is just not a good assumption.<br />> ><br />> ><br />> ><br />> > The paper observes the results of "dependencies" that couple/resonate.<br />> ><br />> ><br />> ><br />> > On Friday, December 3, 2021 7:09pm, "Jonathan Morton"<br />> <chromatix99@gmail.com> said:<br />> ><br />> > > > On 4 Dec, 2021, at 12:27 am, Dave Taht <dave.taht@gmail.com><br />> wrote:<br />> > > ><br />> > > ><br />> > ><br />> https://jonathankua.github.io/preprints/jkua-ieeelcn2021_understanding_ar_preprint-20jul2021.pdf<br />> > > ><br />> > > > I would love it if somehow the measured effects of chunklets<br />> against cake's<br />> > > per-host/per flow fq was examined one day.<br />> > ><br />> > > I haven't actually measured it, but based on what the above paper says,<br />> I can make<br />> > > some firm predictions:<br />> > ><br />> > > 1: When competing against traffic to the same local host, the<br />> performance effects<br />> > > they describe will be present.<br />> > ><br />> > > 2: When competing against traffic to a different local-network host,<br />> the<br />> > > performance effects they describe will be attenuated or even entirely<br />> absent.<br />> > ><br />> > > 3: They noted one or two cases of observable effects of hash collisions<br />> in their<br />> > > tests with FQ-Codel. These will be greatly reduced in prevalence with<br />> Cake, due<br />> > > to the set-associative hash function which specifically addresses that<br />> phenomenon.<br />> > ><br />> > > - Jonathan Morton<br />> > > _______________________________________________<br />> > > Cake mailing list<br />> > > Cake@lists.bufferbloat.net<br />> > > https://lists.bufferbloat.net/listinfo/cake<br />> > ><br />> <br />> <br />> <br />> --<br />> I tried to build a better future, a few times:<br />> https://wayforward.archive.org/?site=https%3A%2F%2Fwww.icei.org<br />> <br />> Dave Täht CEO, TekLibre, LLC<br />> </p>
</div></font>