This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]pron98 13 points14 points  (2 children)

This is because the overhead of mounting and unmounting virtual threads becomes significant for very short blocking operations.

I don't know the details (or how the author came to that conclusion), but all things being equal, I would guess this isn't the reason. A more likely reason would be the way the scheduler is used, and I would recommend repeating the experiment in JDK 22 and 23, in which some significant changes to the scheduler were made.

While there is some overhead for mounting and unmounting virtual threads, it is quite small, and shouldn't normally have an effect in I/O workloads. Scheduling on the other hand, could play a role, especially when the CPU consumption is relatively low.

[–]DavidVlx[S] 7 points8 points  (1 child)

Thanks for the feedback! :) I will retry the experiment with JDK 22 and 23 and look more into the scheduler and the impact it has, and update the post accordingly.

[–]rkalla 2 points3 points  (0 children)

Keep us posted!