这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@edigaryev
Copy link
Collaborator

@edigaryev edigaryev commented Aug 1, 2022

It turns out that:

...which behaves wildly inefficient for reasons that can't be diagnosed easily without getting source code access:

Screenshot 2022-08-02 at 02 08 00

However, we can force the AsyncHTTPClient to take a different path by manually specifying the event loop group provider.

This seems to be a simpler and faster alternative than #159: I'm getting 10x the speed of main branch and that of the chunked variant with way less CPU usage.

Resolves #158, #165.

@edigaryev edigaryev requested a review from fkorotkov August 1, 2022 21:29
@edigaryev edigaryev enabled auto-merge (squash) August 1, 2022 21:30
@fkorotkov
Copy link
Contributor

Very interesting finding! Thank you for profiling it and finding the root cause. Is there any sense n using more then 1 thread for the group? Probably not since we don't do parallel requests explicitly but maybe internally there are some events that can be processed in parallel. 🤔

@edigaryev
Copy link
Collaborator Author

Is there any sense n using more then 1 thread for the group? Probably not since we don't do parallel requests explicitly but maybe internally there are some events that can be processed in parallel. 🤔

I don't think it makes sense to bump it at this point since the performance is already quite good and it seems to be a safe choice given that AsyncHTTPClient uses 1 thread by default too.

@edigaryev edigaryev merged commit 56ddd8d into main Aug 1, 2022
@edigaryev edigaryev deleted the prevent-nio-transport-services branch August 1, 2022 22:17
@fkorotkov
Copy link
Contributor

Do we need #159 as a feature now? 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

image push speed

3 participants