Configuring Huge Pages for the Code Segment
Configuring huge pages for the code segment of ceph-osd can reduce the number of misses in the instruction translation lookaside buffer (iTLB) and further improve performance.
Perform the following steps on all server nodes.
- Mount the tmpfs huge page to the /media directory.
1mount -t tmpfs -o huge=always tmpfs /media/
- Copy the ceph-osd binary file to tmpfs and add a symbolic link to the original path.
1 2
cp /usr/bin/ceph-osd /media/ ln -sf /media/ceph-osd /usr/bin/ceph-osd
- Escalate the privilege of ceph-osd to enable it to access huge pages.
1setcap 'CAP_DAC_OVERRIDE+eip CAP_SYS_ADMIN+eip' /media/ceph-osd
- Enable the transparent hugepage option.
1echo always > /sys/kernel/mm/transparent_hugepage/enabled
- Restart OSD processes on all server nodes.
1systemctl restart ceph-osd.target
Parent topic: Hugepage Configuration Tuning