Has anybody tried enabling "large page support" in Mysql for Xwiki?
Doesn't Xwiki make use of Large pages for document attachments and other
storage, and wouldn't this be useful for high-volume Xwiki based systems?
(Fedora Linux has this feature enabled by default.)
The improvement? "Applications that perform a lot of memory accesses may
obtain performance improvements by using large pages due to reduced
Translation Lookaside Buffer (TLB) misses."
Is this worth doing? Would it improve performance (or are bottlenecks
elsewhere that make this tweak irrelevant)?
............
http://dev.mysql.com/doc/refman/5.0/en/innodb-configuration.html says:
On Linux, if the kernel is enabled for large page
support, InnoDB can use
large pages to allocate memory for its buffer pool and additional memory
pool. See Section 7.5.9, “Enabling Large Page Support”.
-->
http://dev.mysql.com/doc/refman/5.0/en/large-page-support.html says:
7.5.9. 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.
Currently, MySQL supports only 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”:
shell> cat /proc/meminfo | grep -i huge
HugePages_Total: 0
HugePages_Free: 0
HugePages_Rsvd: 0
HugePages_Surp: 0
Hugepagesize: 4096 kB
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.
[...]
With this option, InnoDB uses large pages
automatically for its buffer pool
and additional memory pool. If InnoDB cannot do this, it falls back to use
of traditional memory and writes a warning to the error log: Warning: Using
conventional memory pool
To verify that large pages are being used, check
/proc/meminfo again:
shell> cat /proc/meminfo | grep -i huge
HugePages_Total: 20
HugePages_Free: 20
HugePages_Rsvd: 2
HugePages_Surp: 0
Hugepagesize: 4096 kB
Niels
http://nielsmayer.com