Optimizing Memory Use | memory/sql | 2.47 MiB | | memory/memory | 174.01 KiB | | memory/myisam | 46.53 KiB | | memory/blackhole | 512 bytes | | memory/federated | 512 bytes | | memory/csv | 512 bytes | | memory/vio | 496 bytes | +---------------------------+---------------+ Note Prior to MySQL 8.0.16,  sys.format_bytes()  was used for FORMAT_BYTES() . For more information about  sys  schema, see Chapter 28,  MySQL sys Schema . 8.12.3.2 Enabling Large Page Support Some hardware/operating system architectures support memory pages greater than the default (usually 4KB). The actual implementation of this support depends on the underlying hardware and operating system. Applications that perform a lot of memory accesses may obtain performance improvements by using large pages due to reduced Translation Lookaside Buffer (TLB) misses. In MySQL, large pages can be used by InnoDB, to allocate memory for its buffer pool and additional memory pool. Standard use of large pages in MySQL attempts to use the largest size supported, up to 4MB. Under Solaris, a “super large pages”  feature enables uses of pages up to 256MB. This feature is available for recent SPARC platforms. It can be enabled or disabled by using the  --super-large-pages  or  --skip- super-large-pages  option. MySQL also supports the Linux implementation of large page support (which is called HugeTLB in Linux). Before large pages can be used on Linux, the kernel must be enabled to support them and it is necessary to configure the HugeTLB memory pool. For reference, the HugeTBL API is documented in the Documentation/vm/hugetlbpage.txt  file of your Linux sources. The kernel for some recent systems such as Red Hat Enterprise Linux appear to have the large pages feature enabled by default. To check whether this is true for your kernel, use the following command and look for output lines containing “huge” : The nonempty command output indicates that large page support is present, but the zero values indicate that no pages are configured for use. If your kernel needs to be reconfigured to support large pages, consult the  hugetlbpage.txt  file for instructions. Assuming that your Linux kernel has large page support enabled, configure it for use by MySQL using the following commands. Normally, you put these in an  rc  file or equivalent startup file that is executed during the system boot sequence, so that the commands execute each time the system starts. The commands should execute early in the boot sequence, before the MySQL server starts. Be sure to change the allocation numbers and the group number as appropriate for your system. 1840 shell>  cat /proc/meminfo | grep -i huge HugePages_Total: 0 HugePages_Free: 0 HugePages_Rsvd: 0 HugePages_Surp: 0 Hugepagesize: 4096 kB