Discussion in 'Bukkit Discussion' started by bob7, Feb 20, 2012.
Because threading requires a TON of changes, and Bukkit probably wouldn't do it unless Mojang was going to.
Honestly, just get a modern Sandy Bridge processor. These things can support 100+ players without needing tons of cores.
If you need more cores to do the same job as a single core on a Sandy Bridge CPU can, then you must have a slow CPU anyway. I understand you can get some slow quad core for cheaper, but Sandy Bridge CPUs are not terribly expensive.
I'm not saying that this would happen in a million years, but we could always have multithreading AND a sandy bridge CPU ( ). but as TheBeast808 pointed out, that wouldn't happen unless Mojang did, which I doubt would happen this far out of alpha/beta.
bob7 Because it's not a simple switch they turn on.
It's complicated and time consuming to create and manage for a new game, even more so for an existing game.
There are bits here and there being offloaded to other threads and more bits and pieces probably will be in the future.
But Minecraft will never fully scale across multiple cores.
Someone should completely re-code Minecraft in C++ with multi-core support.
And add sharks with lasers attached to their heads, while they're at it.
There's several attempts at this, all of them are hugely incomplete and likely will stay that way.
No no, just natural sharks that you catch with pokeballs then craft it with iron and redstone and then you throw it and you have a flying shark that shoots lasers at mobs.
Just kidding, I know what a challenge this would be. C++ isn't as friendly as Java is...
they have time... and money... and people... they need to get on it!! Mojang...
Only so many things can be threaded.
Why is it, no matter how many times this is answered, it always seems to come back?
"Because it's not a simple switch they turn on."
In some cases it is.
public static ExecutorService newFixedThreadPool(int nThreads)
"And add sharks with lasers attached to their heads, while they're at it."
I see no reason this could not be done and fully agree.
"Minecraft will never fully scale across multiple cores."
With that kind of attitude for the issue then you are correct.
"Only so many things can be threaded."
It wouldn't be that hard to find ways to make the server use more than one thread to do tick processing.
"it always seems to come back?"
It keeps coming back because it is possible. It really is something that should be done, the minecraft community would benefit greatly if a distributed platform was adopted for the server. Even with a single physical server modern hardware is offering 4-16 cores on a single chip. It is starting to become common to have GPU resources in server machines as well. Offload some processes like rendering new chunks and hashing onto GPU(s) to free up more cpu or do something interesting in the realm of server side physics. Even some simple use of worker pools could help. It really should be pointed out that the server already is making use of threads it is just that the main server thread is doing all the work. The more people you load onto a server the longer each tick takes. Eventually you hit that wall. Yes modern cpu's are amazingly fast. The i7-3770K is a quad core ivy bridge chip that has some of the best per core performance out there and doesn't cost much. You still can only do so much on one core though, and using more cores will be better.
Minecraft world is a nice and tidy 3d grid, a prime candidate for parallel processing.
Put the world into a database, allow for asynchronous access.
Allow for a group of servers to run the same world with all servers players interacting.
Split the server up into nests of workers that process chunks and entities.
Split entities into geographical blobs that each are independently processed in parallel.
You can run file systems in clusters.
There are existing systems for running java in clusters.
Database systems can be run in clusters.
Java is able to use multiple threads.
Java can use OpenCL
GPU's can be used in clusters
http://www.cpubenchmark.net/cpu.php?cpu=[Quad CPU] AMD Opteron 6272
The Minecraft protocol is publicly documented. If anyone wants a multithreaded clustered server all they have to do is write their own server implementing the protocol.
Great! When will you have it ready?
I have said repeatedly, and so has nearly everyone in this thread, there is no magic word we can just utter to suddenly allow multi-threading.
Tibs gave a great example of multi-threading as well.
I had a ton of people tell me I couldn't do GPU Processing for Bukkit and that there would be no use, I beg to differ.
I was getting processing times of about 60 - 100 milliseconds, reduced it to 30 - 40 when I went to GPU offloading. Downside tho, it isn't an easy task and does have quite a few bugs and kinks in the software.
Separate names with a comma.