Posts: 1
Threads: 1
Joined: Aug 2012
Thanks: 0
Given 0 thank(s) in 0 post(s)
Hello,
I was wondering if the current build supports clustering/multiple cpu/threads.
If not, are there plans to in the future?
Posts: 1,450
Threads: 53
Joined: Feb 2011
Thanks: 15
Given 120 thank(s) in 91 post(s)
Do you mean running MCServer on multiple Raspberry Pi's?
Posts: 6,485
Threads: 176
Joined: Jan 2012
Thanks: 131
Given 1074 thank(s) in 852 post(s)
08-23-2012, 06:20 AM
(This post was last modified: 08-23-2012, 06:23 AM by xoft.)
I'm not sure that's even viable, from the natural point of view. Even if you split the world among the machines, they still need to communicate together the physics, the entities interactions, the AI...
What could be actually viable is having multiple worlds, each hosted on a separate machine, with a "concentrator" machine above the acting like a server. When a player moves from one world to another, they'll be transparently moved from one machine to another (but only the Concentrator would know that)
Still, that's so much work that I doubt it will ever be done. Why, when there are other options, much better? Get a MK802 instead of RasPi - for not even twice the price of the Pi you get a nice piece of hardware that does have the horsepower needed to run a full-fledged server.
As for threads, yes, we are using multithreading, as much as makes sense.
Well, almost. There's one generator thread per world, so we could still improve by having multiple threads generating the same world, but that would be only a marginal difference. Most hosting services offer two or four virtual cores anyway, so no-one would be able to use it. And home computers, that have the cores, have so much muscle that they don't mind having one generator thread only.