Question about multiple worlds and performance

Discussion in 'Plugin Development' started by Pr07o7yp3, Aug 31, 2014.

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

    Pr07o7yp3

    I'm working on RPG plugin.
    I decided to be with instances like Path of exile.
    Every player will play on different instance (world).
    So, there would be many worlds (100+).
    I'm wondering how this affect the server performance!?

    If I have 10 000 chunks loaded in 1 world, or 10 000 total chunks loaded in 10 worlds what would be more optimized or there would be no difference in the performance?
     
  2. Offline

    Deleted user

    I think few worlds is better, but I'm not sure.
     
  3. Offline

    ChipDev

    Umm... Just use one world with everyone invisible, damage off, etc/
     
  4. Offline

    Pr07o7yp3

    Yea and what about when someone fight with some mob.
    Players would see mobs dying by nothing?
     
  5. Offline

    Funergy

    Pr07o7yp3

    of course it would affect the server performance.
    You should think logically
    what would happen if you have 1 gig ram on your server will it lagg??? yes, of course
    if you have 16 gig ram that wouldn't be that laggy but if you have 40 players on your server 40 worlds..., that would be laggy. so or you buy a 16 gig ram server or something and add a maximum player count at 10±
     
  6. Offline

    Pr07o7yp3

    Lol. I don't ask about that. Actually I'm not sure if you read my question carefully.
    So I'll try again. If I have resources to handle 100 players, 1 world and 5k chunks loaded, does this resources enough for handle 100 players distributed in 100 worlds and again 5k total chunks loaded?
    And does 1 world takes so much resources itself?
     
  7. Offline

    Skye

    Pr07o7yp3 If spawn is kept in memory, you'll be using a ton of memory just keeping the worlds loaded. Regardless, you'll never see any memory savings from multiple people being located relatively close, which would keep the number of loaded chunks down. CPU usage will also rise with the number of chunks that stay loaded, which can be made worse depending on which plugins you're running.

    The best approach would probably be to use a single world and tailor chunk data packets to the player before it's sent, with user-specific chunk data acting as a sort of overlay. I know there's already an instance plugin out there, but I haven't looked into how it works.
     
  8. Offline

    Totom3

    Funergy I don't think you understand how RAM affects performance. The quantity of loaded RAM doesn't affect it. A computer will not run slower because it has 2 TB of data on it's hard disk, except for when you start it, but that's another thing... Anyways, the same applies for the RAM. Even if you have 64 GB of loaded RAM, performance will not drop (not because of RAM, at least). Having more RAM is always a better thing, since if you ever run out of it, the computer will be forced to work directly with the hard disk, which is by the way ~ 10 times slower..

    Pr07o7yp3 will of course need a ton of RAM if he decides to create a different instance of the world for each player, but as long as he has enough RAM, memory shouldn't be a problem. I'd be more worried about the server itself. Remember that it needs to run 20 times per second, update all entities, players, packets, blocks, spells (?), scripted events/quests (?), etc...

    For the solution part, I agree with Skye.
     
  9. Offline

    hintss

    pls stop

    @Pr07o7vp3 Currently it should make no difference whether it's one world or multiple worlds, however, it has been stated that they're planning to have separate worlds in separate threads, which would greatly improve performance if they do that and you're using separate worlds.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 10, 2016
    Totom3 likes this.
  10. Offline

    Pr07o7yp3

    Tnx guys. Only 3-4 worlds would be loaded all the time. That's the main world, PVP world and etc.
    Every instance (world) will be loaded dynamicly and will be unload when its not in use.
    I'll set keep spawn in memory off for these worlds fore sure.
    Ok, lets see my idea.
    For example, there is cave area. So, lets name it "cave1".
    If player want to visit this area, server will copy "cave1" folder and create another one with name "cave1_playername".
    So, the player will enter in this cave1_playername.

    If he quit this area, 15 mins after that the world will automatically unloaded and deleted (this will reset the instance).
    So, this is my idea at all. Do you have any better suggestions?
     
  11. Offline

    Totom3

    Pr07o7yp3 If the players won't be able to modify the terrain then I don't see why you'd need to keep the instance after they exit it.
     
  12. Offline

    Pr07o7yp3

    Yes, it would be RPG server. They could only fight with mobs and that's all.
    I want to keep the instance for 10-15 mins because if player wants to back for something he have to kill mobs again which is annoying. :D

    The only one thing that I'm worrying about is that the server has to calculate time, weather, etc for each world and I'm not sure if this thing is too CPU expensive.

    Bumb. It's very important to decide how to proceed. :p

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 10, 2016
Thread Status:
Not open for further replies.

Share This Page