what i don't really understand is why there is soooooo much lag?
vladspy
Its a global issue really, alot of servers are having the lag issue.
Something changed between earlier and now which has seriously degraded performance of the server, whilst I've spent the 4 evenings trying to resolve it to no success.
The quickest and most idiotic solution would to throw more money at it, but then keeping CF | UK alive would be harder, and I don't want to become totally dependant on donations, I give what I can just now which pays 1/3 of the server bill (Unemployed full time student. Heh) and the rest from that month gets put by for future months to keep us going. (I'm ever so thankful for every donation that is given, and with all of you putting your money in my trust, I want to return the favour by investing in the server fairly.)
Recently, there was a topic on the bukkit forums regarding the high usage we're having, whilst he appears to host a few games, Minecraft seems to hog up a fair bit of processing power:
High CPU usage, hosting minecraft SMP is a shame in comparaison to other games hosting ...
I was, and still hosting, some of those games :
Counter Strike, Counter Strike Source, World Of Warcraft Mangos, Lineage L2J, Call of Duty 4, Battlefield 2142, ...
So, with allllllllllllll thoses games, multiplayers gameservers never put my CPU to 100%, and some of those game hosting require reallly many more power like Lineage L2J and World Of Warcraft Mangos, but in allllllll those case, including with a huge sql usage, there is no problem to host 100+ players online without having a 100% CPU usage.
I tried to understand if that's because of my JAVA, or a miss configuration, and I check after many solution in the numerous post on this forum, but the road of my conclusion point me to this point :
MineCraft SMP vanilla is not optimised and bad coded ?
This is a similar issue to what we are having, this person has a lower spec CPU than we do, but slightly more RAM. [FYI: He/She had Intel(R) Xeon(R) CPU L3426 @ 1.87GHz, 8 cores with 16 gigas of DD3] and yet able to host all these games on a single server, yet with Minecraft, it lags.
What it appears to be the lag issue for now, is it comes down to the way Minecraft is written, most of the processing Minecraft does is all given to a single thread. Older computers, for example ones with Intel Pentium 4's were most likely to be single threaded and cored, therefore Minecraft could use the whole of its processing power of the hardware, and we would be likely to have less lag in theory.
The problem with Minecraft with modern servers is, its almost impossible to find a server in a modern data centre that you can rent out for a single-threaded single-cored server. The one we have for example has 6 cores, and each core has 2 threads, 6 * 2 = 12. Thats a total of 12 threads dividing the power of the processor.
Since Minecraft does most of its processing in one thread, that one thread of the two on the one core can quickly be overloaded, and when overloaded it causes the lag you see in the game. That thread has to play catchup since it does most of the processing. Yet there is another 11 threads sitting almost idle doing nothing which could be used to reduce the load on that thread. Most modern game servers which come with a server option that multi-thread their applications, so the load is spread equally and takes advantage of the 12 threads or 6 cores that we have.
We had evidence of overloading was when the Nether was here, lag was highly present at a few players, and that was forcing the Minecraft server to load two worlds into a single thread, Minecraft SMP is -not- designed to have the world and the nether, its a patchwork implementation done so by bukkit. Furthermore, with 1.4 out now, which has added a framework for the statistics and wolves, that would of required more processing power, most likely on the single thread too.
When Minecraft was originally written in its InfDev stage, no plans of multiplayer was put in whatsoever.
When Minecraft exploded in popularity, a demand did grow for multiplayer for survival and Notch was pulled in to make it when he didn't have his company, he had to make the majority of the way multiplayer handles things on his own.
Most of it was most likely a conversion process, and this is probably useful to have a design specification on how you would do a major change to a game such as Minecraft, only when Notch formed his company did we start seeing evidence as advanced planning and features. It is much more organised, but the foundations Notch put down on his original conversion are starting to crack, and whilst there is plans to do more work on the server [They are apparently taking a Counter Strike approach, starting local games with a server and a client on different threads, which we should see some performance issues resolved] whether it comes sooner or later is another issue.
For now it comes down to how much processing a single thread can do you on your hardware, and how much it can take, and with my theory above, a Minecraft server would probably run better on an older processor, such as a dual or single core, rather than hexcore we have just now.
What are we trying to do to resolve the issue? Everything, I'm working closely with the moderators to get ideas and suggestions from them, and putting them into action to try reduce the CPU usage which would reduce the lag. However I know we won't be able to eliminate the lag entirely with the current situation Minecraft seems to be in, but we should be able to improve it.
I'm writing this in the way Minecraft is the current state in, and the reason some servers have less lag, and some have more, it totally dependant on what they run, what hardware they have and how powerful per thread per core is. I understand Minecraft is in Beta, and I'm trying all of the available options to work around the issues Minecraft has to give a better experience for all those on the server, without disrupting or taking the server offline. Therefore most of the testing you don't see, as it is carried out in a testing environment.
Whilst I do also acknowledge the server can have issues sometimes, a widespread lag issue could mean its not just our server, but the way the code is written, and if more features are added, those cracks in the foundation could very well break.
I've written this mostly from the top of my head, and most of the Minecraft related features here could probably be read up upon on Notchs Blog. I've been studying a higher national diploma in computing for technical support for the past two years, so performance issues can be related to my knowledge in the field.
Due to the limit of an testing environment however, I am limited to what I can fully test so the above should be taken in as theory, and not as facts.
I have spent so much time on trying to deal with the lag it has started to stress me out a little, but I can ensure I've been trying everything of what I know, and what others have suggested to try resolve the issue.
Topic on bukkit forums:
http://forums.bukkit.org/threads/mojang-minecraft-smp-is-a-bad-optimised-gameserver.11632/(I apologise in advance for the essay)