{"id":23433938,"url":"https://github.com/obydux/minecraft-graalvm-flags","last_synced_at":"2025-08-03T04:35:01.436Z","repository":{"id":43037366,"uuid":"282003065","full_name":"Obydux/Minecraft-GraalVM-Flags","owner":"Obydux","description":"Minecraft server startup flags for GraalVM","archived":false,"fork":false,"pushed_at":"2024-08-26T20:09:28.000Z","size":74,"stargazers_count":125,"open_issues_count":0,"forks_count":2,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-06-10T01:49:47.186Z","etag":null,"topics":["graalvm","graalvm-flags","java","java-flags","jvm-flags","minecraft","minecraft-flags","minecraft-graalvm","minecraft-server"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Obydux.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"Obydux","patreon":"Obydux","open_collective":"Obydux","ko_fi":"Obydux","liberapay":"Obydux","buy_me_a_coffee":"Obydux","custom":"https://paypal.me/Obydux"}},"created_at":"2020-07-23T16:31:34.000Z","updated_at":"2025-06-08T17:01:11.000Z","dependencies_parsed_at":"2024-04-06T20:32:06.106Z","dependency_job_id":"e7f3eb04-f487-4567-905d-8d0fdfabb367","html_url":"https://github.com/Obydux/Minecraft-GraalVM-Flags","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Obydux/Minecraft-GraalVM-Flags","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Obydux%2FMinecraft-GraalVM-Flags","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Obydux%2FMinecraft-GraalVM-Flags/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Obydux%2FMinecraft-GraalVM-Flags/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Obydux%2FMinecraft-GraalVM-Flags/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Obydux","download_url":"https://codeload.github.com/Obydux/Minecraft-GraalVM-Flags/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Obydux%2FMinecraft-GraalVM-Flags/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259360804,"owners_count":22845821,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["graalvm","graalvm-flags","java","java-flags","jvm-flags","minecraft","minecraft-flags","minecraft-graalvm","minecraft-server"],"created_at":"2024-12-23T11:36:52.725Z","updated_at":"2025-08-03T04:35:01.423Z","avatar_url":"https://github.com/Obydux.png","language":null,"readme":"[![](https://img.shields.io/discord/1383468620566237234)](https://discord.gg/sQ6VmWDzN3)\n[![](https://img.shields.io/github/sponsors/Obydux)](https://github.com/sponsors/Obydux)\n\nInformation\n======\n\nThese Java flags are meant for Minecraft servers ran with the GraalVM Java Runtime which you can download from [here](https://www.graalvm.org/downloads/). They only work on Java 17 and higher and **they only run on Linux**.\n### NOTE: These flags were just put together based on a few sources without proper testing on the actual performance impact. Most of these flags aren't GraalVM specific either. For a more sane way of optimizing the Java GC please read [this](https://obydux.github.io/Minecraft-startup-flags/).\n\nGraalVM Java Flags\n======\n\n```--add-modules=jdk.incubator.vector -XX:+UseG1GC -XX:MaxGCPauseMillis=130 -XX:+UnlockExperimentalVMOptions -XX:+UnlockDiagnosticVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -XX:G1NewSizePercent=28 -XX:G1HeapRegionSize=16M -XX:G1ReservePercent=20 -XX:G1MixedGCCountTarget=3 -XX:InitiatingHeapOccupancyPercent=10 -XX:G1MixedGCLiveThresholdPercent=90 -XX:SurvivorRatio=32 -XX:MaxTenuringThreshold=1 -XX:+PerfDisableSharedMem -XX:G1SATBBufferEnqueueingThresholdPercent=30 -XX:G1ConcMarkStepDurationMillis=5 -XX:G1ConcRSHotCardLimit=16 -XX:G1ConcRefinementServiceIntervalMillis=150 -XX:G1RSetUpdatingPauseTimePercent=0 -XX:+UseNUMA -XX:-DontCompileHugeMethods -XX:MaxNodeLimit=240000 -XX:NodeLimitFudgeFactor=8000 -XX:ReservedCodeCacheSize=400M -XX:NonNMethodCodeHeapSize=12M -XX:ProfiledCodeHeapSize=194M -XX:NonProfiledCodeHeapSize=194M -XX:NmethodSweepActivity=1 -XX:+UseFastUnorderedTimeStamps -XX:+UseCriticalJavaThreadPriority -XX:AllocatePrefetchStyle=3 -XX:+AlwaysActAsServerClassMachine -XX:+UseTransparentHugePages -XX:LargePageSizeInBytes=2M -XX:+UseLargePages -XX:+EagerJVMCI -Dgraal.TuneInlinerExploration=1 -Dgraal.LoopRotation=true -Dgraal.OptWriteMotion=true -Dgraal.CompilerConfiguration=enterprise```\n\nHosting\n======\n\nI highly recommend BisectHosting for your server needs. They have 20 server locations, advanced DDoS protection and an user-friendly panel for server management. Use code **OBYDUX** to get 25% off!\n\u003ca href=\"https://bisecthosting.com/OBYDUX\"\u003e\n  \u003cimg alt=\"BisectHosting\" src=\"https://www.bisecthosting.com/partners/custom-banners/b6a2ddec-ce4c-4f54-96d0-6a7f9796d386.webp\"\u003e\n\u003c/a\u003e\n\nFlag Explanations\n======\n\n- `--add-modules=jdk.incubator.vector` This is only useful for servers running Pufferfish or Purpur on 1.18.2 and above. It enables SIMD operations on your server if they're available and optimizes map rendering.\n- `-XX:+UseG1GC -XX:MaxGCPauseMillis=130 -XX:+UnlockExperimentalVMOptions -XX:+UnlockDiagnosticVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -XX:G1NewSizePercent=28 -XX:G1HeapRegionSize=16M -XX:G1ReservePercent=20 -XX:G1MixedGCCountTarget=3 -XX:InitiatingHeapOccupancyPercent=10 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1RSetUpdatingPauseTimePercent=0 -XX:SurvivorRatio=32 -XX:MaxTenuringThreshold=1 -XX:+PerfDisableSharedMem` Generic G1GC flags. These flags are very close to [Aikar's](https://aikar.co/2018/07/02/tuning-the-jvm-g1gc-garbage-collector-flags-for-minecraft/).\n- `-XX:G1SATBBufferEnqueueingThresholdPercent=30 -XX:G1ConcMarkStepDurationMillis=5 -XX:G1ConcRSHotCardLimit=16 -XX:G1ConcRefinementServiceIntervalMillis=150` Optimizes G1GC's concurrent collection threads, the last 2 flags aren't needed in Java 21 anymore.\n- `-XX:G1RSetUpdatingPauseTimePercent=0` Makes all the work to be done in the G1GC concurrent threads, not the pauses.\n- `-XX:+UseNUMA` Enables optimizations for multisocket systems, if applicable. Not sure if this applies to MCM CPUs like Ryzen or Epyc, but its auto disabled if not applicable.\n- `-XX:-DontCompileHugeMethods` Allows huge methods to be compiled.\n- `-XX:MaxNodeLimit=240000 -XX:NodeLimitFudgeFactor=8000` Enable optimization of larger methods.\n- `-XX:ReservedCodeCacheSize=400M -XX:NonNMethodCodeHeapSize=12M -XX:ProfiledCodeHeapSize=194M -XX:NonProfiledCodeHeapSize=194M` Reserves more space for compiled code. All sections must \"add up\" to `ReservedCodeCacheSize`.\n- `-XX:NmethodSweepActivity=1` (default 10) Keeps \"cold\" code in the cache for a longer time. There is no risk of \"filling up\" the code cache either, as cold code is more aggressively removed as it fills up. \n- `-XX:+UseFastUnorderedTimeStamps` Avoids system calls for getting the time. The impact of this will vary per system, but we aren't really concerned with logging timestamp accuracy. \n- `-XX:+UseCriticalJavaThreadPriority` Nothing should preempt the Minecraft threads. GC and Compiler threads can wait.\n- `-XX:AllocatePrefetchStyle=3` Generate one prefetch instruction per cache line. More aggressive prefetching is generally useful on newer CPUs with large caches.\n- `-XX:+UseTransparentHugePages -XX:LargePageSizeInBytes=2M -XX:+UseLargePages` Enables [Large Pages](https://kstefanj.github.io/2021/05/19/large-pages-and-java.html).\n- `-XX:+EagerJVMCI` Eagers the JVMCI Compiler provided by GraalVM.\n- `-Dgraal.TuneInlinerExploration=1 -Dgraal.LoopRotation=true -Dgraal.OptWriteMotion=true -Dgraal.CompilerConfiguration=enterprise` Generic GraalVM flags.\n\nSources\n======\n\n- Updated Aikar flags: https://github.com/etil2jz/etil-minecraft-flags\n- Red Hat's optimization guide: https://www.redhat.com/en/blog/optimizing-rhel-8-run-java-implementation-minecraft-server\n- BruceTheMoose's Java flags benchmarks: https://github.com/brucethemoose/Minecraft-Performance-Flags-Benchmarks\n","funding_links":["https://github.com/sponsors/Obydux","https://patreon.com/Obydux","https://opencollective.com/Obydux","https://ko-fi.com/Obydux","https://liberapay.com/Obydux","https://buymeacoffee.com/Obydux","https://paypal.me/Obydux"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fobydux%2Fminecraft-graalvm-flags","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fobydux%2Fminecraft-graalvm-flags","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fobydux%2Fminecraft-graalvm-flags/lists"}