On Fri, Jun 13, 2014 at 7:50 AM, sven falempin <sven.falem...@gmail.com> wrote:
> > > > On Tue, Jun 10, 2014 at 12:45 PM, Ted Unangst <t...@tedunangst.com> wrote: > >> On Mon, Jun 09, 2014 at 21:54, Theo de Raadt wrote: >> >> > A better patch is probably the following which also increases the >> size >> >> > of the buffer to at least 64k: >> >> >> >> Agreed. >> > >> > One thing to be aware of. That function is syncronous. It will read >> > as much as it can get, then it will do an "atomic" write operation to >> > flush the buffer out the other way. >> > >> > If you have substantially different speeds, this can be a substantial >> > 'buffer bloat'. >> > >> > Since it is handling a session in both directions... expect to see >> > some substantial jaggies. >> >> Having convinced me this a problem (it's already in the code, but 64k >> buffers will make it worse), I scaled back to 16k. >> >> Now soliciting diffs to change readwrite to a loop with two buffers >> that poll()s in all four directions. :) >> >> > Is using kqueue ok ? > > like : http://pastebin.com/F1c5Hswi