Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-51866

[cbas] Respect COUCHBASE_CPU_COUNT env (set max num of threads for JVM)

    XMLWordPrintable

Details

    • 1
    • CX Sprint 285

    Description

      As part of MB-47591 ns_server reads cgroups CPU limits using sigar and sets COUCHBASE_CPU_COUNT to the approximate number of available cores on the machine (rounded up). Cbas should use this value to set the limit for the number of threads for JVM.
      Note that ns_server will set GOMAXPROCS for the cbas go process, but cbas needs to set all the necessary flags for JVM.

      We can't fully rely on JVM's internals to determine cgroups CPU limits because we need a way to override it. In other words, COUCHBASE_CPU_COUNT can be set not only by ns_server but also by admin, which would mean that admin wants to override cgroups cpu settings.

      Docs: PRD, Design

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              umang.agrawal Umang
              timofey.barmin Timofey Barmin
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty