5x Slower Context Switching Between Fiber-vs-Thread

Volkan Yazıcı volkan.yazici at gmail.com
Tue Feb 5 12:33:17 UTC 2019

It indeed looks to be the case:

$ java -XX:+UnlockDiagnosticVMOptions -XX:+UseNewCode SlowFiberReport.java
threads took 6138 ms
fibers took *8977* ms

$ java SlowFiberReport.java
threads took 6709 ms
fibers took *32389* ms

Thanks for taking time to check, appreciated.


On Tue, Feb 5, 2019 at 1:19 PM Alan Bateman <Alan.Bateman at oracle.com> wrote:

> On 05/02/2019 08:41, Volkan Yazıcı wrote:
> I have created a GiST:
> https://gist.github.com/vy/c5031a54d42f9e5b855463c838fed6a9
> You can just run the file as follows: *java SlowFiberReport.java*
> Thanks. For this test then I assume it is spending almost all of the time
> freezing and thawing, something that is work in progress and a bit early to
> benchmark at this time. In addition, from your numbers, I suspect this test
> may be yielding with interpreter frames on the continuation stack for
> most/all of the run. You may have heard Ron speak about lazy copy which
> involves thawing only a portion of the stack. It's not enabled by default
> yet but you can try it with -XX:+UnlockDiagnosticVMOptions -XX:+UseNewCode
> (not -XX:+UnlockExperimentalVMOptions as we have on the wiki).
> -Alan

More information about the loom-dev mailing list