Thinking out loud: Do using dirty schedulers affects the BEAM scheduler?

While reading about on how execute long running NIFs on the VM I encountered the dirty schedulers option which seems familiar to me coming from a Java background, where some frameworks have a event loop for each processor and a pool for blocking stuff. Taking as a example a 4 core machine would let us have 4 schedulers for the BEAM, and some OS Threads as dirty schedulers, but using that approach isn’t going to put pressure on the BEAM schedulers? Would that cause any problems as the default NIIF approach or just lose capacity ?

PS: I can’t test it because of Windows problems

If you have 4 cores with 4 schedulers and 4 dirty CPU schedulers, there are obviously cases where the OS kernel will switch to running the dirty schedulers. It’s done on the thread level, though, and OSes are generally good at making sure that all threads get their fair share of computing resources.

4 Likes