[ENet-discuss] 4 seconds stalls.. congestion problem?
chrismeub at gmail.com
Sat Nov 20 16:32:00 PST 2010
I have a client/server scenario with ENet driving an RTS deterministic
simulation. The server is an Ubuntu Linux Server, Client is a Macbook
The server sends a reliable packet to each client (only 1 right now)
10 times a second. The client can send commands to the server but is
not needed to reproduce the problem.
I can packet sniff with Wireshark on the client to verify there are
about 11 packets/second from server->client (56 bytes each) and about
11 packets sent back from client->server (52 bytes each, I'm assuming
these are the ACKs).
The problem is the simulation runs fine for anywhere from 30 seconds
to 10 minutes... but eventually I get a stall of 3-5 seconds where no
packets are received from the server. The client-side simulation runs
out of Turns to process and is forced to freeze. Finally I get the
expected packets in bulk and the simulation recovers. This will happen
every so often until eventually it is so bad (7-10 seconds, multiple
stalls in a row) that the server disconnects the client.
Originally I was sending 20 packets per second.. and I turned it down
to 10 but it didnt really help.
I have tried hosting on different servers... and running the client
from within different networks, same problem.
However, the problem does NOT show up when I host a LAN server on
another Mac on the same subnet.
I have debugged as much as I can and I am sure the server is *trying*
to send the packets... they are just getting stalled in the network
somewhere. When I ping the server during one of these timeouts... my
pings also timeout... so It's definitely some kind of network issue.
The bandwidth seems overloaded but I have no clue that it's going to
stall until I lose connection for 4 seconds. I have 0% packet loss
with the ENET_DEBUG output until I stall, then it's like 2% packet
So my questions are:
-What is happening? I am always using broadband internet, I am sure I
am not exceeding my bandwidth.
-From what I've read it sounds like I am congesting my router or
something.. but how can this happen with only 10 packets/s each way at
56 bytes each?
-How can I debug this with ENet? How can I find out where the problem lies?
Thank you to anyone who can help me with this. I'm pulling my hair out
trying to debug it.
More information about the ENet-discuss