Mods
Resource Packs
Data Packs
Modpacks
Shaders
Plugins
Mods Resource Packs Data Packs Plugins Shaders Modpacks
Get Modrinth App Upgrade to Modrinth+
Sign in
ModsPluginsData PacksShadersResource PacksModpacks
Sign in
Settings
AutoSystemGC

AutoSystemGC

Automatically calls System.gc() to free-up memory on your server and client.

2,175
7
Management
Optimization
Utility

Compatibility

Minecraft: Java Edition

1.21.x
1.20.x
1.19.x
1.18.x
1.17.x
1.16.x
1.15.x
1.14.4

Platforms

Fabric

Supported environments

Client-side
Server-side
Client and server (optional)

90% of ad revenue goes to creators

Support creators and Modrinth ad-free with Modrinth+

Links

Report issues View source

Creators

ThatMG393
ThatMG393 Member

Details

Licensed ARR
Published 8 months ago
Updated 8 months ago
DescriptionChangelogVersions

Requires FabricAPI

Modrinth Downloads

AutoSystemGC

This mod will automatically call System.gc() to free-up memory on your server and client!

Note:

System.gc() just tells the JVM to expend effort toward recycling unused objects. So sometimes System.gc() doesn't free memory.

Commands

  • /agc - the main command (alias)
  • /autosystemgc - the main command
  • /autosystemgc trigger - manually trigger memory cleanup
  • /autosystemgc reload - reloads the config as well as the mod

Config

Default config:

{
    "cleanInterval": -1,
    "cleanThresholdPercent": 70.0,
    "memoryCheckInterval": 2,
    "logOnCleanTrigger": true,
    "broadcastOnCleanTrigger": false,
    "configVersion": 1
}

Details:

  • cleanInterval : scheduled memory cleanup (accepts numbers greater than 30, below that just disables the scheduled memory cleanup) (time unit is in seconds)
  • cleanThresholdPercent : the target memory threshold which then triggers a memory cleanup (accepts floats in a range of 0 to 100, value lower than 30 just disables this)
  • memoryCheckInterval : intervals for when to check memory usage percent (accepts numbers higher than 0) (time unit is in seconds)
  • logOnCleanTrigger : logs cleanup details when a memory cleanup is triggered
  • broadcastOnCleanTrigger : sends a server-wide message of the cleanup details when a memory cleanup is triggered
  • configVersion : this is an internal value. DO NOT CHANGE!
Bonus The config reloads automatically 😉

Modrinth is open source.

main@396f737

© Rinth, Inc.

Company

TermsPrivacyRulesCareers

Resources

SupportBlogDocsStatus

Interact

Discord X (Twitter) Mastodon Crowdin
Get Modrinth App Settings
NOT AN OFFICIAL MINECRAFT SERVICE. NOT APPROVED BY OR ASSOCIATED WITH MOJANG OR MICROSOFT.