[erlang-questions] How do mailboxes relate to reduction counts?

Sasha Fonseca sashaafm@REDACTED
Sun Mar 5 16:11:10 CET 2017

I’ve read the following blog post (http://jlouisramblings.blogspot.pt/2013/01/how-erlang-does-scheduling.html <http://jlouisramblings.blogspot.pt/2013/01/how-erlang-does-scheduling.html>), and it has the following excerpt which got me thinking:

Both processes and ports have a "reduction budget" of 2000 reductions. Any operation in the system costs reductions. This includes function calls in loops, calling built-in-functions (BIFs), garbage collecting heaps of that process[n1], storing/reading from ETS, sending messages (The size of the recipients mailbox counts, large mailboxes are more expensive to send to). 

I’m wondering how does the size of a process’s mailbox relates the reduction count? Is it due to each message having to be matched against several message patterns in a case condition, for example? Also how large would the mailbox have to be to noticed any kind of impact in, let’s say, a server process?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20170305/0cab6a41/attachment.htm>

More information about the erlang-questions mailing list