Aikar flags
Anytime I try Aikar flags for my server, my server just crashes.
The server starts etc, but after a few minutes it just crashes.
Im using pterodactyl panel btw, idk if that makes a difference.
108 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 uekc#0
- Send your flags
- how much ram have you allocated to your ptero container (assuming you're using ptero / docker)
I'm not using aikar's flags rn, just standard flags that come with ptero,
But when I used aikar's flags I used this:
Someone once said to remove the alwayspretouch flag so I already tried it with and without that flag already
I have 16GB allocated
Remove always pre touch.
Set Xms and Xmx to 14336.
(by the way allocating 12+gb is generally frowned upon because it can cause perf issues).
xd ik servers that use 64gb
But im already using 9.27 GiB of ram with almost no players online
What do big servers do that have 100 players on one server?
how are you getting that statistic
of 9.27gb usage
never use pterodactyl
always use spark
/spark healthreport
ptero only shows the JVM usage and not the actual usageptero incorrectly reads MC ram used
oh lol
only 3.9
yup
The reason why i told you to do this is because the AlwaysPreTouch flag preallocates all the memory, and i told you to reduce the Xms & Xmx because docker + the JVM likes to use 1-2gb more than it’s told to so you should always leave 1-2gb for overhead
alright
So now it wont crash anymore?
It shouldn’t.
Try.
So when remove the pretouch flag I should remove all of this
-XX:+AlwaysPreTouch
?yes
why is AlwaysPreTouch bad?
read
Yeah but why is preallocating the memory a bad thing
it preallocates all the memory, so if you set the Xms and Xmx to 16GB it will ‘reserve’ 16GB of ram, displaying as 16GB of ram usage.
If your ram usage reaches the limits of the container, docker will kill the process
that is called an OOME, or an out of memory exception
oooh alr
Thanks!
How much ram do servers that have 100 players online in one server use?
depends
a survival smp
for example
One server i know of was using ~18GB with 155 plrs
SMP I believe
@professor confirm
Yes
:ThumbsUp: cheers
there ya go
^^^ flags are very dependent on hardware. Aikar’s is very generic and does it’s best.
Would recommend a GC flag tuning service from the likes of @Jared | InfraCharm which is afaik $5
CPU?
Intel Core i5-13500
This is all the hardwarre of my dedicated server
Thank you for all of this information! greatly appreciated!
np
Do you want me to assist you in further optimizing the server for the system?
Yeah
Edit your startup to these and after 15 minutes send me a new spark report and the
gc.log
Will try, but then on the other hand Skullians said not to use pretouch and lower Xms and Xmx to leave 1-2gb for overhead?
@Louis_Dew
uekc has reached level 2!
Roles Added:
Level 2
Keep it how you have it for now and just add
-Xlog:gc*:file=gc.log:time,tags:filecount=5,filesize=10M
like the example I sent above👍
I have two,
gc.log
and gc.log.0
Which one do you want?
Spark profiler is running rngc.log - you must have rebooted since you added the flash for there to be two of them
I checked and my server crashed 2 hours ago
So thats why it rebooted
We have uploaded your file to a paste service for better readability
Paste services are more mobile friendly and easier to read than just posting a file
gc.log
Requested by uekc
spark
spark is a performance profiler for Minecraft clients, servers, and proxies.
Spark Profile Analysis
These are not magic values. Many of these settings have real consequences on your server's mechanics. See this guide for detailed information on the functionality of each setting.
✅ Your server isn't lagging
Your server is running fine with an average TPS of 20.
Requested by uekc • Page 1 of 4
Might help if your xms isn't the same as the xmx.
Aikars does that - not sure why
i've heard that it's necessary for aikar's flags to function properly
not sure if that's true and if so why
It makes no sense why though haha
I should just make my own flags site at this point
didn’t realize this service would be popular
You should
Does everything seem fine?
My server did crash tho a few hours ago
Still looking at it all
making your new flags
Aikar flags are old af, they were written back in the days of Java 8 being minecrafts default. We need a refresh lol
Taking you away from aikars
So why did people always keep suggesting me to use Aikar flags lol
i agree with leche, the ones that people have tried to popularize like bruces are client focused and its test are by far not very accurate
because theres no real better general flags
aikars while old had research into them
most flag sets nowadays are thrown together by people with no real knowledge
or tested with tests that arent stable
I’ll start putting a site together tonight
haha
Almost done here
yes
infra's flags are the new aikars :pepegun:
@Louis_Dew
Update your memory on the container to 18GB
Go ahead and run the server on this for about an hour. Send me the new gc.log after that.
I enabled prefetch so it's optimized for Intel CPUs, added java thread priority, also optimized the GC a bit
If a flag does not work on your server, simply remove it from the startup and let me know which one it was so we can substitute it next time!
Do you know how much memory he's giving to the container?
Ah forgot to mention, thanks for the heads up
@Louis_Dew also before using those flags up your memory to 18GB on the container
Alright, thanks a lot!
How do I know if a flag doesn't work for my server?
It won't start
Alright
the server or the flag?
...the server
But how do I know which flag caused it?
it will say
👍
it's like the
--add-modules=jdk.incubator.vector
doesn't work on java 8
if you use it on java 8, it says "unrecognised VM option: --add-modules=jdk.incubator.vector" or something along those linesOkey, thanks!
Hey I was wandering if there was something for amd
There are some things
What would you suggest
I can’t just suggest flags because they don’t work like that
Ah what would you need info wise anyways?
Spark report, gc log, system specs
Ah, that’s sad since there is a big difference between the servers I run
What do you mean?
i mean sadly there isn't a close 1 fit for all then
No, not at all
Im working on a new site now that will automate my process of doing all of this
i think you are taking over aikars job now
well, someone's gotta do better
wasn't really a high bar set in the first place
God dam, stop hurting aikar he did his best xD
InfraCharm Flags
alookin good
yo sick
When you're done post this over in #resources!
AgressiveOpts UseFastAccessorMethods
UseBiasedLocking
These three don’t work
Alright
We have uploaded your file to a paste service for better readability
Paste services are more mobile friendly and easier to read than just posting a file
gc.log
Requested by uekc
oof
These flags work
I think
Thanks a lot!
!solved
post closed!
The post/thread has been closed!
Requested by uekc#0
I don’t know if the flags are the cause but it could be the case. The ram just goes up and up until the server crashes
It takes like 8 hours and the servers ram just constantly goes higher slowly until OOM
How often do you do restarts?
I restart daily
Send another spark
👍🏻👍🏻👍🏻
spark
spark is a performance profiler for Minecraft clients, servers, and proxies.
Spark Profile Analysis
These are not magic values. Many of these settings have real consequences on your server's mechanics. See this guide for detailed information on the functionality of each setting.
✅ Your server isn't lagging
Your server is running fine with an average TPS of 20.
Requested by uekc • Page 1 of 5
spark
spark is a performance profiler for Minecraft clients, servers, and proxies.
Spark Profile Analysis
These are not magic values. Many of these settings have real consequences on your server's mechanics. See this guide for detailed information on the functionality of each setting.
✅ Your server isn't lagging
Your server is running fine with an average TPS of 20.
Requested by uekc • Page 1 of 5