Garbage Collector 1.0.1

A background plugin that frees up server memory.

  1. TheGamingGrunts
    Tested Minecraft Versions:
    • 1.7
    • 1.8
    • 1.9
    • 1.10
    What is Garbage Collector?

    In short, this plugin is designed to free up available memory from unreferenced objects. There are many plugins on Spigot that don't manage memory well. Sometimes this can be as a result of an oversight, or just plain bad programming. As a result, there can be hundreds or even thousands of unused objects taking up memory.

    This plugin is designed to be an aid to the automatic JVM process by manually calling the garbage collector at a given frequency. There are advantages and disadvantages to this, as noted below.


    Java Garbage Collection Overview

    During runtime, the JVM automatically takes care of garbage collection

    Advantages/Disadvantages of This Plugin

    As stated earlier, this plugin manually calls the JVM garbage collector at given intervals. Doing this only makes a suggestion to the VM that it should run the garbage collector, but doesn't guarantee that it will actually run at that moment. In addition, depending on the objects in memory, calling the GC may actually have no effect. Running the GC frequently may cause temporary performance degradation, especially if there's a lot of cleaning up to do. All of this might not matter, however, because startup flags like -XXnoSystemGC will prevent this from even running. If all goes well, you'll have more memory to work with on your server.

    This is just an overview and if you want to know more, you can do some research on the garbage collector and the advantages and disadvantages of manually calling it.

    Should I Use This Plugin?

    If you are using many memory-intensive or questionably designed plugins on a server with low memory, then I'd recommend giving this a try. This, of course, will vary considerably from server to server.
    Eturne likes this.

Recent Updates

  1. Bug Fix & Debug Message

Recent Reviews

  1. Cubelius_
    Cubelius_
    5/5,
    Version: 1.0.1
    Super! This plugin is very helpful for 1.13+ versions. Respect to the author!!!!
  2. REW01WER
    REW01WER
    4/5,
    Version: 1.0.1
    My server uses like 90% ram after around 20hours.
    Only thing that helped me was to simply restart server. hope this will do something.

    I'm on spigot 1.13.1
  3. brvnk4
    brvnk4
    4/5,
    Version: 1.0.1
    Garabe Collector never should be called automatically, If you have more than 1 thread. Bukkit has a lot of threads and it's very unsafe. Java HotSpot automatically call System.gc() if it is needed.
  4. Eturne
    Eturne
    5/5,
    Version: 1.0.1
    Seems to work, I can't be sure until I leave it running for a while. I'll report back if I find any errors!