1. Minecraft server and threading. 2. Render distance

Discussion in 'Bukkit Discussion' started by Smerfa, Jul 16, 2014.

Thread Status:
Not open for further replies.
  1. Offline

    Smerfa

    Just my opinion about 2 things. sorry for my horrible English, I hope that you can understand it ;)

    1. Minecraft server and threading.

    I just wondering if that will be possible to change bukkit to use more than one thread for game-loop, actual you can have unlimited RAM and CPU, but bukkit still can't handle more than 200/300 player on open world (without limits/borders)

    Switch to multi-threading is of course hard, but actually you can't open bigger server without using unsupported "things" like bungeecord -> one server per world, or even multiple servers for one map. (you are just teleported to other server when you reach eg: 2000 x/z cords)

    Handling chunk generation, blocks changes, entities and players (as exception from normal entities) or/and for world (each world have own threads to handle chunks, blocks, entities and players) in different threads should increase performance for bigger server with multi-core CPU.
    Actually you just lose most of CPU power.


    This same with single-player, you can have super-computer but you still have lags when you try walk to non-generated terrain -> that can be seen on some youtubers game-plays (actually most of them just generate big part of map before starting recording)


    So... there is any plans on Bukkit or even Mojang to add multithreading support to servers/single (as additional option or just switch to it)?

    PS: I know that chat and players logins are in different threads, but that sill not enough, chunk generations and entities need much more "power", even more than one thread for each.




    2. Render distance

    Many server must reduce render-distance to increase performance, but I have small idea (or even two) how to improve it.

    a) Some players have "wooden PC" and plays on render like small, normal but server still generate this same amount of chunks to every player.
    Each player should receive as many chunks as it need but no more than render-distance

    b) Allow coders to change render-distance for every player, that will allow to reduce render-distance for players that are in caves and don't need 10 chunks, 3/4 will be enough to explore cave without any problems. (only players on x-ray need more :p)

    But that (both of ideas) must be only additional option -> some server may need normal generating to handle some systems/games



    I hope that you understand that! :D
     
  2. Offline

    Deleted user

  3. Offline

    Syd

    Smerfa
    Bukkit can't do a lot of things here. Making parts of MC multithreaded just for Bukkit would increase the time Bukkit needs to update to a new version, as this would be a VERY complex change.
    This is one of the reasons Bukkit will not add further multithreading stuff to CraftBukkit. (At least not much.)

    However, you should follow some Mojang Staff on Twitter. ;)
    The latest Snapshots aim for performance optimisations and improved multithreading.
    This includes the already mentioned Thread per World, as well as Threaded Chunk loading.
    And I hope that there is coming more, especially for Servers.


    So the best adress for Multithreading/Performance wishes would be Mojang. ;)
    (And the dynamic render distance makes actually sense)
     
  4. Offline

    Smerfa

    Syd I know that it's Mojang part of work, but some staff of CB is in/from Mojang

    About updating, that will be much easier with own code, playing with NMS is just harder for everyone.

    "Thread per World, as well as Threaded Chunk loading." not bad...but still waiting for more, for blocks and entities -> and if they will be Threaded, then should also work from other threads -> bukkit/mc will be more Thread safe.



    And about render-distance, part "a" also need change in MC from mojang -> you can't get render-distance of player.

    Why this is moved to discussion :< nobody read here!
     
  5. Offline

    Necrodoom

    Smerfa multi threading everything requires recoding the whole server from the bottom up, keeping this up with MC changes would be an impossible task.
     
  6. Offline

    Smerfa

    Necrodoom
    Nothing is impossible :3
    That just can take "some" time, some long.... time
     
  7. Offline

    Syd

    Smerfa
    No active Bukkit staff works for Mojang. The ones that work for Mojang are not activly involved anymore.
     
  8. Offline

    Bobcat00

    Why are Dinnerbone and Grum still listed as Bukkit Staff?
     
  9. Offline

    fcernese

    Of course Bukkit is multi-threaded. There is no way to write a real time system of any kind without threading.
    My current bukkit server has 44 threads running and nobody is logged on.
     
  10. Offline

    Zupsub

    Are you sure? For one single server? Would like to see evidence.
     
  11. Offline

    Syd

    Well "multi threaded" is a wide area.
    Ofc. your server runs in more than one thread, but does that mean that it uses all cores efficiently? No.
    Most work is (currently) in only one thread, while other threads do some other, small, thing like DB/File IO, Networking.

    ->
    43 threads may take 0,1ms per tick to calculate, but you still have to wait for this massive 60ms per tick thread, that laggs your server.
     
    Smerfa likes this.
  12. Offline

    xTrollxDudex

    I believe either because of their legacy contribution (much like Tahg) or maybe because they contribute for time to time, or answer the bukkit staff questions, ect...

    Smerfa
    ASM -> Instrument all NMS classes -> Learn how concurrency works -> Load -> ??? -> Profit
     
Thread Status:
Not open for further replies.

Share This Page