Jump to content

Sorry for this question, but how to allocate more ram 1.8.1 Forge Server


benJi2D

Recommended Posts

Guys, I tried to find a solution for an hour now, what I tried...it doesn't work. I start my server with a run.bat and it's content looks like this:

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 u/user_jvm_args.txt u/libraries/net/minecraftforge/forge/1.18.1-39.0.64/win_args.txt %*

java -Xmx8192M -Xms8129M -jar server.jar nogui

PAUSE

BUT it's still using 4GB of RAM. I have 32, it should be able to work...what am I doing wrong?

Link to comment
Share on other sites

4 hours ago, diesieben07 said:

It won't magically use 8GB of RAM If it doesn't need it.

That's not what I asked now was it? I'm a smart boy too.

I see the server getting close to 4GB of ram usage and it says " 5% free" which means, it's nearly using all of those 4 it was set to use by default, which means, it's not working.

Link to comment
Share on other sites

On 2/10/2022 at 2:11 AM, benJi2D said:

REM Add custom JVM arguments to the user_jvm_args.txt

java -Xmx8192M -Xms8129M -jar server.jar nogui

You have added the JVM arguments to the .bat file. You need to go into user_jvm_args.txt and add -Xmx8G to the end of the file. Don’t forget to remove the # from the last line before adding this.

You will not see the GUI show all 8GB available at once as diesieben07 mentioned due to the fact that if the server does not need it, then it won’t allocate it.

I hope this helps.

 

Edit: 

Make sure to remove the arguments you added to the .bat file and revert it to it’s original state in case that messes anything up. It shouldn’t because it reads the JVM arguments and starts the server before but just in case.

Edited by hotninja000
Extra Comment
Link to comment
Share on other sites

17 hours ago, hotninja000 said:

You have added the JVM arguments to the .bat file. You need to go into user_jvm_args.txt and add -Xmx8G to the end of the file. Don’t forget to remove the # from the last line before adding this.

You will not see the GUI show all 8GB available at once as diesieben07 mentioned due to the fact that if the server does not need it, then it won’t allocate it.

I hope this helps.

 

Edit: 

Make sure to remove the arguments you added to the .bat file and revert it to it’s original state in case that messes anything up. It shouldn’t because it reads the JVM arguments and starts the server before but just in case.

Okay, is this how my user_jvm_args.txt should look like

 

# Xmx and Xms set the maximum and minimum RAM usage, respectively.
# They can take any number, followed by an M or a G.
# M means Megabyte, G means Gigabyte.
# For example, to set the maximum to 3GB: -Xmx3G
# To set the minimum to 2.5GB: -Xms2500M

# A good default for a modded server is 4GB.
# Uncomment the next line to set it.
-Xmx8G

because it's currently saying: Memory Use: 2000 mb (27% free) 
what does this mean? that...27% of the allocated memory is free or? Becauseif 2GB are used and 25% is free...that means 75% is taken. If 2000 MB is 75%, then the 25% left are 666MB, which means the total allocated is 2666 MB...am I understanding this wrong?

 

Link to comment
Share on other sites

You are understanding it correctly. However there is a little more going on in the background. If the server says it is using 2GB with 27% free that would be something like 800mb free for the server. This just means that your computer has allocated approximately 3GB to the server because that is what your computer thinks it needs. However your computer is willing to give up to 8GB of memory. If your server never needs over 2GB of memory then it will never show more than an extra few % free. This is just to allow more memory for other processes. 
 

Link to comment
Share on other sites

  • 3 months later...

I'm working with very limited recourses on my PC so I wish this graph worked properly I allowed 3gbs when I created the server and now decided to bump it up to 6G's I'm having the same issue as OP there is no update on the GUI itself that says so, it gets to 1% free and seems to stop at 2800ish MB's of space and the entire server starts to lag. This is extremely frustrating I've looked around the internet and can't seem to find ANY fix about this. My user_jvm_args file looks as so.

# Xmx and Xms set the maximum and minimum RAM usage, respectively.
# They can take any number, followed by an M or a G.
# M means Megabyte, G means Gigabyte.
# For example, to set the maximum to 3GB: -Xmx3G
# To set the minimum to 2.5GB: -Xms2500M

# A good default for a modded server is 4GB.
# Uncomment the next line to set it.
-Xmx4G
-Xms2G

I read on reddit that adding an Xms command at the end fixed it for someone but it didn't for me at all.

Edited by lainsqueen
More clarification
Link to comment
Share on other sites

  • 1 month later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.