Jump to content

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


Recommended Posts

Posted

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?

Posted
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.

Posted
Just now, diesieben07 said:

From my experience that display is wildly inaccurate.

Well, then it gets to 1-2% free, the map stops loading and me and my friend have to restart the server. I want to fix this :(

Posted (edited)
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
Posted
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?

 

Posted

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. 
 

  • 3 months later...
Posted (edited)

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
  • 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.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • Hello all. I'm currently grappling with the updateShape method in a custom class extending Block.  My code currently looks like this: The conditionals in CheckState are there to switch blockstate properties, which is working fine, as it functions correctly every time in getStateForPlacement.  The problem I'm running into is that when I update a state, the blocks seem to call CheckState with the position of the block which was changed updated last.  If I build a wall I can see the same change propagate across. My question thus is this: is updateShape sending its return to the neighbouring block?  Is each block not independently executing the updateShape method, thus inserting its own current position?  The first statement appears to be true, and the second false (each block is not independently executing the method). I have tried to fix this by saving the block's own position to a variable myPos at inception, and then feeding this in as CheckState(myPos) but this causes a worse outcome, where all blocks take the update of the first modified block, rather than just their neighbour.  This raises more questions than it answers, obviously: how is a different instance's variable propagating here?  I also tried changing it so that CheckState did not take a BlockPos, but had myPos built into the body - same problem. I have previously looked at neighbourUpdate and onNeighbourUpdate, but could not find a way to get this to work at all.  One post on here about updatePostPlacement and other methods has proven itself long superceded.  All other sources on the net seem to be out of date. Many thanks in advance for any help you might offer me, it's been several days now of trying to get this work and several weeks of generally trying to get round this roadblock.  - Sandermall
    • sorry, I might be stupid, but how do I open it? because the only options I have are too X out, copy it, which doesn't work and send crash report, which doesn't show it to me, also, sorry for taking so long.
    • Can you reproduce this with version 55.0.21? A whole lot of plant placement issues were just fixed in this PR.
    • Necro'ing that thread to ask if you found a solution ? I'm encountering the same crash on loading the world. I created the world in Creative to test my MP, went into survival to test combat, died, crashed on respawn and since then crash on loading the world. Deactivating Oculus isn't fixing it either, and I don't have Optifine (Twilight forest is incompatible)
  • Topics

×
×
  • Create New...

Important Information

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