[erlang-questions] Dirty NIF - classifying as CPU or I/O bound

Roger Lipscombe roger@REDACTED
Sun Oct 14 14:41:50 CEST 2018


The documentation (http://erlang.org/doc/man/erl_nif.html#dirty_nifs) says:

"It is important to classify the dirty job correct [sic]. An I/O bound job
should be classified as such, and a CPU bound job should be classified as
such. If you should classify CPU bound jobs as I/O bound jobs, dirty I/O
schedulers might starve ordinary schedulers. I/O bound jobs are expected to
either block waiting for I/O, and/or spend a limited amount of time moving
data."

If I *don't know* whether the job is going to be CPU bound or I/O bound (it
executes arbitrary code provided by a third party), am I safest to just
classify the dirty job as CPU-bound? Or is this warning hinting at a
disaster of biblical proportions[1] if I even *think* about fudging the
classification?

Thanks,
Roger.

[1] Dr. Peter Venkman, 1984.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20181014/2c4a4b0b/attachment.htm>


More information about the erlang-questions mailing list