Jump to content

TerraCore Dirt Edition (Multithreading Server Jar)


dreadslicer

Recommended Posts

I am a java developer and I have 2 accomplishments with Minecraft so far. First, TekkitRestrict, second, EEPatch2.

TerraCore Dirt Edition Minecraft Multithreading

Test Servers (More to come with more versions of minecraft as development improves)

Creative Tekkit 3.1.3 (mc 1.2.5): mcelm.strangled.net:25570

2012-12-31_154823_zps108ee8a7-1_zpsc8a58

Why have this? Look here for some TPS problems with mods in Tekkit. This goes for almost every single mod.

I have already playtested it and got it working with Tekkit 1.2.5, but How would you guys like a multi-threaded Server jar? Everybody said that it was impossible, but I've gotten a somewhat buggy working version that had improved overall server stability and reliability of minecraft Server ticks by 200-10,000%. This number, of course, was tested using a basic setup in tekkit that lags out even the heartiest servers to 2Tps of 20Tps.

The reason why everybody says that it is impossible is that it requires at least 500-1000 hours of programming labor to modify tons of minecraft jar files to support multithreading.

Why did it get a 10,000% increase? I separated the server's main single-threaded tick system into about 30-50 different little threads that each are synchronized in order with the minecraft jar.

But basically, what it does is split the server tick thread up into multiple sections and ticks for each section (about 30-60 sections) on a synchronized timer. This does go over the main issue of looping through 65,000,000 TileEntities. It also makes sure that players are always connected even if there are massive amounts of lag. Unfortunately, nobody has supported me in my quest to make Tekkit... and Minecraft in general, faster.

Features:

  • Possible Use of Spigot as Base (will need to get any licensing or whatever is required)
  • Stability - Impossible to crash using any plugins or mods (Besides WorldEdit lol)
  • Internal Chunk Unloading - Unload all of those fluffy chunks that are using up so much space on your server!
  • Internal Log Splitting and Filtering - Tired of all of that fluff in the console window? Easily fixed!
  • Ticking for Each player instead of each World - Each player gets their own "special thread" which manages each player's "corner of the world". It will tick for 2x2-16x16 chunks. This thread may also tick for networking, unknown territory. This will prevent the server from ticking all 1,000-30,000 chunks that are currently loaded by the server.
  • Adjustable Max Ticks / Sec - Enable your server to go at 40 Ticks per second!
  • Managed High-speed Event handling - Bukkit events have become a bit complicated when multithreading was introduced. For the event system has to be self-managed by a single thread and all information is handled via a pass-through system.
  • Primary Ticks Threading - As of now, there is a thread for Networking, 6 threads for each world, a-thread-per forge mod, a thread for plugin's Heartbeat tick and multiple underlying threads for player management.
  • Max World Height Increased to 8086! (Note that insane world heights require the use of more CPU and sace)
  • Possible new APIs for mod/plugin Developers for profiling and tick speed management
  • Built-in Spout plugin (Lets support Spout!)
  • Possible new "FastDownload" add-in that sort of works like GMod's FastDownload. Possibly implemented with Forge to automatically download the required mods from the server or a website(s). (Will probably require a modification of the client)
  • Internal Profiling for server admins to find that "Hot spot" where your mods or plugins are literally killing your server. (This will look through using TileEntities, Chunks, Entities, Threads, Methods, ect.)

Versions

  • Bukkit or non Bukkit versions
  • Forge or non Forge versions (+ForgeIRC, ect)
  • Minecraft Versions 1.2.5, 1.3.1, 1.4.6

Base Requirements:

  • At least 2 Server CPU Cores, the more cores, the better. (uses a bit more cpu then normal, but the extra cpu used never increases. However, when you get a bigger server, the dynamic CPU usage will increase)

I am going to naturally support the FTB (Feed the Beast) and Tekkitmodpacks and several other adaptations to the system to help improve overall performance.

Please give me feedback on your opinions of a continuation of this Distribution of MC.

Link to comment
Share on other sites

Fortunately, I've already put in about 600 hours into the project. I have just completed a transfer from my "Second Perspective" Re-do of the project and now have a massive system setup.

I've named the added thread system "RobinThreads", as the system goes around in a round-robin shape.

Here is a shot-view of all of the threads processing small amounts of info from the server. (only 1 player on, so not really doing much)

At the moment, these threads handle everything except for the main server chunks, which I'm planning to have a per-player tick system.

robinthreads_zpsc23eb9b7.png

Default performance.ini file:

# Performance Patch Config

# Author:  DreadEnd ([email protected])

 

### Main Ticks Threading ###

#Set at your leisure to improve your server. Default: 21 Ticks Per second.

MaxTPS: 21

 

### Chunk Management ###

#Max chunks that are not around player to be unloaded.

MaxChunks: 4000

#Area in chunks around player to [stay] loaded,

PlayerRadii: 256

 

#Maximum buildheight

MaxBuildHeight: 512

Link to comment
Share on other sites

Hrmmm... adfly links are not allowed on here and the fact you actually adfly'd a link to a topic on this forum just blows my mind... anyway...

Given your less than successful experiments with threading in your TekkitRestrict plugin, I'm surprised you are attempting a project like this, that and the fact you actually said you were abandoning Minecraft, but besides that I highly doubt this will be a successful project. Sure you can get vanilla going just fine multithreaded but you can't multithread tile entity processing with a mod server... too many of the mods rely on the fact that the server is synchronous, such as redpower's recursive redstone physics and ic2's energy networking... I wouldn't be surprised if those internal server errors people get on your server are CME's from the mods seeing how nothing in Minecraft has ever been coded with concurrency in mind - not least of all plugins. So unless you plan on recoding all the mods this will never be a success for tekkit or FTB, but good luck anyway I guess...

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...