Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #16505: Change ZIO runtime ergonomics #2705

Conversation

fanf
Copy link
Member

@fanf fanf commented Jan 8, 2020

@fanf fanf requested a review from ncharles January 8, 2020 22:21
@fanf fanf added WIP Use that label for a Work In Progress PR that must not be merged yet qa: Can't merge labels Jan 12, 2020
@fanf
Copy link
Member Author

fanf commented Jan 12, 2020

John proposed: You might create a Runtime that is designed for blocking actions, which limits threads to 100 (say), and has a nice queue, and keeps threads alive for a while. That should perform pretty well for "mixed loads" in your scenario. And then you don't have to use Blocking at all anywhere..
I would like to test that before merging that PR.

@fanf
Copy link
Member Author

fanf commented Jan 13, 2020

So I tried to use the same thead pool for async and blocking fibers, and the results are not good. I tried:

  • JDK 8 ForkJoinPool
  • ThreadPoolExecutor with: LinkedBlockingQueue, ArrayBlockingQueue (with 32k size), both fair or not, with a core thread pool of nb CPU, and a max of 256.

The result are similar or worse than with that code, and I got some deadlock (with fairness - not sure why).

So I propose to just use that PR modification which are at least safe, and to come back to that subject latter, when other perf gain will be explored.

@fanf fanf added Ready for merge and removed WIP Use that label for a Work In Progress PR that must not be merged yet qa: Can't merge labels Jan 13, 2020
@Normation-Quality-Assistant
Copy link
Contributor

OK, merging this PR

@Normation-Quality-Assistant Normation-Quality-Assistant merged commit 6ed185b into Normation:branches/rudder/6.0 Jan 13, 2020
@fanf fanf deleted the bug_16505/change_zio_runtime_ergonomics branch March 15, 2024 10:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants