[ovs-dev] [PATCH] Add --enable-jemalloc argument to build

Ben Pfaff blp at ovn.org
Tue Mar 15 17:01:57 UTC 2016


OK.

I'm probably not going to take this patch.  It's just too specific.

I'd accept a patch that adds a note to suggest using jemalloc, via LIBS,
in INSTALL.md.

On Tue, Mar 15, 2016 at 04:56:22PM +0000, Rodriguez Betancourt, Esteban wrote:
> We opted for the flag option because we wanted to affect just OVSDB-Server, and not other programs. We don't have any specific issue with linking the other programs with jemalloc, but we don't have tests for the other programs so we are not sure if performance gain would be the same for them. We don't want to use jemalloc if there isn't a real benefit.  
> 
> We had checked that the programs that use the C IDL  performs better when linked with jemalloc, but again, we prefer to stay on the safe side and don't link the IDL with jemalloc, and keeping that decision to the specific developers.
> 
> Thanks,
> Esteban
> 
> -----Original Message-----
> From: Ben Pfaff [mailto:blp at ovn.org] 
> Sent: lunes, 14 de marzo de 2016 11:10
> To: Rodriguez Betancourt, Esteban <estebarb at hpe.com>
> Cc: dev at openvswitch.org
> Subject: Re: [ovs-dev] [PATCH] Add --enable-jemalloc argument to build
> 
> On Tue, Feb 23, 2016 at 10:21:21PM +0000, Rodriguez Betancourt, Esteban wrote:
> > During our tests with OVSDB we found out that memory allocation is 
> > used intensively by the server, so we thought that using a different 
> > memory allocator could increase the performance. We tried jemalloc and 
> > the performance gain was between 20% and 40%.
> > 
> > This patch would allow anyone to enable jemalloc on their systems in 
> > case you want to try out this memory allocator.
> > 
> > The patch adds the --enable-jemalloc flag to link ovsdb-server with 
> > jemalloc instead of the default memory allocator. This can improve the 
> > OVSDB Server performance under certains loads.
> > 
> > Signed-off-by: Esteban Rodriguez Betancourt <estebarb at hpe.com>
> 
> I've been thinking about this for a while.  It's nice that jemalloc can speed up ovsdb-server, and I'm happy to find that out.  Given that, I'm also happy to encourage users to use jemalloc.  But this patch seems like a bit of overkill.  In the end, I guess I have a couple of
> questions:
> 
> Why is it worthwhile to add a new configure flag, instead of just encouraging users to run "./configure LIBS=-ljemalloc"?
> 
> Why is jemalloc only suitable for ovsdb-server?
> 
> Thanks,
> 
> Ben.



More information about the dev mailing list