[erlang-questions] running without net tick

Jayson Vantuyl kagato@REDACTED
Sat Sep 26 03:24:57 CEST 2009

Now we're getting somewhere.

First, concerning what I've been trying to communicate.  With 4 ticks  
to a timeout and 10 second timeouts, you will have a timeout  
approximately every three minutes with UDP.  I did a few simulations,  
and with that level of packet loss, I showed 5 events in 20 minutes  
that lost 4 consecutive ticks.  With TCP, highly, highly, highly  
unlikely.  And, as I keep saying, a dedicated connection *lacks* head- 
of-line blocking, so that's not going to be an issue.  Use of UDP  
would vastly increasesthe loss of ticks in congested networks, while  
not really saying much about the liveness of a host (which is the  
point of the ticks).

Second, concerning what you've just brought up (as you've never  
mentioned netsplits on a single machine before), that certainly sounds  
like some sort of starvation.  It's a bug.  If you were to use a  
second TCP socket (as I've suggested), you're likely to have to same  
behavior.  That is, unless it really is due to the ticks getting  
caught in the backlog, as has been suggested.  Again, in that case a  
second connection fixes it as well.  UDP doesn't change any starvation  
behavior.  If emulator is blocked reading from a TCP connection, it  
can't do a recv.  If it's handled non-blocking, another connection is  
all that's needed, TCP is a lot simpler to implement (and perfectly  
performant / safe) than a UDP, and it does not amplify the failures  
due to packet loss in real networks.

Jayson Vantuyl

More information about the erlang-questions mailing list