You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2021/03/29 14:43:11 UTC

[GitHub] [skywalking] EvanLjp commented on a change in pull request #6642: make sync metrics concurrency

EvanLjp commented on a change in pull request #6642:
URL: https://github.com/apache/skywalking/pull/6642#discussion_r603354429



##########
File path: oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/CoreModuleConfig.java
##########
@@ -134,10 +134,31 @@
     @Getter
     private String searchableLogsTags = "";
 
+    /**
+     * The number of threads used to synchronously refresh the metrics data to the storage. When the value is zero or
+     * negative, the number of processors will used as the default value.
+     *
+     * @since 8.5.0
+     */
+    @Setter
+    private int syncThreads = -1;
+
+    /**
+     * The maximum number of processes supported for each synchronous storage operation. When the number of the flush
+     * data is greater than this value, it will be assigned to multiple cores for execution.
+     */
+    @Getter
+    @Setter
+    private int maxSyncOperationNum = 50000;
+
     public CoreModuleConfig() {
         this.downsampling = new ArrayList<>();
     }
 
+    public int getSyncThreads() {
+        return this.syncThreads > 0 ? this.syncThreads : Runtime.getRuntime().availableProcessors();

Review comment:
       I just set the maximum parallelism for this. But I have no experience with this.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org