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

Rodriguez Betancourt, Esteban estebarb at hpe.com
Tue Mar 15 16:56:22 UTC 2016


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