Skip to content

Commit 96f485f

Browse files
authored
Merge branch 'master' into webappproxy
2 parents ec12855 + 61e84e5 commit 96f485f

File tree

30 files changed

+41
-51
lines changed

30 files changed

+41
-51
lines changed

docs/en/changes/changes.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,26 @@
6666
* BanyanDB: fix Zipkin query missing tag `QUERY`.
6767
* Fix `IllegalArgumentException: Incorrect number of labels`, tags in the `LogReportServiceHTTPHandler` and `LogReportServiceGrpcHandler` inconsistent with `LogHandler`.
6868
* BanyanDB: fix Zipkin query by `annotationQuery`
69+
* HTTP Server: Use the default shared thread pool rather than creating a new event loop thread pool for each server. Remove the `MAX_THREADS` from each server config.
70+
* Optimize all Armeria HTTP Server(s) to share the `CommonPools` for the whole JVM.
71+
In the `CommonPools`, the max threads for `EventLoopGroup` is `processor * 2`, and for `BlockingTaskExecutor` is `200` and can be recycled if over the keepAliveTimeMillis (60000L by default).
72+
Here is a summary of the thread dump without UI query in a simple Kind env deployed by SkyWalking showcase:
73+
74+
| **Thread Type** | **Count** | **Main State** | **Description** |
75+
|---------------------------------|-----------|-----------------------------|---------------------------------------------------------------------------------------------------------------------------------------|
76+
| **JVM System Threads** | 12 | RUNNABLE/WAITING | Includes Reference Handler, Finalizer, Signal Dispatcher, Service Thread, C2/C1 CompilerThreads, Sweeper thread, Common-Cleaner, etc. |
77+
| **Netty I/O Worker Threads** | 32 | RUNNABLE | Threads named "armeria-common-worker-epoll-*", handling network I/O operations. |
78+
| **gRPC Worker Threads** | 16 | RUNNABLE | Threads named "grpc-default-worker-*". |
79+
| **HTTP Client Threads** | 4 | RUNNABLE | Threads named "HttpClient-*-SelectorManager". |
80+
| **Data Consumer Threads** | 47 | TIMED_WAITING (sleeping) | Threads named "DataCarrier.*", used for metrics data consumption. |
81+
| **Scheduled Task Threads** | 10 | TIMED_WAITING (parking) | Threads named "pool-*-thread-*". |
82+
| **ForkJoinPool Worker Threads** | 2 | WAITING (parking) | Threads named "ForkJoinPool-*". |
83+
| **BanyanDB Processor Threads** | 2 | TIMED_WAITING (parking) | Threads named "BanyanDB BulkProcessor". |
84+
| **gRPC Executor Threads** | 3 | TIMED_WAITING (parking) | Threads named "grpc-default-executor-*". |
85+
| **JVM GC Threads** | 13 | RUNNABLE | Threads named "GC Thread#*" for garbage collection. |
86+
| **Other JVM Internal Threads** | 3 | RUNNABLE | Includes VM Thread, G1 Main Marker, VM Periodic Task Thread. |
87+
| **Attach Listener** | 1 | RUNNABLE | JVM attach listener thread. |
88+
| **Total** | **158** | - | - |
6989

7090
#### UI
7191

docs/en/setup/backend/configuration-vocabulary.md

Lines changed: 0 additions & 6 deletions
Large diffs are not rendered by default.

oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/CoreModuleProvider.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,6 @@ public void prepare() throws ServiceNotProvidedException, ModuleStartException {
253253
.port(moduleConfig.getRestPort())
254254
.contextPath(moduleConfig.getRestContextPath())
255255
.idleTimeOut(moduleConfig.getRestIdleTimeOut())
256-
.maxThreads(moduleConfig.getRestMaxThreads())
257256
.acceptQueueSize(
258257
moduleConfig.getRestAcceptQueueSize())
259258
.maxRequestHeaderSize(

oap-server/server-library/library-server/src/main/java/org/apache/skywalking/oap/server/library/server/http/HTTPServer.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
import com.linecorp.armeria.server.docs.DocService;
2828
import com.linecorp.armeria.server.encoding.DecodingService;
2929
import com.linecorp.armeria.server.logging.LoggingService;
30-
3130
import java.io.FileInputStream;
3231
import java.io.IOException;
3332
import java.io.InputStream;
@@ -60,7 +59,6 @@ public void initialize() {
6059
.builder()
6160
.baseContextPath(config.getContextPath())
6261
.serviceUnder("/docs", DocService.builder().build())
63-
.workerGroup(config.getMaxThreads())
6462
.http1MaxHeaderSize(config.getMaxRequestHeaderSize())
6563
.idleTimeout(Duration.ofMillis(config.getIdleTimeOut()))
6664
.decorator(Route.ofCatchAll(), (delegate, ctx, req) -> {

oap-server/server-library/library-server/src/main/java/org/apache/skywalking/oap/server/library/server/http/HTTPServerConfig.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@ public class HTTPServerConfig {
3131
private int port;
3232
private String contextPath;
3333

34-
@Builder.Default
35-
private int maxThreads = 200;
3634
@Builder.Default
3735
private long idleTimeOut = 30000;
3836
@Builder.Default

oap-server/server-query-plugin/logql-plugin/src/main/java/org/apache/skywalking/oap/query/logql/LogQLConfig.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ public class LogQLConfig extends ModuleConfig {
2828
private String restHost;
2929
private int restPort;
3030
private String restContextPath;
31-
private int restMaxThreads = 200;
3231
private long restIdleTimeOut = 30000;
3332
private int restAcceptQueueSize = 0;
3433
}

oap-server/server-query-plugin/logql-plugin/src/main/java/org/apache/skywalking/oap/query/logql/LogQLProvider.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ public void start() throws ServiceNotProvidedException, ModuleStartException {
7272
.port(config.getRestPort())
7373
.contextPath(config.getRestContextPath())
7474
.idleTimeOut(config.getRestIdleTimeOut())
75-
.maxThreads(config.getRestMaxThreads())
7675
.acceptQueueSize(config.getRestAcceptQueueSize())
7776
.build();
7877

oap-server/server-query-plugin/promql-plugin/src/main/java/org/apache/skywalking/oap/query/promql/PromQLConfig.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ public class PromQLConfig extends ModuleConfig {
2828
private String restHost;
2929
private int restPort;
3030
private String restContextPath;
31-
private int restMaxThreads = 200;
3231
private long restIdleTimeOut = 30000;
3332
private int restAcceptQueueSize = 0;
3433

oap-server/server-query-plugin/promql-plugin/src/main/java/org/apache/skywalking/oap/query/promql/PromQLProvider.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ public void start() throws ServiceNotProvidedException, ModuleStartException {
7373
.port(config.getRestPort())
7474
.contextPath(config.getRestContextPath())
7575
.idleTimeOut(config.getRestIdleTimeOut())
76-
.maxThreads(config.getRestMaxThreads())
7776
.acceptQueueSize(config.getRestAcceptQueueSize())
7877
.build();
7978

oap-server/server-query-plugin/zipkin-query-plugin/src/main/java/org/apache/skywalking/oap/query/zipkin/ZipkinQueryConfig.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ public class ZipkinQueryConfig extends ModuleConfig {
2828
private String restHost;
2929
private int restPort;
3030
private String restContextPath;
31-
private int restMaxThreads = 200;
3231
private long restIdleTimeOut = 30000;
3332
private int restAcceptQueueSize = 0;
3433
private long lookback = 86400000L;

0 commit comments

Comments
 (0)