Increase application performance with libhugetlbfs

Who is this for?

This is an advanced topic for engineers looking for ways to increase performance on Arm servers.

What will you learn?

Upon completion of this Learning Path, you will be able to:

  • Enable `libhugetlbfs` on an Arm server running Linux.
  • Evaluate performance improvements for workloads such as MySQL.

Prerequisites

Before starting, you will need the following:

  • An Arm server or virtual machine instance from a cloud service provider with Ubuntu installed
  • Knowledge of how to build a MySQL server and run the sysbench benchmark test

Summary

AI-assisted

This summary was drafted with an approved AI-assisted workflow and reviewed by Arm contributors before publication. Human technical review remains part of the process so the final page reflects engineering rigor, accuracy, and Arm editorial standards.

Close
?
You’ll enable libhugetlbfs on an Arm Linux server and configure hugepages for application text, data, heap allocations, and shared memory. First, you’ll apply the settings to a MySQL workload, use sysbench to capture a baseline, and compare results after the change. Then, you’ll use the comparison to evaluate whether large pages might help workloads affected by frequent TLB misses.

Frequently asked questions

AI-assisted

These FAQs were drafted with an approved AI-assisted workflow and reviewed by Arm contributors before publication. Human technical review remains part of the process so the final page reflects engineering rigor, accuracy, and Arm editorial standards.

Close
?
Which build options do I need to change to compile MySQL with libhugetlbfs?
Add the flags to both -DCMAKE_C_FLAGS and -DCMAKE_CXX_FLAGS when you configure the MySQL build. Applying the flags to both C and C++ ensures the full server build picks up the change.
Do I also need to change how I start mysqld after building?
Yes. Change both the build and the run of the MySQL server to enable libhugetlbfs.
What should I check if the build fails after I add the flags?
Confirm that you applied the options to both -DCMAKE_C_FLAGS and -DCMAKE_CXX_FLAGS. Verify that the required Ubuntu packages for libhugetlbfs are installed, and that the library path you reference matches your system.
How do I measure whether libhugetlbfs helped my MySQL workload?
Use your existing sysbench workflow to record a baseline, enable libhugetlbfs, and rerun the same tests. Compare the before-and-after results to evaluate any change.
When is libhugetlbfs likely to help my application?
libhugetlbfs can benefit applications that use considerable amounts of memory and might incur many TLB misses. Workloads with sizable code, data, or heap sections are good candidates.
Next