mondain opened a new pull request, #83:
URL: https://github.com/apache/mina/pull/83

   ## Summary
   
   Add an opt-in TLS contention benchmark to `mina-core`. It exercises 
concurrent writes over one TLS connection and a burst of TLS connections after 
warmup. The benchmark records JFR `jdk.JavaMonitorEnter` and `jdk.ThreadPark` 
events, prints measured rates and distinct client TLS session IDs, and asserts 
only functional completion. It does not change production code or enforce a 
performance threshold in CI.
   
   Run either mode with Java 17 or newer:
   
   ```
   mvn -q -pl mina-core -Dtest=SslContentionBenchmarkTest 
-Dmina.ssl.profile=true -Dmina.ssl.profile.mode=traffic 
-Dmina.ssl.profile.recording=target/tls-traffic.jfr test
   mvn -q -pl mina-core -Dtest=SslContentionBenchmarkTest 
-Dmina.ssl.profile=true -Dmina.ssl.profile.mode=connections 
-Dmina.ssl.profile.recording=target/tls-connections.jfr test
   ```
   
   ## Measurements
   
   On one Linux host with Oracle JDK 21.0.3, using loopback TLS 1.2 and JFR 
enabled, three runs of each default workload produced:
   
   | Workload | Configuration | Observed rate |
   | --- | --- | --- |
   | Concurrent writes | 4 writers, 30,000 writes each, 1,024 bytes/write | 
39.45–46.81 MiB/s echoed |
   | Connections | 64 warmup connections, then 384 timed connections | 
1,317.67–1,354.52 connections/s; one distinct client TLS session ID in each run 
|
   
   For one sample, JFR recorded 40,632 monitor-enter events and 33 thread-park 
events during the write workload, and 591 monitor-enter events and 44 
thread-park events during the connection workload. The recordings are generated 
locally under `mina-core/target/` and are not part of this PR.
   
   ## Limits and validation
   
   These are short, same-process loopback runs on one host. They include 
JSSE/provider behavior, allocation, scheduling, echo handling, and JFR 
collection overhead; they are not production throughput estimates or evidence 
that a particular lock change helps. TLS 1.2, test key material, and the 
default JDK random provider are fixed for these measurements. Compare multiple 
runs on the same host and JDK before drawing performance conclusions.
   
   Validation: both opt-in modes passed in all three measured runs. `mvn -q -pl 
mina-core -Dtest=SslContentionBenchmarkTest,SslFilterScheduledWriteMessagesTest 
test` passed (three tests, zero failures; benchmark skipped by default). `git 
diff --check` passed. A separate `SslEnd2EndTest` run was stopped after more 
than two minutes because that existing parameterized test sends 4,096 messages 
for each of two protocol cases; it did not complete in this validation window.
   


-- 
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]

Reply via email to