Loom and high performance networking
Alan Bateman
alan.bateman at oracle.com
Tue Aug 13 12:32:29 UTC 2024
On 13/08/2024 12:25, Robert Engels wrote:
> :
>
> Using VT pollers (pollerMode=2) and default parallelism:
>
> robertengels at macmini go-wrk % wrk -H 'Host: imac' -H 'Accept:
> text/plain,text/html;q=0.9,application/xhtml+xml;q=0.9,application/xml;q=0.8,*/*;q=0.7'
> -H 'Connection: keep-alive' --latency -d 20 -c 1000 --timeout 8 -t 8
> http://imac:8080/plaintext
> <https://urldefense.com/v3/__http://imac:8080/plaintext__;!!ACWV5N9M2RV99hQ!OSop_Xwpde2E9iW4xAOJ-iUfPMQ4NDkHxIr3S7UmvlgiGk94boiQLh9ZO6Btn1uwp6HY3TYdhv9yzjU8$>
> Running 20s test @ http://imac:8080/plaintext
> <https://urldefense.com/v3/__http://imac:8080/plaintext__;!!ACWV5N9M2RV99hQ!OSop_Xwpde2E9iW4xAOJ-iUfPMQ4NDkHxIr3S7UmvlgiGk94boiQLh9ZO6Btn1uwp6HY3TYdhv9yzjU8$>
> 8 threads and 1000 connections
> Thread Stats Avg Stdev Max +/- Stdev
> Latency 66.76ms 137.25ms 1.70s 87.06%
> Req/Sec 14.38k 2.36k 21.94k 75.88%
> Latency Distribution
> 50% 4.74ms
> 75% 51.68ms
> 90% 263.08ms
> 99% 664.99ms
> 2289858 requests in 20.02s, 310.10MB read
> Socket errors: connect 0, read 2135, write 7, timeout 0
> Requests/sec: 114360.91
> Transfer/sec: 15.49MB
>
> and the same 8% idle.
>
> So I am pretty sure my hypothesis is correct. I may try and build a
> Loom / use a library to lower priority of the carrier threads. I
> suspect I will see similar performance to the reduced parallelism case.
With -Djdk.pollerMode=2 then the poller threads are virtual threads and
so run on the same carrier. You'll need to play with -Djdk.readPollers=N
as there isn't a good default for this on macOS.
-Alan.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/loom-dev/attachments/20240813/7bc7ab89/attachment.htm>
More information about the loom-dev
mailing list