[ovs-dev] [RFC] jsonrpc: make jsonrpc input_buffer size parametric

Lorenzo Bianconi lorenzo.bianconi at redhat.com
Tue Nov 5 17:42:51 UTC 2019


>
> On Tue, Nov 05, 2019 at 04:27:51PM +0200, Lorenzo Bianconi wrote:
> > Allow jsonrpc clients (e.g. ovn-controller) to specify jsonrpc input
> > buffer size in order to reduce overhead when downloading huge db size
> > since current value is 512B. The user can specify rpc buffer size using
> > ovsdb_idl_set_remote routine passing requested value
> >
> > Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi at redhat.com>
>
> Hmm, I thought that we had decided to just try a 4096-byte buffer to
> start.  That would be a much smaller patch.  The marginal benefits of
> buffers larger than that probably decline a lot since the processing
> cost of 4096 bytes of JSON is probably a lot more than the overhead of a
> system call.  I imagine that any further benefit is probably from being
> able to process more JSON per trip through the main loop.  Those same
> benefits could also be obtained by increasing the 'for' loop limit in
> jsonrpc_recv() from 50 to some larger number.

Hi Ben,

thanks for the review. I tried to get a PoC (this is why I sent it as
RFC) but since the IDL/reconnect code is pretty spread
I ended up with a large patch. I agree we can just set the bufsize to 4096.
If it is ok for everybody I will post a patch to set the buffer size
to one page.

Regards,
Lorenzo



More information about the dev mailing list