mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

ludovicp
05.40.2010 66088ec1b70555e734f274d0b4d5e0229c5205f6
opendj-sdk/opends/src/server/org/opends/server/backends/jeb/ConfigurableEnvironment.java
@@ -318,9 +318,11 @@
        if (attrName.equals(ATTR_NUM_CLEANER_THREADS) && value == null)
        {
          // Automatically choose based on the number of processors.
          // Automatically choose based on the number of processors. We will use
          // similar heuristics to those used to define the default number of
          // worker threads.
          int cpus = Runtime.getRuntime().availableProcessors();
          value = Integer.valueOf(Math.max(2, cpus / 2));
          value = Integer.valueOf(Math.max(24, cpus * 2));
          Message message =
              INFO_ERGONOMIC_SIZING_OF_JE_CLEANER_THREADS.get(String
@@ -335,7 +337,7 @@
          // We'll assume that the user has also allowed automatic
          // configuration of cleaners and workers.
          int cpus = Runtime.getRuntime().availableProcessors();
          int cleaners = Math.max(2, cpus / 2);
          int cleaners = Math.max(24, cpus * 2);
          int workers = Math.max(24, cpus * 2);
          BigInteger tmp = BigInteger.valueOf((cleaners + workers) * 2);
          value = tmp.nextProbablePrime();