[
https://issues.apache.org/jira/browse/CXF-9059?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17882437#comment-17882437
]
Jamie Mark Goodyear commented on CXF-9059:
------------------------------------------
Windows 11 Pro, 16 clients for ten minutes on Java 17:
{{=============Overall Test Result============ }}
{{Overall Throughput: get 1327.0985260828597 (invocations/sec) }}
{{Overall AVG. response time: 0.7535235555958739 (ms) }}
{{1.2743023E7 (invocations), running 9602.168 (sec) }}
{{============================================}}
{{Windows 11 Pro, 16 clients for ten minutes on Java 21:}}
{{=============Overall Test Result============ }}
{{Overall Throughput: get 1611.1071885223246 (invocations/sec) }}
{{Overall AVG. response time: 0.6206911663755781 (ms) }}
{{1.547066E7 (invocations), running 9602.502 (sec) }}
{{============================================}}
The Java 21 runtime obtained higher throughput.
> HttpConduit should flush output stream ahead of closing connections when
> HttpClient is autocloseable
> ----------------------------------------------------------------------------------------------------
>
> Key: CXF-9059
> URL: https://issues.apache.org/jira/browse/CXF-9059
> Project: CXF
> Issue Type: Improvement
> Components: JAX-RS
> Affects Versions: 4.1.0
> Reporter: Jamie Mark Goodyear
> Priority: Major
> Fix For: 4.1.0
>
>
> HttpConduit should flush output stream ahead of closing connections when
> HttpClient is autocloseable.
> When running WebClient in a load test (single host) we'll observe low
> throughput.
> When we adjust the HttpConduit to flush output stream ahead of connection
> close, we observe significant throughput improvement.
> Given this appears to affect just autocloseable HttpClient, we select to
> flush the output stead only when the JVM provides the autocloseable
> HttpClient variety.
>
> AbstractConduit:
> finally {
> OutputStream os = msg.getContent(OutputStream.class);
> // Java 21 may hang on close, we flush stream to help close them out.
> if (os != null && AutoCloseable.class.isAssignableFrom(HttpClient.class))
> {.
> os.flush();
> }
> super.close(msg);
> }
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)