(Client) Ram keeps hitting 100 and freezing. Any help
I have the spark report withe threshold of 170 ticks https://spark.lucko.me/Y66Fm0TWif
spark
spark is a performance profiler for Minecraft clients, servers, and proxies.
135 Replies
Spark Profile Analysis
❌ Processing Error
The bot cannot process this Spark profile. It appears that the platform is not supported for analysis. Platform: Forge
Requested by sp1d3rman20
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 sp1d3rman20#0
spark
spark is a performance profiler for Minecraft clients, servers, and proxies.
Spark Profile Analysis
❌ Processing Error
The bot cannot process this Spark profile. It appears that the platform is not supported for analysis. Platform: Forge
Requested by sp1d3rman20
server is spending a lot of time saving chunks
what should i fo
you using a 5200 hdd?
@Sp1derman20
im using a 2tb ssd
set sync chunk writes to false in server.properties
if you’re self hosting this on a pc you also use it won’t help
Make sure you’re not running out of space
noe its on a server
okay
this
its not in there, do i just add sync-chunk-writes=false and save?
its for modded minecraft 1.12.2
oh :/ guess it’s not a 1.12.2 feature
what perf mods do you have?
texfix,ae2 unofficial lite, better biome blend, betterfps, chunk pregenerator,clumps, entitie culling, fastfurnace,particle culling, performant, phosphor, phosphor crash fix, stackie, universal tweaks, and vintage fix. I tried to use vanilla fix but iwould get spammed with errors onvolving the midnight mod so i took it out
check out AI improvements
Alfheim lighting engine
i tried alfheim lighting engine
i would keep gettin gthe mixin booter dependency missing
ah
Try censoredASM
i tried censored asm
for clients, things like entity culling
Fast workbench
it would launch but the menue screen would say an error and to go to s text file
tried universal tweaks?
its in
ah
you’ve got basically all the mods possible
how much ram have you given?
12 gb
how much ram on the entire machine?
32 gb
using Aikar flags?
i should
so you don’t atm?
i thinkn i did
is what i mean
check
i copied the hava rguments and out it in the run bat
make sure you have
but you say it hits 12GB really quickly?
you mean put them in my java arguments
yeah
what happens is when join the server i start at 55% and then it will slowly climb up and stop at 77% for a while and eventually the games hits 100% and then freeze five second normal and freeze
sometimes it varies from 30 mins to 2 hours
also im using graalvm java 8
you should consider doing
/spark heapdump
when you get close to filling up your RAM
then use eclipse memory analyser to look at the heapdump
and it should give you a idea of what’s using all the ram
if you want you can send me the heapdump and I take a look at it when I canshould i do the heapdump when i am experiencing the lag spike
I would do it once you see your ram is close to being 100% full
ok then
(note, the heapdump file will be like 10GB in size)
got it
i was able to make a heapsummary
spark
spark is a performance profiler for Minecraft clients, servers, and proxies.
Spark Profile Analysis
❌ Processing Error
The bot cannot process this Spark profile. It appears that the platform is not supported for analysis. Platform: Forge
Requested by sp1d3rman20
looking for the heapdump file
Should be in the spark config folder
Do you happen to have a lot of entities?
item entities*
during f3
o usually see 4/90 ish entities
where do i upload the heapdump file
you can either analyse it yourself by installing eclipse memory analyse or you can upload it to mediafire or whatever and send me the link and I’d take a look when I can
its 3.5 gb so im going to try uploading it to mega
i cant launch the eclipse memory analyzer
i get error could not create java virtual machine
you need to use a later version of java
?
which one
17 or higher
it says an internal error occured during: parsing heap dumo
java heap sapce
open the .ini file
that’s in the same folder as the exe files
there should be a flag in the text, an Xmx flag
bump that up
do maybe 7000mb
leak suspects report, component report reopen previously run reprots
leak suspects



Have you pregenerated?
what do you mean
You have chunk pregenerator
Have you actually used it
no
i thought it did its own thing
you should use it
no
you have to set it up yourself
and run it yourself
i see
pregenerating is where you generate all the chunks within a specified radius
this removes all lag when it comes to generating chunks because they are already generated
so the server only has to load and unload them
rather than do that and also generate them
a good pregen point is 5-10k depending on how many players you have
If you’ve gone, let’s say, 11k blocks out, pregen 11k or more blocks
then set a worldborder to stop you or anyone else going further
pregenerating takes LONG time by the way
huh
so how would i do that
i se the pregen command
How far do you want to pregen
we usually dont leave the base for sometimes
so liek 30 chunks ish
30 chunks? you know that’s only 480 blocks right
i dont know what a good measurment is
5k blocks (512 chunks) is often a good start
and fine for small servers
/pregen start gen radius word SQUARE
/pregen gen startradius square 0 0 512
execute this while in the overworldthank you
5

thats 512 blocks
chunk pregenerator does it in chunks
look at his screenshot
what about it
it says 250 / 701k chunks

are you sure that’s not just it doing it in parts
no
not at all
so the wiki lied to me

/pregen gen startradius square 0 0 100
- Generates everything within 100 Chunks radius in the Senders Dimension (Server = Overworld, Player = The Dimension the Player is in)
see @ProGamingDk
ah
is this going to hlep with the ram maxing out
hopefully yes
it should
i see
its been a couple of hours and its still chunkloading and i still hit 100


