Ensure jemalloc is available if TokuDB is running

Registered by rich prohaska on 2013-10-24

The jemalloc library is able to manage memory for TokuDB a lot better than the lib mallocator. Tokutek shipped a product that used LD_PRELOAD to preload the jemalloc library into mysqld in the mysqld_safe script. Unfortunately, this solution proved to be brittle and a lot of customers ended up running mysqld directly, and blew up their systems as the libc mallocator could not keep the mysqld RSS under control.

Tokutek now links jemalloc into mysqld. Here is a patch for MySQL 5.6:
https://github.com/Tokutek/mysql56/commit/3afacd62365c74fea30ab8c3279792d1411966e7

https://github.com/Tokutek/mysql56/commit/3afacd62365c74fea30ab8c3279792d1411966e7

Blueprint information

Status:
Not started
Approver:
Laurynas Biveinis
Priority:
Not
Drafter:
None
Direction:
Needs approval
Assignee:
None
Definition:
New
Series goal:
None
Implementation:
Unknown
Milestone target:
None

Related branches

Sprints

Whiteboard

Vadim: I am not sure if we should link directly, or initially it will be just fine to use LD_PRELOAD in mysqld_safe

Laurynas: this is to be handled by build scripts. Suggested code change for TokuDB would be to abort plugin startup if not running under jemalloc.

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.