Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-4391

Add ability to start RS as root and call mlockall

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.94.0
    • 0.95.0
    • regionserver
    • None
    • Reviewed
    • 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
    • 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.

      Attachments

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

        Issue Links

          Activity

            People

              mbertozzi Matteo Bertozzi
              tlipcon Todd Lipcon
              Votes:
              0 Vote for this issue
              Watchers:
              11 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: