MARK CALLAGHAN wrote:
On Thu, Sep 24, 2009 at 3:42 PM, Monty Taylor <[email protected]> wrote:
MARK CALLAGHAN wrote:


In addition, you will see serious performance bottlenecks if TCMalloc is
installed on your benchmark server.  MySQL's memory allocation procedures
simply do not like TCMalloc.
Or you used a slow & old version of tcmalloc as Domas has suggested on
your blog.
http://jpipes.com/index.php?/archives/296-Drizzle-Performance-Regression-Solved-TCMalloc-vs.-No-TCMalloc.html
Yeah - I tried with up-to-date tcmalloc - still no luck.

I did not use tcmalloc in this case. At my previous employer,
performance with tcmalloc was always much better than without. At my
current employer I use a different version of Linux and tcmalloc
doesn't improve things. I have yet to see it make things worse.
We're still not sure why, but for Drizzle it _definitely_ makes things
worse.

Drizzle uses STL. Official MySQL does not. There was a big discussion
this week at work about 'STL vs tcmalloc' with the summary:
The GNU STL implementation attempts to reduce memory allocation
overhead for small objects by using an internal pool.  However, this
turns out to be counterproductive with tcmalloc because tcmalloc's own
small-object freelists are faster (or at least this used to be the
case; I don't know whether either library has changed such that this
is no longer true).

Yep, this could certainly be the reason for differences in memory allocation performance. That said, in Drizzle-land, we are currently in a rather bizarre half-STL, half-MySQL-sql_alloc world, where some things are contained in STL containers and others are not. The overall direction is the removal of non-STL allocation, in favor of all-STL allocation.

One might then say we will have reduced performance, but I will also say that we have a new memory allocator coming soon, designed with STL Allocator semantics (yes, even though those semantics are a bit odd), that can be used with the STL containers used in Drizzle. This new memory allocator can be seen as replacing the custom MySQL multi_alloc and sql_alloc MEM_ROOT allocators.

As you know, though, we do regression testing on every commit, and we have already discovered regressions from our automated system (e.g. regression in using std::bitset). So, we are ever-vigilant that our use of the STL does not introduce any major regressions for us...

Cheers!

-jay

_______________________________________________
Mailing list: https://launchpad.net/~drizzle-discuss
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~drizzle-discuss
More help   : https://help.launchpad.net/ListHelp

Reply via email to