 
                MemorySweep
The MemorySweep mod solves the issue of garbage accumulation in Java memory by automatically performing cleanup at specified intervals. By default, cleanup occurs every 15 minutes, but this interval can be changed in the configuration file.
Features:
- Periodic calls to System.gc() to remove unused objects from memory
- Addition of the /memorysweep command for manual cleanup triggers
- Optional cleanup activation when memory usage reaches 90%
Performance Optimization
If lag occurs during garbage collection, it's recommended to add the JVM parameter: -XX:+ExplicitGCInvokesConcurrent
Alternative Solution
For maximum performance, consider trying ZGC - the garbage collector introduced in Java 11:
-XX:+UnlockExperimentalVMOptions -XX:+UseZGCImportant: Do not use ZGC concurrently with other garbage collectors and do not add the -UseAdaptiveSizePolicy parameter.
