From a2230a39cf3098a5165a077339ace2e790067764 Mon Sep 17 00:00:00 2001
From: ludovicp <ludovicp@localhost>
Date: Mon, 05 Jul 2010 10:40:13 +0000
Subject: [PATCH] Apply SleepyCat recommendations regarding JE default tunings. The max log size is decreased to 10MB and checkpointer to 20MB. Also increases the number of cleaners to match the default number of workers. These new settings are helping with reducing the etimes on write operations

---
 opends/src/server/org/opends/server/backends/jeb/ConfigurableEnvironment.java |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/opends/src/server/org/opends/server/backends/jeb/ConfigurableEnvironment.java b/opends/src/server/org/opends/server/backends/jeb/ConfigurableEnvironment.java
index 6944227..5de7a6a 100644
--- a/opends/src/server/org/opends/server/backends/jeb/ConfigurableEnvironment.java
+++ b/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();

--
Gitblit v1.10.0