Multiple instances on single box to run one server?

Discussion in 'Performance Tweaking' started by andyhuang, Dec 7, 2012.

  1. I was thinking earlier today and noted this down on reddit. Come to the think of it, here is probably a more crazy performance tweaking community to post to and get ideas from... Here's some quick copy and paste:

     
    #1 andyhuang, Dec 7, 2012
    Last edited: Dec 8, 2012
  2. PhanaticD

    Patron

    I actually just recently set all that up on my server, bungee has a plugin called janus and there is another one too i might check out someone posted in the comment of bungee. feel free to go on my server mcskyblock.com and take a look. If you type /tpe it will bring you right to the portal for the event/creative server

    as for separating the nether and end it can be done but that would be pretty impractical and in my opinion cause unnecessary problems

    I also asked about separating cores while setting this up right here below you http://www.spigotmc.org/threads/multiple-servers-on-one-dedicated-box.104/ and the best was to let linux handle the assignment
     
  3. I know BungeeCord is designed for servers, not worlds. However, the reason behind doing it per world is so that each world get their own control thread, which cannot slow down the others. Since this creates multiple control threads, it is different than the other thread (I've seen that yesterday as well :)).

    Another added benefit to that would be the worlds can have their own spawn limits. This would mean if someone have an ender ender running, they will not affect spawn rate in the overworld, so everyone in overworld would still have mobs to deal with.

    I think these two are pretty decent benefits to have, especially for servers growing larger and have the extra cycles to spare.
     
  4. PhanaticD

    Patron

    but then you would have to factor in chat, inventories, nether/end portals and other stuff. you could argue you save more resources by having them all run off one craftbukkit in that way
     
  5. md_5

    Administrator Developer

    Plugins.

    Plugins are the reason we can't have nice things.
    We could spin up some threads, have an efficient region model, etc etc etc.
    But half the plugins would die because they have no clue how to handle many events occurring at the same time.

    Nice little brain dump by the way.
     
  6. But that's what I am getting at. The intention of this "optimization" approach was not to save resource, but instead to use extra resources.

    I have a dual quad core CPU server, I NEVER see mrtg say 400%, or java process showing up with more than 200% on top. Snoop data suggests 39.61% of all servers have 8 cores (not to mention the 6.28% with 16 cores; 1.52% with 24 cores; 0.4% with 32 cores; and those 8 statistical outlier with 64 cores) . That's at least 4 cores going to waste for over a third of the servers out there.

    TPS drop because control thread cannot keep up causes lag across the server. By introducing additional control threads -- the proposed model uses 1 control thread per world -- the server utilizes more resources that are otherwise idling, such that if one world is causing lag, it is isolated to just that single world, not the entire server.
     
  7. PhanaticD

    Patron

    well thats what i think md_5 is saying, you could do that and it would be nice but then plugins wouldnt be able to handle it
     
  8. Thanks for the reply :)

    I agree, I think plugins are going to be a major issue, especially synchronization of data across the servers (i.e.: I can see major nightmares trying to synchronize factions when people are spread in different worlds[read: servers], or synchronizing economy accounts on this setup). Is there a way we can some how exchange plugin data (maybe via plugin messages some how?) between servers via Bungee?
     
  9. md_5

    Administrator Developer

    Take a look at stargate.
    Its under http://github.com/TheDgtl
     
    • Like Like x 1
  10. Very nice. This looks like it is almost simple enough to do as a small addon for individual plugins. Thanks! I'll add it to my memo :)
     
  11. I went on your skyblock server for a bit last night/ today morning. It is a prime candidate to benefit greatly from this setup.

    1 landing world (server) where people land at, this could be a hub like place where people cane decide on collaborating. X amount of servers (where X = total CPU threads - 4[arbitary educated guess number]) for sky block worlds. You can make your plugin to check how much CPU usage all the servers are using at the time when player is requesting for a new skyblock, and send them to the one with least load (pseudo load balancing). This will reduce what I call "block rubberbanding" effect, where player sees a block disappear from mining and pops back a few seconds later. You may potentially run into problem where people say "I'm at 100,300" and another person bridge there but don't see him because they're in different worlds (servers).
     
  12. md_5

    Administrator Developer

    A SkyBlock server would be a good candidate for that as it only needs literally 1 or 2 specialized plugins, unfortunately most servers are not designed this way D:
     
  13. PhanaticD

    Patron

    i might have to remove bungee though because its just not working for me, i left a bug on your github md_5 but my players are starting to get pissed at me
     
  14. md_5

    Administrator Developer

    If its not working, remove it. Its not for everyone.
     
  15. PhanaticD

    Patron

    its for me