Rate This Document
Findability
Accuracy
Completeness
Readability

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.

  1. Mount the tmpfs huge page to the /media directory.
    1
    mount -t tmpfs -o huge=always tmpfs /media/
    
  2. 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
    
  3. Escalate the privilege of ceph-osd to enable it to access huge pages.
    1
    setcap 'CAP_DAC_OVERRIDE+eip CAP_SYS_ADMIN+eip' /media/ceph-osd
    
  4. Enable the transparent hugepage option.
    1
    echo always > /sys/kernel/mm/transparent_hugepage/enabled
    
  5. Restart OSD processes on all server nodes.
    1
    systemctl restart ceph-osd.target