3 Replies Latest reply: Nov 12, 2009 12:06 AM by 843829 RSS

    UseLargePages + UseConcMarkSweepGC + UseCompressedOops

    843829
      Bug or intended?

      When combining all 3 of the options above, java refuses to use large pages under linux.

      Version: Java(TM) SE Runtime Environment (build 1.6.0_14-b08), Java HotSpot(TM) 64-Bit Server VM (build 14.0-b16, mixed mode)
      Test: Hello world

      Fails:
      sudo -u www-data java -Xmx128M -Xms128M -XX:+UseCompressedOops -XX:+UseConcMarkSweepGC -XX:+UseLargePages Hello
      Java HotSpot(TM) 64-Bit Server VM warning: Failed to attach shared memory (errno = 22).
      Hello World
      Works:

      Don't use concurrent mark sweep collector:
      sudo -u www-data java -Xmx128M -Xms128M -XX:+UseCompressedOops -XX:+UseParallelGC -XX:+UseLargePages Hello
      Hello World
      Don't use compressed oops:
      sudo -u www-data java -Xmx128M -Xms128M -XX:+UseConcMarkSweepGC -XX:+UseLargePages Hello
      Hello World
      Don't use large pages:
      sudo -u www-data java -Xmx128M -Xms128M -XX:+UseConcMarkSweepGC -XX:+UseCompressedOops Hello
      Hello World
      Too bad parallel new is too slow for a 12G heap - got up to 10s pause times. I'll have to skip large pages for now then.