Ram allocation settings not working.
Hello, I have been trying to work on optimizing my MC server, as our player base increses I noticed people complaining and the server is using all its memory. I tried fixing this by adding more ram - java -Xmx17G -Xms5G @libraries/net/minecraftforge/forge/1.20.1-47.2.0/win_args.txt %* - but when I did this the amout of ram the server uses dose not change at all! its as if what im adding to the .bat has 0 affect. any guidence or help would be grate!
77 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 thefeds2.0#0
How are you measuring the amount of RAM that the server is using
The minecraft server pop up,
oh god
that one should not be trusted
its horrendus
please add --nogui to the startup flags
gives more performance, and is just better
oh sorry im new to all of this so I dont really know what im doing haha
where do I add it?
to the end of java -Xmx17G -Xms5G @libraries/net/minecraftforge/forge/1.20.1-47.2.0/win_args.txt
Like this, java -Xmx17G -Xms5G @libraries/net/minecraftforge/forge/1.20.1-47.2.0/win_args.txt--nogui %*?
yes
no
you need to add a space
oh
not reading
π
right
between win_args.txt and --nogui
Added, and then will the proper amout of ram work? or whats a better way of seeing how much ram the server is acutly making
using spark
!spark
Spark Profiler
Spark can be used to see why your server or client is lagging.
https://spark.lucko.me/
Admincraft Canned Responses
can it be added to a pre existing server?
Yes itβs a mod & plugin
Add it to your mods folder
Okay π
Should have a forge download there
Is this a server sided mod only?
yes
can also be used on client
but not needed
Should a new window open when the server restarts?
should be in a terminal/command prompt window
nogui turns off the gui
I see the normal black windows\system32\cmd.exe but no new speical window for Spark
oh no
spark doesnt do a ui on your computer, its uses web
not taht you need it for your needs
just do /spark healthreport
in game? or like in the CMD on my VPS?
ingame
if you have op
Do I need spark installed client side for it to work? I did /spark healthreport in game and nothing shows in text box. I am op
I see it as a comand now in game so I know its working in that way
shouldnt need to, try and run it in console
without the /
it did something but idk if thats random or important lol
youre using the wrong spark version
CurseForge
spark
spark is a performance profiler for Minecraft clients, servers and proxies.
76.7M Downloads | Mods
Oh. Idk I just downloaded of the site and clicked forge from this link
Let me try again now
Worked! seems my issue may be tick related, any suggestions on performace imporvments?
use /spark profiler start --timeout 300
we can check whats up
(windows does make everything worse
as it doesnt support async profiling)
Its all I have sadly hahah
Okay I stopped and uploaded
idk if its okay to post the link here, or if it has lots of perosnal info in it lol
send it
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 thefeds2.0#0
- use aikar flags
- create mod is lagging kind of hard
- you have a shitty cpu which is the main reason of your lag
set sync-chunk-writes to false in server.properties
aikar flags? whats that?
assuming its not running on a hdd
add this to your JVM args
for startup
above or below the other thing we added?
send your current startup flag configs
@echo off
REM Forge requires a configured set of both JVM and program arguments.
REM Add custom JVM arguments to the user_jvm_args.txt
REM Add custom program arguments {such as nogui} to this file in the next line before the %* or
REM pass them to this script directly
java -Xmx17G -Xms5G @libraries/net/minecraftforge/forge/1.20.1-47.2.0/win_args.txt --nogui %*
pause
you'd put aikar's flags inside of
user_jvm_args.txt
in this?
yeah
just paste it all in on a new line
yes
and will this start with my current .bat? cuz I dont see it mention anything with the user_jvm_args
it should
Before someone else helped me the bat was
@echo off
REM Forge requires a configured set of both JVM and program arguments.
REM Add custom JVM arguments to the user_jvm_args.txt
REM Add custom program arguments {such as nogui} to this file in the next line before the %* or
REM pass them to this script directly
java @user_jvm_args.txt @libraries/net/minecraftforge/forge/1.20.1-47.2.0/win_args.txt %*
pause
and this mentioned the jvm, should I change it back to this, and add the new --nogui line to it? or should I just keep the bat the same.
in user_jvm_args add --nogui to a new line
and then set your bat to this
Like this?
yes
πππ And last thing, you said my CPU was bad, I only have 8 cores RN, should I get 12... 16 or even more?
Minecraft is primarily single threaded.
Therefore cores doesn't matter, singlethreaded performance does
and that Xeon does not have a good singlethread iirc
Ah, cuz I have a VPS though a provider so I didnt know
oof
vps makes performance even worse
^
and uh
windows datacenter isn't ideal
Okay, well hopefully all the changes made will help atlest a bit
I will go test and make sure the server still works hahah
thanks!!
oh
says it dose not recognize --nogui
try removing the --
and just having nogui
"the"
why is there a the in there
xd
remove --nogui (or nogui) from user_jvm_args
and in start.bat, do
java @user_jvm_args.txt @libraries/net/minecraftforge/forge/1.20.1-47.2.0/win_args.txt --nogui %*
Thanks guys!