<div dir="auto">Dear Marco,</div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, 15 May 2024 at 19:27, Marco d'Itri <<a href="mailto:md@linux.it">md@linux.it</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)">On May 15, Job Snijders via Bird-users <<a href="mailto:bird-users@network.cz" target="_blank">bird-users@network.cz</a>> wrote:<br>
<br>
> But please be very careful in considering this patch, because it does<br>
> introduce some subtle changes in the on-the-wire behaviour of BIRD. For<br>
> example, without this patch an UPDATE for a handful of routes and the<br>
> End-of-RIB marker might end up in the same TCP packet (if this fits);<br>
> but with this patch, the End-of-RIB marker ends up in its own TCP<br>
> packet. As things are today, setting TCP_NODELAY will increase the</blockquote><div dir="auto"><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)" dir="auto"><br>
I think that this can be fixed easily with TCP_CORK.<br>
Basically, with TCP_NODELAY + TCP_CORK you can have the optimal balance <br>
of latency and overhead without using writev.</blockquote><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto">Yes, thanks for sharing this suggestion.</div><div dir="auto"><br></div><div dir="auto">Note that TCP_CORK is a Linux-only feature (on FreeBSD it seems aliased to TCP_NOPUSH, but I might be misunderstanding that code). There are subtle differences between NOPUSH and CORK: resetting CORK triggers a flush, whereas resetting NOPUSH does not.</div><div dir="auto"><br></div><div dir="auto">It is of course reasonable to optimize one platform and not others, we work with the tools that we have - but a portable approach (using writev()?) would seem attractive to me :-)</div><div dir="auto"><br></div><div dir="auto">Kind regards,</div><div dir="auto"><br></div><div dir="auto">Job</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)" dir="auto"></blockquote></div></div>