1. Hello is there any way how to set time after which garbage is collected or is this managed by system?
    My server run quite well exept for big lag spikes on garbage collection (1-3sec)
    example message
    Code:
    Calling 'OnDispenserGather' on 'ZLevelsRemastered v1.6.6' took 2238ms [GARBAGE COLLECT]
    For example I would like to call plugin garbage collect only on server save
     
  2. Wulf

    Wulf Community Admin

    Garbage collection is handled by Unity and the game. That hook warning means that it took longer than expected because of garbage collection running that time as well. Rust does give you some options to trigger garbage collection, but I wouldn't recommend messing with it.

    Unity - Manual: Understanding Automatic Memory Management
     
  3. Ok I understand now so it seems like my server do garbage collect every 5min which take 2-3sec very noticable lag. I have auto save every 30 minutes so even if I run gc.collect on server save it solves nothing for me but I found a server command gc.interval if I set it to 30min(same as save time) will it cause any problems for me exept for more memory usage?
     
  4. Wulf

    Wulf Community Admin

    Give it a try and see I guess. :)
     
  5. hi my server had 250 fps and one day garbage collection took 2258ms and every time it says that now and my server has 121 fps now