Yeah pregenerating is quite ram hungry
Btw @Sp1derman20, if you’re using sponge or a hybrid server software, please use the sponge or bukkit versions of spark. The 1.12 forge version of spark hasn’t been updated in ages
I’m not saying to use sponge or hybrid softwares if you currently don’t, but if you’re using one of them, then use the other version of spark
I’m using a normal for 1.12 server jar
Will switching cause any sort of problems
Sponge has some incompatibles with some performance mods
And hybrid softwares cause a lot of issues
i tried using sponge and the server crashes
It will. Sponge needs config changes for on optimizations mods for it to work. It isn’t that important though if your issue is a memory leak
after the pregenerating my ram was consistently at 55%
and randomly it jumped to 100%


seems to be the sae probelmsm
when you’re pregenerating you’ll likely run into the same problem
because from what I can tell the issue you’re encountering is when you’re generating new chunk / structures
but i was just in my base the whole time
yeah well the pregenerator is generating new chunks
wait
Are you saying that’s after the pregen?
Is this during or after the pregen
yeas
the pregen isnt on my screen anymore
did you restart after?
it’s possible the Pregeneration is still going
my game yes
the server
not the game
yes
it seems my ram is maxing out faster than before
yes because you’re likely still pregenerating
just the pregenerator gui doesn’t show
/pregen info ShowTaskList
it shos me this
/pregen info listen
the choices are listen auto listen and unlisten
auto
Sp1derman20 is ignoring tasks is wha tit said
@Sp1derman20 how much memory does your server have, what are you doing to check the memory usage, is the server crashing (either with or without a crash log generated) and what is the server’s render distance in server.properties (plus player count)
Is this a specific modpack or did you make it
they have 12GB
Oh, also what are the launch flags
they haven’t shown them but they think they’re using Aikar flags (they said they should be)
java -Xms8192M -Xmx8192M --add-modules=jdk.incubator.vector -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=4 -XX:InitiatingHeapOccupancyPercent=15 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 -XX:+PerfDisableSharedMem -XX:MaxTenuringThreshold=1 -Dusing.aikars.flags=https://mcflags.emc.gs -Daikars.new.flags=true -XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=8M -XX:G1ReservePercent=20 -jar server.jar
Aikar's Thoughts
JVM Tuning: Optimized G1GC for Minecraft - Aikar's Thoughts
Learn more about my In depth study on tuning the G1GC garbage collector to be optimized for how Minecraft servers run, and keep low pause efficient usage.
ther server doesnt crash
how are you measuring the ram usage
its thec client( me and my friends whos ram maxes out and we have to relaunce so we dont keep freezing

…
this WHOLE time
we’ve been working under the impression that the server is the one running out of ram
💀
Bro there is no way
i said that the clients were runniong out of ram
i lied
but yes our problem is that the clients ram will reach 100 and freeze which forces us to relaunch to have a normal xperioence
somehow the server runs fun even though it has the same mdos
💀
i thought i clarified it but that must have bean in a different thread
my bad
How much ram are you allocating to each client?
Around 10-12 gb
2 of us use 12 gb one of us uses 10gb
Did you allocate too much RAM? If you hit f3 at the top right does it show 100% RAM usage there?
Are you using Bobby (or another view distance extending mod)?
I don’t if too much ram is the issue. And yes when i press f3 it shows 100% memory usage and allocated climbing from 80 to 100 causing a freeze
Im playing on the latest insanecraft modpack on minecraft 1.12.2. on curseforge and I added these mods to make it smoother: Texfix V-12-4.0 , stackie 1.12.2-1.3.5 , renderilib 1.12.2 1.3.5, phosphor 1.12.2-0.2.7, phosphor crashfix 1.12.2-1.0.0, particle culling 1.12.2 v1.4.3, lunatrius core 1.12.2-1.2.0.42, entity culling 1.12.2-6.4.3, chunk-pregenerator 1.12.2-4.4.8, carbonconfig 1.12.2-1.2.4. betterbiomeblend 1.12.2-1.1.7, ae2-uel v0.56.6, !configanytime-3.0, vintagefix 0.5.1, universal tweaks 1.12.2-1.11.0, [MixinCompat-1.1-1.12.2] !mixinbooter-8.0 (if i use the later versions universal tweaks stops working) and Mixinbootsrap-1.1.0. (I also added Vanilla fix but i would get midnight dimension errors and crashes saying the midnight was the reason so i took out vanillafix. I don't know why but any if dont move for 30 minutes my ram reaches 100% and i start freezing i have a profiler for this freeze here:https://spark.lucko.me/M3Mn7c9xNV. But another time is after about 4 hours of playing my ram maxes out and I start freezing as well i have this profiler here:https://spark.lucko.me/NFU6Gbp40J. If anybody has any insight or can help that would be wonderful Thanks in advance. Im using graalvm Java and I have these arguments:-XX:+AggressiveOpts -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:+CMSConcurrentMTEnabled -XX:parallelGCThreads=4 -Dsun.rmi.dgc.server.gcInterval=1800000 -XX:+UnlockExperimentalVMOptions -XX:+ExplicitGCInvokesConcurrent -XX:MaxGCPauseMillis=50 -XX:+AlwaysPreTouch -XX:+UseStringDeduplication -Dfml.ignorePatchDiscrepancies=true -Dfml.ignoreInvalidMinecraftCertificates=true -XX:-OmitStackTraceInFastThrow -XX:+OptimizeStringConcat -XX:+UseAdaptiveGCBoundary -XX:NewRatio=3 -Dfml.readTimeout=90 -XX:+UseFastAccessorMethods
sparks are useless
because you’re running such an old ver