forked from facebook/mysql-5.6
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix memory bloat in my_core::handler
Summary: In 8.0 sizeof(my_core::handler) == 5680. This is a regression from 5.6 where the size was 912 bytes. This is because 8.0 introduced m_random_number_engine field of type std::mt19937 inline. The size of this type is 5000 bytes. This regressed workloads which started taking > 50 MB more as many handlers are initialized when running workloads. m_random_number_engine is only used when generating histogram samples as part of running "ANALYZE TABLE UPDATE HISTOGRAM". Since histograms are not yet widely used and the generator is needed only when updating histogram, convert it into a pointer field. The object of std::mt19937 is now dynamically created when running UPDATE HISTOGRAM, This should be ok as histograms will not be refreshed very often. Reviewed By: yizhang82 Differential Revision: D27251616 fbshipit-source-id: 1c122177a15
- Loading branch information
Showing
2 changed files
with
14 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters