summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@sonarsource.com>2016-09-16 16:30:39 +0200
committerSimon Brandhof <simon.brandhof@sonarsource.com>2016-09-16 16:31:34 +0200
commitcdfee0b5b7ec3074e16c9f94c8b4fb7ea1fea274 (patch)
tree2f67a79f4a6b58e9c1ce2d210d75052c90a803f4
parentff3377f4bcb5b97c16d7bee5d2dd0cae9b95cf9e (diff)
downloadsonarqube-cdfee0b5b7ec3074e16c9f94c8b4fb7ea1fea274.tar.gz
sonarqube-cdfee0b5b7ec3074e16c9f94c8b4fb7ea1fea274.zip
SONAR-8075 support more than 12 CPU cores
-rw-r--r--server/sonar-server/src/main/java/org/sonar/server/es/BulkIndexer.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/server/sonar-server/src/main/java/org/sonar/server/es/BulkIndexer.java b/server/sonar-server/src/main/java/org/sonar/server/es/BulkIndexer.java
index c78f30802c1..af9f0888e40 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/es/BulkIndexer.java
+++ b/server/sonar-server/src/main/java/org/sonar/server/es/BulkIndexer.java
@@ -81,7 +81,8 @@ public class BulkIndexer implements Startable {
this.progress = new ProgressLogger(format("Progress[BulkIndexer[%s]]", indexName), counter, LOGGER)
.setPluralLabel("requests");
- this.concurrentRequests = Math.max(1, Runtime.getRuntime().availableProcessors() - 1);
+ // see https://jira.sonarsource.com/browse/SONAR-8075
+ this.concurrentRequests = Math.max(1, Runtime.getRuntime().availableProcessors() / 5);
this.semaphore = new Semaphore(concurrentRequests);
}