<div dir="auto">Yup, that’s it exactly. I’m planning on trying cluster affinity based on the current CPU for submitting/unparking platform thread, and was going to explore balancing while I was at it. </div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, 7 Sep 2024 at 11:15 PM, Alan Bateman <<a href="mailto:alan.bateman@oracle.com">alan.bateman@oracle.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)"><u></u>

  
  <div>
    On 06/09/2024 08:10, Danny Thomas wrote:<br>
    <blockquote type="cite">
      
      <div dir="ltr">Thanks Franz, Alan,<br>
        <br>
        I spun up a quick experiment with a custom scheduler here:<br>
        <br>
        <a href="https://urldefense.com/v3/__https://github.com/DanielThomas/virtual-threads-cluster-aware__;!!ACWV5N9M2RV99hQ!LpIm0wPe4UjF5tJvF0CQKTE98rTBgsqe-WIHDLDCt3HheQHfb-ldWdCf7vfWNxI8nEmUjf3AyP91_aq0XA$" target="_blank">https://github.com/DanielThomas/virtual-threads-cluster-aware</a><br>
      </div>
    </blockquote>
    <br>
    Would I be correct to say that this experiment is a FJP (in
    async/fifo mode) for each "cluster" with the worker threads bound to
    the processors in that cluster. A "front-end" scheduler forwards
    tasks to one of the FJP instances. If a platform thread starts or
    unparks a virtual thread then the target's task will be submitted to
    a random FJP instance. If a virtual thread starts or unparks another
    virtual thread then it will be submitted to the "current" FJP. 
    Assuming I have this right thing I would expect it works well for
    workloads where there are platform threads in the picture as that
    will have the effect of balancing the load across the FJP instances.
    In other cases then I assume it could be a bit unbalanced, at least
    not without something that nudges virtual threads to other clusters.</div><div><br>
    <br>
    -Alan<br>
  </div>

</blockquote></div></div>