wangzhigang1999 opened a new issue, #7662: URL: https://github.com/apache/kyuubi/issues/7662
### Describe the feature \#7656 added optional virtual thread support for the Thrift Binary frontend. This issue proposes extending it to other I/O-bound Server executors, including HTTP frontends, operation execution, Server-to-Engine RPC, engine lifecycle helpers, metadata workers, batch submission, Data Agent, and Kubernetes operations. **Engine-side executors remain out of scope.** ### Motivation Kyuubi Server is an I/O gateway. Many of these executors spend most of their time waiting for network calls, engine responses, subprocess output, or cluster APIs, which makes them suitable for virtual threads. ### Describe the solution Add a Server-wide opt-in configuration: ```properties kyuubi.server.virtualThreads.all.enabled=false ``` Component-level options inherit this value, while an explicitly configured component option takes precedence. The implementation preserves concurrency limits, queues, rejection behavior, serialization, metrics, and shutdown semantics. CPU-bound pools and library-owned event loops remain on platform threads. ### Benchmark TL;DR We benchmarked Baseline and All Virtual Threads (All VT) on JDK 25.0.3 with Spark 4.2 in Kubernetes cluster mode. Each cell used a 60-second warm-up and a 300-second measurement window. Server and Engine ran in separate Pods. Throughput is reported as completed operations per second. The p50 value is median latency. Native Memory Tracking (NMT) is the JVM facility used to measure committed native thread memory. | Workload and metric | Baseline | All VT | Change | | --- | ---: | ---: | ---: | | Connection churn throughput | 558.7 ops/s | 745.0 ops/s | +33.4% | | Connection churn p50 | 681.8 ms | 411.4 ms | -39.7% | | Connection churn NMT thread memory | 120.8 MiB | 4.6 MiB | -96.2% | | Operation lifecycle throughput | 108.0 ops/s | 104.2 ops/s | -3.5% | | Operation lifecycle NMT thread memory | 124.1 MiB | 5.6 MiB | -95.5% | | Metadata throughput | 5428.4 ops/s | 5430.0 ops/s | Flat | | Metadata Server CPU | 4.58 cores | 4.11 cores | -10.2% | | Metadata container memory | 3322.6 MiB | 3156.8 MiB | -5.0% | | Short Spark SQL throughput | 13.230 ops/s | 13.227 ops/s | Flat | | 10 GB Spark SQL throughput | 0.337 ops/s | 0.347 ops/s | +3.0% | All requests completed without failures. The Core configuration performed slightly better than All VT in some workloads, so the global option remains disabled by default and users can override individual components. The performance benchmark used JDK 25. JDK 21 pinning remains a separate compatibility concern and requires targeted validation. I am willing to submit a PR. -- 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. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
