- Mon Apr 11, 2011 7:36 am
#7990
Thread should be burned and started over, piles of misinformation.
As stated, the bottleneck is not bandwidth, but cpu (and sometimes disk io), and the "funnel" should be horribly lopsided if it is supposed to represent bandwidth because a Minecraft server sends out 30x more data than it takes in (you download all the map data from the server, you only send the server your movement and block changes)
If you were to try to graph/chart the cpu bottleneck then you don't need things like operating system, firewall, web server, and other services in there because the Minecraft server is running on a multi-core machine. Minecraft server itself is single-core, so it doesn't directly take advantage of multi-core machine, but the advantage is that it will have an entire core to itself, and all the other processes run on other cores.
There are several reasons that restarting a server can help, and a few reasons why restarting your client can help. The minecraft server sends a stream of data to you based on what is happening on the server around you. If the server gets backlogged then the server is calculating this stream slower than actual events are occurring in real time. Sometimes you can get to be 30 seconds or more behind. You will still receive all the updates that are occurring, but way behind real time. Restarting your client will kill the data stream and restart it at 0, so you're now receiving information in real time again. If the server is still horribly backlogged then you will quickly slip into lag and the pasts once again. If the server is suffering because of high disk io then restarting your client can actually make things worse in some cases because the server may need to re-read your area of the map from disk.
Restarting the server can help in a number of ways. A server plugin can sometimes hit a code loop where it is using cpu cycles for seemingly no reason. Restarting will wipe out all mob entities, so if one was glitching out and eating up cpu that will clear it out. Same with the physics from boats, mine carts, and water/lava flows. Like the client reset, restarting the server will clear out all the data streams, starting everyone at 0 (although depending on the original cause, it could go right back to lag town instantly).
TL;DR
Lag isn't always caused by network latency, and sometimes restarting the server can help.