Chunk loaders currently never ever unload

Discussion in 'Announcements' started by sk89q, 25 January 2014.

Tags:
  1. sk89q

    sk89q Administrator
    Staff Member

    Joined:
    1 December 2011
    Messages:
    2.490
    Likes Received:
    1.504
    Right now, chunk loader-loaded chunks are never unloaded. They persist in-memory forever, even between server restarts. This is obviously slowly taking a toll on the server, and it will eventually bring the server to a crawl.

    Alice 1.6 has been performing fairly well overall, compared to previous versions, so there are no plans to disable chunk loaders. However, something must be done about these forever-chunks.

    As it has been suggested in the past, it would be ideal that chunks be unloaded after some sort of time out since an player-specific event. For an implementation, the difficulty lies in that (1) not all chunk loader requests are tagged with a owner, notably those from Buildcraft for its quarries, (2) a type of event must be chosen (last login? of who? last visit?), and (3) a reasonable time period must be chosen.
    1. The problem of chunk loader identification can be solved by either requiring everyone to put a ChickenChunks chunk loader in the same chunk as their quarry, or by using chunk ownership data. The former is preferred, and allows some flexibility.
    2. Last login seems the most appropriate. For shared bases, using a friends list to determine the list of names to check would not work because people would simply list as many people as they could on their friends list. Unfortunately, it would seem that possibly the best solution here would be to have everyone living together place their chunk loaders all in the same chunks.
    3. A reasonable time period might be a day or two.
    Also, another difficulty is that Buildcraft quarries store their boundary data in the chunk load request. This means if that if they are not chunk loaded, they forget their boundaries -- a problem some of you probably vividly remember. We've patched BC appropriately to not break in the past though, so we may approach this problem again in this manner.

    We're happy to hear any other ideas, otherwise we will be going forward with selective chunk request removal dependent on last login time.

    (Another solution that is much simpler is to not load chunks again between restarts.)
     
    Demenzia, Neonbeta and Ghostly like this.
  2. Kirazy

    Kirazy An idle texturer

    Joined:
    2 April 2012
    Messages:
    612
    Likes Received:
    267
    Why not this, then?
     
    kerjava, suchtie and Neonbeta like this.
  3. buttonsinpjs

    buttonsinpjs Active Member

    Joined:
    22 January 2013
    Messages:
    267
    Likes Received:
    150
    More than 24h seems too long to trigger chunk unloading. Because the server gets restarted once a day anyway the timeout would likely never be reached.

    8-12 hours seems more reasonable. It gives time for people to login and play for a bit then logout for sleep/work/school. When people come back there is a fair chance of their chunks still being loaded.
     
  4. chikitulfo

    chikitulfo New Member

    Joined:
    8 August 2012
    Messages:
    10
    Likes Received:
    3
    If it's reasonably easy to do, having everyone living together place a CC chunkloader in the same chunk sounds like a great solution, and a 2 day from last visit period looks like the most reasonable time.

    From what you say about bc quarries, I'm assuming that, as of now, thay will also forget the boundaries in they are unloaded. So that has to be taken care of anyways. Right?
     
  5. chikitulfo

    chikitulfo New Member

    Joined:
    8 August 2012
    Messages:
    10
    Likes Received:
    3
    8-12 hours looks like too little for me. There are a thousand things that can happen in life that keep you from logging in in a 12 hour period, even if you are a regular player who plays everyday (not my case).
    Somewhere between 24 and 48 hours looks like a more balanced period for me. So if for any reason you can not log in just one day, you don't have to worry about your chunks.

    Also, if I understood correctly, in this proposal chunks would be kept loaded between server restarts, only being unloaded in regard to login time.
     
  6. Neonbeta

    Neonbeta Person who did stuff and things

    Joined:
    2 March 2012
    Messages:
    2.603
    Likes Received:
    757
    Honestly, I heard that CC chunkloaders unloaded their chunks after a restart and did not chunkload until a player did so.

    Regardless, Whichever way is chosen, I hope that the quarry and CC chunkloaders are made similar, that in the way that they either both chunkload without a player after a restart or otherwise. I say this because I have been having problems with a quarry being active while my base is not; Thus losing precious resources from a service that is limited enough as it is. Apart from that, I have no qualms with what is decided :)
     
  7. sk89q

    sk89q Administrator
    Staff Member

    Joined:
    1 December 2011
    Messages:
    2.490
    Likes Received:
    1.504
    Having chunk loader-loaded chunks persist between restarts is nice.

    They did so in MC 1.5. We have not re-tested it again in 1.6, but we assume that it's still an issue.

    Even if CC chunk loaders unloaded their chunks, BuildCraft and other mods don't.
     
  8. buttonsinpjs

    buttonsinpjs Active Member

    Joined:
    22 January 2013
    Messages:
    267
    Likes Received:
    150
    To me, at first glance this looks like you want to play with out actually logging onto the server. But I can understand that some machines/processes can take hours to run a single cycle and being unable to play every day can make progress extremely slow. However, I don't know of any process that take more than 12 hours to run one cycle. The only one that I can think of is creating a cart with Steve's Carts.


    I'm curious about how the timers will work for this. Timer is 24 hours to trigger chunk unload. Say I logout and 18 hours later the server restarts. Do I still have 6 hours remaining before my chunks are unloaded or does my timer reset to 24 hours?
     
    kerjava likes this.
  9. wolfenstein19

    wolfenstein19 Active Member

    Joined:
    2 April 2012
    Messages:
    129
    Likes Received:
    41
    This is largely an issue of many mods beeing designed so you need the idle time of your machines running to get anywhere in tech progress.

    Examples: GregTech, BuildCraft, Forestry/MagicBees


    So, bearing that in mind, you might want to just outright ban automated Mining, but leave Base chunk loading untouched. Its not like a quarry would be server friendly, anyways. Also there is plenty of alternatives for fast-aquiring ores without auto mining.
     
  10. sk89q

    sk89q Administrator
    Staff Member

    Joined:
    1 December 2011
    Messages:
    2.490
    Likes Received:
    1.504

    You would have 6 hours remaining but your chunks would not be unloaded until the next server restart. If you happen to join before the server is restarted, then your time would then be reset.

    However, if the chunk unload routine is written to be run while the server is running, then the time would be much more accurate.
     
  11. LeiserGeist

    LeiserGeist Gamer, Software Developer

    Joined:
    26 October 2012
    Messages:
    479
    Likes Received:
    116
    lol are you the US Government or something? If I remember right you've been mentioning banning a few helpful things ingame too xD

    On a serious note, I think 24 hours would be a reasonable time to unload chunks, assuming that timer starts after the player logs out.
    If it gets bad enough, maybe only load other chunks while the player is online? (IE someone's quarry in the mining world, a secondary base or large base in general, an oil well, etc)
     
  12. wolfenstein19

    wolfenstein19 Active Member

    Joined:
    2 April 2012
    Messages:
    129
    Likes Received:
    41
    Any system like that is completly useless and flawed - it just favors people whose pcs can support perma-afking with an auto-rejoin bot
     
  13. Neonbeta

    Neonbeta Person who did stuff and things

    Joined:
    2 March 2012
    Messages:
    2.603
    Likes Received:
    757
    And yet no one has done that.... I wonder why.
     
  14. wolfenstein19

    wolfenstein19 Active Member

    Joined:
    2 April 2012
    Messages:
    129
    Likes Received:
    41
    Because its not in place yet. Think for a second that you guys would enable a timer or worse, only online players would chunkload. Surely you see why that would benefit people whose pc can run constantly and that have an afk bot.
     
  15. kerjava

    kerjava husky mix

    Joined:
    22 September 2012
    Messages:
    158
    Likes Received:
    25
    lol im sure i could do that it would not even be hard but what is the point ? + a chunk loader is less a drain on the server as a whole then a player afking ( am correct in amusing a chunk loader area even at full size(ccloaders and quarry) are much smaller then player loaded areas
     
  16. kerjava

    kerjava husky mix

    Joined:
    22 September 2012
    Messages:
    158
    Likes Received:
    25
    who here really cares to put the time to use an afk bot ? that kinda takes the point of playing the game out of it if you have a bot play it for you ... just saying..
     
  17. tjmaximum

    tjmaximum New Member

    Joined:
    20 February 2012
    Messages:
    23
    Likes Received:
    3
    i think 12 hours would be a nice time it unloads all the people who have chunkloaders but arent playing as much anymore
     
    kerjava likes this.
  18. wolfenstein19

    wolfenstein19 Active Member

    Joined:
    2 April 2012
    Messages:
    129
    Likes Received:
    41
    imo limiting or disabling chunk loaders in any way is pointless ... it just favors people who can idle longer.

    There is really no debating that, thats simple deductive logic.

    Also, currently, when a chunk unloads, things like power converters and ic2 energynets get screwed up and you end up having to replace a bunch of stuff to get it to work again.
     
  19. sk89q

    sk89q Administrator
    Staff Member

    Joined:
    1 December 2011
    Messages:
    2.490
    Likes Received:
    1.504
    We do not care about who 'benefits' and who doesn't. As long as most players are having fun, it's OK.

    If you care about who gets the farthest ahead the quickest, then you are on the wrong server.

    We are definitely doing something so that chunks are not loaded forever. There is no argument about that.
     
    zoomerx and kerjava like this.
  20. wolfenstein19

    wolfenstein19 Active Member

    Joined:
    2 April 2012
    Messages:
    129
    Likes Received:
    41
    I can see why not forever. But radically cutting down on it (like only online) is completly bogus and will cause people to build more machinery, and idle more. You basicly shift the issue and delay it by a little bit. As we had in points in the ingame discussion, the only thing that can concievably cut down on lag long-term is have people optimize their setups and prevent them from using systems that are inefficient.

    Else it will end up just like in 1.5, oh, with the exception that 1.6 is worse in terms of performance.