Recommended JVM Arguments
Can anyone suggest some JVM Arguments to use to help cut down on memory usage and improve TPS?
Currently these are my JVM Arguments:
java -Xms4G -Xmx4G -XX:+UnlockExperimentalVMOptions -XX:+UnlockDiagnosticVMOptions -XX:+AlwaysPreTouch -XX:+DisableExplicitGC -XX:+UseNUMA -XX:NmethodSweepActivity=1 -XX:ReservedCodeCacheSize=400M -XX:NonNMethodCodeHeapSize=12M -XX:ProfiledCodeHeapSize=194M -XX:NonProfiledCodeHeapSize=194M -XX:-DontCompileHugeMethods -XX:MaxNodeLimit=240000 -XX:NodeLimitFudgeFactor=8000 -XX:+UseVectorCmov -XX:+PerfDisableSharedMem -XX:+UseFastUnorderedTimeStamps -XX:+UseCriticalJavaThreadPriority -XX:ThreadPriorityPolicy=1 -XX:AllocatePrefetchStyle=3 -XX:MaxGCPauseMillis=37 -XX:+PerfDisableSharedMem -XX:G1HeapRegionSize=16M -XX:G1NewSizePercent=23 -XX:G1ReservePercent=20 -XX:SurvivorRatio=32 -XX:G1MixedGCCountTarget=3 -XX:G1HeapWastePercent=20 -XX:InitiatingHeapOccupancyPercent=10 -XX:G1RSetUpdatingPauseTimePercent=0 -XX:MaxTenuringThreshold=1 -XX:G1SATBBufferEnqueueingThresholdPercent=30 -XX:G1ConcMarkStepDurationMillis=5.0 -XX:G1ConcRSHotCardLimit=16 -XX:G1ConcRefinementServiceIntervalMillis=150 -XX:GCTimeRatio=99 -XX:ConcGCThreads=2 -jar fabric-server-launch.jar nogui
Server Info:
Memory: 6GB
Cores: 2
Version: Fabric 1.20.1
Mods Installed:
Additional Structures
Alternate Current
Botarium
C2ME
Carpet Fixes
Carpet
Chunk Sending Fabric
Cloth Config
Clumps
Collective
Cristellib
Dungeons Arise
Enchanting Commands
Fabric API
Fabrictailor
Ferrite Core
Floodgate
Get It Together Drops
Geyser
Krypton
LazyDFU
Lithium
LuckyBlocks
MemoryLeakFix
Mob Captains
Modernfix
PolyMc
Resourceful Config
Resourceful Lib
Servercore
Serverux
Smoothchunk Fabric
Spark
Starlight
Tabtps
Terralith
Towns and Towers
Datapacks Installed:
Custom Datapack I made (only has dimension and dimension type)
Cuttable Wood
PK No Creeper Grief
PK Painting Table
Technical Enchant
Any suggestions for edits to the JVM Arguments or any other suggestions to help improve TPS?
45 Replies
Thanks for asking your question!
Make sure to provide as much helpful information as possible such as logs/what you tried and what your exact issue is
Make sure to mark solved when issue is solved!!!
/close
!close
!solved
!answered
Requested by icedracoo#0
Additionally, the server provider we use seems to run Pterodactyl? Since the console says [Pterodactyl Daemon]
is there a reason u need lower memory usage?
there arent any obvious changes here/improvements
well he only have a 4gb server
yes
I think
he has 6
2 gb is being used for overhead
i just saw on some other forums that you shouldnt set the max memory usage the same as the amount of memory you have
should our tps really be averaging around 15?
memory is probably not the reason for the low tps.
get a spark report and send here
is 2gb really needed for overhead?
shouldn’t 1gb be fine for that
how do I send one?
download the mod spark'
it can go to 1.5-2 aswell
i alr got that installed
just how though
wait is overhead just for the OS
no
spark profiler stop
spark profiler start --timeout 300
send link
actually that’s better do that
spark
spark is a performance profiler for Minecraft clients, servers, and proxies.
here
Spark Profile Analysis
❌ Processing Error
The bot cannot process this Spark profile. It appears that the platform is not supported for analysis. Platform: Fabric
Requested by icedracoo#0
c2me is unstable and not production ready
and then u have ur godawful datapacks
and offline-mode
thats all im gonna say because of this ^^
hmm
!offline
can i increase the max memory usage through xmx or you would recommend not
im not gonna help
because ur offline-mode
doesnt geyser need offline-mode?
no..
god no
WHAT
i always assumed yes
and fyi i bought minecraft
offline-mode is a giant security risk
not something we look at
u might have, but your players probably dont and its a security risk + offline-mode is a mess
put server online mode
wait hold on if its on online mode wouldnt bedrock clients be unable to join w/o a java account?
what
please enlighten me
it transfers packets
but like each bedrock player on ur server is like equivalent of 3 players
afaik
so geyser is a source of lag as well?
you do realise bedrock and java accounts are the same now right?
u get both versions..
some are on mobile
does buying the game there such as on appstore and google play give you a java account too?
yes
well it should
*
wait what really
noone has that issue with geyser plugin version + floodgate*
so im assuming yes
oh
welp sorry everyone mb i thought u needed online mode to be turned off when using geyser
do i need to delete the spark profile or smtin? since the discussion is sorta done
what is it for?
jvm overhead
so docker doesnt kill the instance