|NUMA (non-uniform memory access) is a multiprocessing RAM design where each processor has â€œlocalâ€ lower-latency RAM access. Linux has logic to analyse and optimise NUMA, but a DBMS managing a large database can challenge it with a single huge multi-threaded process consuming nearly all system memory, real and virtual. Running |
/proc/pic/numa_map exposes such difficulties, e.g., node 0 memory exhausted, other nodes underused, even when total available RAM should be sufficient.
Jeremy Cole reports a solution for MySQL:
1. Force interleaved RAM allocation with
2. Flush Linux buffer caches and smooth out RAM allocation just before starting the MySQL server
sysctl -q -w vm.drop_caches=3.
3. Force the OS to allocate the entire InnoDB buffer pool at with map_populate iv available, or memset.
The Twitter MySQL 5.5 fork implements this solution as the
mysqld_safe options numa-interleave and flush-caches, and the
mysqld option innodb_buffer_pool_populate.
Last updated 31 Jul 2017