Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8232207

Linux os::available_memory re-reads cgroup configuration on every invocation

XMLWordPrintable

    • b20
    • x86
    • linux

        On Linux systems considered containerized then os::available_memory will call into OSContainer::memory_limit_in_bytes and read the memory limit information from the /proc/self/mountinfo or similar.

        This can take significant background resources, mostly since os::available_memory is called every iteration of each compiler thread's main loop to help determine if the system should add more compiler threads.

        There are a couple of possible solutions:

        - add a grace time to how often OSContainer::memory_limit_in_bytes actually reads the /proc configuration
        - refactor compiler thread loop to make that possibly_add_compiler_threads a periodic task rather than something that each and every compiler thread does between every compilation

              redestad Claes Redestad
              redestad Claes Redestad
              Votes:
              0 Vote for this issue
              Watchers:
              10 Start watching this issue

                Created:
                Updated:
                Resolved: