[erlang-questions] +swt very_low doesn't seem to avoid schedulers getting

Patrik Nyblom <>
Tue Oct 16 15:44:50 CEST 2012


On 10/16/2012 01:08 PM, Vance Shipley wrote:
> Rickard,
> Maybe you can offer some insight into a problem I'm having.  I have
> a linked in driver which uses port level blocking with many ports.
> The driver uses driver_set_timer() to wake up in so many milliseconds
> (e.g. 10ms) to do a small amount of work in it's timeout() callback.
> What we see is that despite a low CPU usage and multiple schedulers
> often the timeout will be called quite late (e.g. 10-20ms late).
What does the other callbacks in your driver do? Anything that could 
take 10-20 ms? In that case it's normal, your port is locked for what 
would be considered a very long time in a driver.
> I have spent quite a bit of time looking at the implementation of the
> schedulers but am not sure what's going on.  I am beginning to think
> the shceduler is going off to do aux work.
> We've tried changing +swt without effect.  What do you think?
> On Wed, Oct 10, 2012 at 09:12:23PM +0200, Rickard Green wrote:
> }  This compaction of load onto fewer schedulers is there in order to
> }  reduce communication overhead when there aren't enough work to
> }  fully utilize all schedulers. The performance gain of this
> }  compaction depends on the hardware.

More information about the erlang-questions mailing list