HBase
  1. HBase
  2. HBASE-4391

Add ability to start RS as root and call mlockall

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.94.0
    • Fix Version/s: 0.95.0
    • Component/s: regionserver
    • Labels:
      None
    • Hadoop Flags:
      Reviewed
    • Release Note:
      Hide
      A new profile, native, has been added to pom.xml Adding '-Pnative' will build libmlockall_agent.so HBase will look for the .so under ./lib/native/PLATFORM (See JAVA_LIBRARY_PATH in the bin/hbase starup script).

      mlockall_agent is a simple VM Agent that allows to lock the address space of
      the region server process. This avoids the process' memory eviction under pressure.

      You can load the agent by adding it as a jvm option:
       export HBASE_REGIONSERVER_OPTS="-agentpath:./libmlockall_agent.so=user=hbase"

      To use this feature, execute the following command as root:
      hbase --mlock user=hbase regionserver start
      Show
      A new profile, native, has been added to pom.xml Adding '-Pnative' will build libmlockall_agent.so HBase will look for the .so under ./lib/native/PLATFORM (See JAVA_LIBRARY_PATH in the bin/hbase starup script). mlockall_agent is a simple VM Agent that allows to lock the address space of the region server process. This avoids the process' memory eviction under pressure. You can load the agent by adding it as a jvm option:  export HBASE_REGIONSERVER_OPTS="-agentpath:./libmlockall_agent.so=user=hbase" To use this feature, execute the following command as root: hbase --mlock user=hbase regionserver start
    • Tags:
      0.96notable

      Description

      A common issue we've seen in practice is that users oversubscribe their region servers with too many MR tasks, etc. As soon as the machine starts swapping, the RS grinds to a halt, loses ZK session, aborts, etc.

      This can be combatted by starting the RS as root, calling mlockall(), and then setuid down to the hbase user. We should not require this, but we should provide it as an option.

      1. HBASE-4391-v0.patch
        24 kB
        Matteo Bertozzi
      2. HBASE-4391-v1.patch
        24 kB
        Matteo Bertozzi
      3. HBASE-4391-v2.patch
        9 kB
        Matteo Bertozzi
      4. HBASE-4391-v3.patch
        9 kB
        Matteo Bertozzi
      5. 4391-v4.patch
        9 kB
        Ted Yu

        Issue Links

          Activity

          No work has yet been logged on this issue.

            People

            • Assignee:
              Matteo Bertozzi
              Reporter:
              Todd Lipcon
            • Votes:
              0 Vote for this issue
              Watchers:
              12 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development