[External] : Re: Experience using virtual threads in EA 23-loom+4-102
Ron Pressler
ron.pressler at oracle.com
Thu Jul 4 18:25:44 UTC 2024
> On 4 Jul 2024, at 19:09, Ron Pressler <ron.pressler at oracle.com> wrote:
>
>
>
>> On 3 Jul 2024, at 18:18, Sam Pullara <spullara at gmail.com> wrote:
>>
>> As a developer trying to use this stuff, I 100% agree that fair is better. If I need something that isn't fair, I can do that myself.
>
> It’s not a question of agreement or preference, but of an actual problem we can solve and know that we’ve solved. We need realistic examples of server workloads where time sharing could help the virtual thread scheduler (and not examples where there are even better solultions without introducing time sharing into the scheduler) before we can change the scheduler to use it. We don’t want to introduce a “solution” without knowing exactly what problem it aims to solve.
>
> However, if and when we expose custom schedulers, they could choose to use time sharing whether it is justified or not.
>
> — Ron
To elaborate more on that, there are two situations. The number of computation-heavy tasks may be small and known, like background processing, in which case we have a trivial solution that’s better than introducing time sharing to the scheduler — run those tasks on platform threads.
So the actual problem time sharing in the virtual thread scheduler would potentially solve is if some portion of the very large number of virtual threads would occasionally need to do heavy computation. But for time sharing to help in that situation, that portion would have to be just right. Too small or too large and time sharing won’t help. So the question becomes, when and how often does such a situation arise in practice? That’s why we need examples from the field.
— Ron
More information about the loom-dev
mailing list