How threaded it is?
#2
MCServer is about as threaded as it needs to be - it wouldn't make much sense to split into more threads than it's currently using. The number of threads actually used depends on the server settings and on the number of users that will be connecting to the server. For each world, several threads are created taking care of that world. Those are the most heavy-weight threads; the others are relatively idle.

Let me list the threads and their (subjectively estimated) workload, sorted from most utilized to least:
- Chunk generating. One thread per world.
- Chunk loading / saving. One thread per world.
- World ticking. Currently one thread per server, but expect this to get to one thread per world quite soon.
- Chunk lighting. One thread per world.
- Chunk sending. One thread per world.
- Player communication. One thread per 63 players (could be tweaked to more players per thread, if needed)
- Player authentication. One thread per server. Currently doesn't work, but expected to be fixed soon(ish).
- Housekeeping threads (webadmin, server listening socket, console input, socket notifier). One of each type per server. Almost no work done, ever.

So, generally, take the number of the worlds you want to be hosting, multiply by 5, add two or three and you get the ideal core number Smile
Of course, the ideal might just be too much, so you can save on a few things. Chunk lighting and sending is about 5 times less work than the top three, so they can be shared in a single core. All the per-server and per-players threads can still squeeze onto that core, so you can get a simpler formula, 4 cores per world hosted. And with the server being quite performant as it is, I'd say even two worlds can share those 4 cores pretty safely. Three worlds if the third is a simple one, for example something like the End, or superflat - not much generating going on.

If you have two similar setups and are deciding between the two, take the one with better RAM-to-CPU throughput. Minecraft is about a loooooot of data being moved back and forth; I'd estimate that to be the actual bottleneck, rather than CPU itself. Of course, I have no experience with server-grade hardware, so my guess can be pretty useless here Smile

As for your question: MCS could "eat" all 24 cores, if you host more worlds. With one world, it's a (very big) overkill.

I'm debugging on a single-world setup and I have 11 threads altogether..
Reply
Thanks given by: Taugeshtu


Messages In This Thread
How threaded it is? - by Taugeshtu - 06-12-2012, 02:47 AM
RE: How threaded it is? - by xoft - 06-12-2012, 04:43 AM
RE: How threaded it is? - by Taugeshtu - 06-12-2012, 05:02 AM
RE: How threaded it is? - by xoft - 06-12-2012, 05:10 AM
RE: How threaded it is? - by FakeTruth - 06-12-2012, 05:19 AM



Users browsing this thread: 1 Guest(s)