3 knobs you should know in redhat transparent hugepage

There are 3 knobs  in redhat_transparent_hugepage/ in the order of effectiveness

  • enabled   – this is the main knob. Setting as disable will disable THP entirely.
  • defrag – THP is on. If disabled, no defrag by application thread. See note (1) below.
  • khugepaged/defrag – THP is on. If disabled, no defrag by kernel thread khugepaged. See note (2) below

 Note that defrag can happen in 2 scenarios:

  1. When application thread needs memory, it traps into kernel and tries to allocate huge page. If defrag is on, the process will try to coalescent small pages into large pages. (This is what Espresso ran into and the Hadoop blog describes)
  2. THP also has a khugepaged that tries to defrag in the background (so that more huge pages are avail and application thread defrags less frequently).

Thus echo “disable” to “enabled” is sufficient. 

Advertisements

Leave a comment

Filed under Uncategorized

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s