Remove mandatory THP check to run


Remove the mandatory need for THP and replace exit/assertion with a stern warning to stdout. Document thoroughly the need for env to have THP.




George Lorch
May 26, 2016, 5:52 PM
George Lorch
May 16, 2016, 2:15 PM

I have no problem with that, INIT flags just seemed a more natural place for it, but a 'once set' global works as well.

Vladislav Lesin
May 16, 2016, 12:53 PM

George, one question. Why do we need to use DB_INIT_* flag for this purpose? The drawback of flags is that only limited amount of flags can be used. And I don't think this feature deserves to waste available flags space. Why don't use old good environment variables to configure the behaviour instead of flags? For example like db_env->change_fsync_log_period(), db_env->set_lock_timeout_callback(), db_env->set_loader_memory_size() etc.

George Lorch
May 2, 2016, 3:52 PM

There is a change of plans here. Instead of removing the THP startup checks and fail if THP is enabled, we want to leave the existing functionality in place and add a new option/flag that disabled the THP check. The default should be to keep the existing functionality, which is to check to see if THP is enabled and fail if so.

This new option/flag should be exposed as a new flag to env_open similar to the DB_INIT flags.

This way, the existing behavior remains unchanged, but, the consuming products can choose to disable this check on startup.

See for how this should be used.

George Lorch
April 12, 2016, 12:39 AM

It might be a good idea to remove THP startup checks entirely from FT and move them into the owning products (TokuDB, PSMDB).

Also, PerconaFT uses a function to funnel all allocations through, it might be a good idea to add extra tests in here to report on a malloc failure (ENOMEM) if THP was enabled and/or jemalloc was missing before asserting the malloc failure.



Vladislav Lesin


George Lorch


External issue ID


Freshdesk Tickets