[erlang-questions] Improve performance of IO bounded server written in Erlang via having pollset for each scheduler and bind port to scheduler together with process
Fri Jul 13 15:41:53 CEST 2012
On 07/13/2012 04:10 AM, Wei Cao wrote:
> I think periodly calls to erts_deliver_time() is necessary.Because at
> first I tried to comment out the call to erts_deliver_time() from
> erts_check_io(), it would cause erlang VM hang out.
Well, that's hard evidence.
> erts_deliver_time() does more than erts_time_remaining(), it updates
> a clock counter named do_time which is used inside timer wheel.
Okay, I see that now.
Maybe it would be enough to call erts_deliver_time() only if do_wait is
Or if that fails, create a new mutex, say erts_timedelivery_mtx, use
erts_smp_mtx_trylock() on it, and only proceed with the time delivery,
from the thread that succeeds in obtaining the lock. This should keep
do_time relatively fresh.
Hope you don't mind me throwing my silly ideas at you. That is because I
am excited about your great work. I would like erlang in sockets heavy
pumping applications to outperform verything.
I think, I'll try to build and test otp on my own, too. After all, how
hard can it be ;-)
More information about the erlang-questions