Possible to turn off CPU starvation checker #3282
|
Hello. Is it possible to turn off the CPU starvation checker? |
Replies: 3 comments 2 replies
|
Yes, set the |
Fwiw, this probably means your CPU is starved. :-) At least, if we define "starvation" as in terms of the amount of time it would take an external async completion (such as a new incoming connection) to actually get scheduled and recognized. There's a lot of assumptions baked into that definition though, which might not apply to your app. Definitions aside, the fun thing about the starvation checker is it indirectly detects starvation caused by contention from threads that Cats Effect doesn't control. So the external pool usage doesn't really have an impact here, it's just a measurement of whether or not the synthesis of the Cats Effect and the OS kernel schedulers are able to keep up with interrupts in a timely fashion. |
|
I've been asked about this message from our users (of a large scala.js app) and thanks for the workaround. |
Yes, set the
cpuStarvationCheckInitialDelaytoDuration.Infcats-effect/core/shared/src/main/scala/cats/effect/unsafe/IORuntimeConfig.scala
Line 30 in 0c6abf3