ctdb: Adding memory pool for queue callback

Swen Schillig swen at vnet.ibm.com
Wed Nov 7 16:58:24 UTC 2018


On Wed, 2018-11-07 at 17:47 +0100, Volker Lendecke wrote:
> On Wed, Nov 07, 2018 at 05:28:04PM +0100, Swen Schillig wrote:
> > showing values like 
> > [swen at linux ~]$ ./a.out 
> > It took 8.963634 seconds to execute 10 million talloc/free cycles.
> > It took 5.951885 seconds to execute 10 million talloc(pool)/free
> > cycles.
> > It took 4.095244 seconds to execute 10 million malloc/free cycles.
> > 
> > So, I think there's still enough progress to justify the change.
> 
> This is with -O3, right? With -O0 the picture looks entirely
> different
> to me. Are you 100% certain your production build uses -O3?
> 

Volker 

are you sure we should test each modification up to all possible
compiler settings ?
How many of those tests need to be "positive" and how many could be
indifferent before a modification is accepted ?

[swen at linux ~]$ cc talloc_test.c -ltalloc -O0
[swen at linux ~]$ ./a.out 
It took 8.978337 seconds to execute 10 million talloc/free cycles.
It took 5.616663 seconds to execute 10 million talloc(pool)/free cycles.
It took 4.081127 seconds to execute 10 million malloc/free cycles.

[swen at linux ~]$ cc talloc_test.c -ltalloc -O3
[swen at linux ~]$ ./a.out 
It took 8.765668 seconds to execute 10 million talloc/free cycles.
It took 5.264208 seconds to execute 10 million talloc(pool)/free cycles.
It took 0.000001 seconds to execute 10 million malloc/free cycles.

I probably should have done something with the memory to prevent the result 
of the last test (malloc).

Anyway....

Cheers Swen




More information about the samba-technical mailing list