Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

8
  • Thank you for taking the time to answer my question! I will delete my question because I gained a lot of insight into what's going on and how to write a much more insightful question. Sorry that this answer will probably go to waste (my new question will refute each and every point in this answer, so if you want to read about it, stay tuned, probably next week). Well, it seems like I cannot delete it. But either way, I would like to make great amendments to it. I guess I should ask mods for that. Commented Nov 16, 2021 at 16:54
  • 5
    @Incomputable I don't see any reason to delete this. If you have this question, someone else will surely have it too. You can ask another question regardless. Commented Nov 16, 2021 at 18:12
  • 1
    in asynchronous model worker threads "manually" switch contexts much more often than in thread-per-request/thread-per-connection, so in asynchronous model there are way more cache misses and invalidations, thus the facts you pointed are against the asynchronous model. Furthermore, there's nothing that stops us from maintaining a thread-pool in thread-per-request/connection model as well to avoid frequent thread creation/destruction: just the maximum limit should be much bigger. Commented Nov 17, 2021 at 19:47
  • @morgwai Can you provide some docs/evidence of increased cache misses? Commented Nov 17, 2021 at 19:55
  • 2
    I would be honestly astonished if a single thread running coroutines had more cache misses than multiple threads context-switching. The coroutines would have to be as heavy-weight as a thread execution context for this to seem plausible. I guess there are corner cases like each coroutine fills L1 and they never share any memory ... Commented Nov 17, 2021 at 20:08