Jump to content

Java not allocating enough ram

Go to solution Solved by elpiop,
2 minutes ago, Jordancj said:

nope

"java version "1.8.0_231"
Java(TM) SE Runtime Environment (build 1.8.0_231-b11)
Java HotSpot(TM) Client VM (build 25.231-b11, mixed mode)"

it works with 1gb allocated for some reason

You have the 32 bit JVM. If you want to allocate more than ~1.5GB you will need to install 64 bit Java or download the executable and use that in your batch file.

Hi i am running a minecraft server from my home computer but it wont run when i try to give it more than 1gb of ram so this is my running script- "java -Xmx2048M -Xms2048M -jar spigot-1.15.2.jar nogui pause"

and i get this error message

"E:\ServerLocal\Survival>java -Xmx2048M -Xms2048M -jar spigot-1.15.2.jar nogui
Error occurred during initialization of VM
Could not reserve enough space for 2097152KB object heap"

i have 16GB of DDR4 3200MHz ram but i am unsure why i cant run this

Gaming PC Specs:

Motherboard: Gigabyte AORUS B450M Elite

CPU: AMD Ryzen 5 2400G

GPU: Gigabyte GeForce RTX 2080

RAM: Corasir Vengeance RGB pro 2x 8GB 3200MHZ

PSU: Corsair CX550M

Case: Deepcool matrexx 55

Link to comment
https://linustechtips.com/topic/1182461-java-not-allocating-enough-ram/
Share on other sites

Link to post
Share on other sites

1 minute ago, elpiop said:

you need to run the 64 bit java executable

sorry i have this in a batch file, and it runs a java file

Gaming PC Specs:

Motherboard: Gigabyte AORUS B450M Elite

CPU: AMD Ryzen 5 2400G

GPU: Gigabyte GeForce RTX 2080

RAM: Corasir Vengeance RGB pro 2x 8GB 3200MHZ

PSU: Corsair CX550M

Case: Deepcool matrexx 55

Link to post
Share on other sites

3 minutes ago, Jordancj said:

Hi i am running a minecraft server from my home computer but it wont run when i try to give it more than 1gb of ram so this is my running script "java -Xmx2048M -Xms2048M -jar spigot-1.15.2.jar nogui
pause"

and i get this error message "E:\ServerLocal\Survival>java -Xmx2048M -Xms2048M -jar spigot-1.15.2.jar nogui
Error occurred during initialization of VM
Could not reserve enough space for 2097152KB object heap"

i have 16GB of DDR4 3200MHz ram but i am unsure why i cant run this

Not sure what this has to do with programming, nor I'm an expert in minecraft, but it seems to be trying to allocate more than 2048MB? Try to run it with

java -Xmx4096M -Xms4096M -jar spigot-1.15.2.jar nogui

FX6300 @ 4.2GHz | Gigabyte GA-78LMT-USB3 R2 | Hyper 212x | 3x 8GB + 1x 4GB @ 1600MHz | Gigabyte 2060 Super | Corsair CX650M | LG 43UK6520PSA
ASUS X550LN | i5 4210u | 12GB
Lenovo N23 Yoga

Link to post
Share on other sites

4 minutes ago, igormp said:

Not sure what this has to do with programming, nor I'm an expert in minecraft, but it seems to be trying to allocate more than 2048MB? Try to run it with

java -Xmx4096M -Xms4096M -jar spigot-1.15.2.jar nogui

Sorry i wasnt sure what other forum to put it in, i get this error message when i do 4096

"E:\ServerLocal\Survival>java -Xmx4096M -Xms4096M -jar spigot-1.15.2.jar nogui
Invalid maximum heap size: -Xmx4096M
The specified size exceeds the maximum representable size.
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit."

Gaming PC Specs:

Motherboard: Gigabyte AORUS B450M Elite

CPU: AMD Ryzen 5 2400G

GPU: Gigabyte GeForce RTX 2080

RAM: Corasir Vengeance RGB pro 2x 8GB 3200MHZ

PSU: Corsair CX550M

Case: Deepcool matrexx 55

Link to post
Share on other sites

3 minutes ago, Jordancj said:

sorry i have this in a batch file, and it runs a java file

Enter "java -version" in command prompt or powershell. It will say whether or not you have the 64-bit version on your path. If you do not have the 64 bit version, you either need to download it and add it to your path or provide the path to the 64 bit executable in your batch file.

Link to post
Share on other sites

2 minutes ago, elpiop said:

Enter "java -version" in command prompt or powershell. It will say whether or not you have the 64-bit version on your path. If you do not have the 64 bit version, you either need to download it and add it to your path or provide the path to the 64 bit executable in your batch file.

nope

"java version "1.8.0_231"
Java(TM) SE Runtime Environment (build 1.8.0_231-b11)
Java HotSpot(TM) Client VM (build 25.231-b11, mixed mode)"

it works with 1gb allocated for some reason

Gaming PC Specs:

Motherboard: Gigabyte AORUS B450M Elite

CPU: AMD Ryzen 5 2400G

GPU: Gigabyte GeForce RTX 2080

RAM: Corasir Vengeance RGB pro 2x 8GB 3200MHZ

PSU: Corsair CX550M

Case: Deepcool matrexx 55

Link to post
Share on other sites

2 minutes ago, Jordancj said:

nope

"java version "1.8.0_231"
Java(TM) SE Runtime Environment (build 1.8.0_231-b11)
Java HotSpot(TM) Client VM (build 25.231-b11, mixed mode)"

it works with 1gb allocated for some reason

You have the 32 bit JVM. If you want to allocate more than ~1.5GB you will need to install 64 bit Java or download the executable and use that in your batch file.

Link to post
Share on other sites

what @elpiop said is right. Uninstall any current versions of java, then go here: https://www.java.com/en/download/manual.jsp and click the windows 64-bit installer.

 

It's a shame they don't install 64-bit by default these days.

QUOTE/TAG ME WHEN REPLYING

Spend As Much Time Writing Your Question As You Want Me To Spend Responding To It.

If I'm wrong, please point it out. I'm always learning & I won't bite.

 

Laptop:

Lenovo Yoga 7 Air: Ryzen 7840S, 32GiB DDR5

 

Desktop (Old but I never replaced it):

Delidded Core i7 4770K - GTX 1070 ROG Strix - 16GB DDR3 @2000Mhz

Link to post
Share on other sites

19 minutes ago, RadiatingLight said:

what @elpiop said is right. Uninstall any current versions of java, then go here: https://www.java.com/en/download/manual.jsp and click the windows 64-bit installer.

 

It's a shame they don't install 64-bit by default these days.

Thank you, so I tried installing it and guess what, BSOD, first one was a system service exception, then I got 2 memory management ones 🙄🙄 running diagnostic tool now and it says it has detected hardware problems, brand new ram that I bought today

Gaming PC Specs:

Motherboard: Gigabyte AORUS B450M Elite

CPU: AMD Ryzen 5 2400G

GPU: Gigabyte GeForce RTX 2080

RAM: Corasir Vengeance RGB pro 2x 8GB 3200MHZ

PSU: Corsair CX550M

Case: Deepcool matrexx 55

Link to post
Share on other sites

1 hour ago, Jordancj said:

Thank you, so I tried installing it and guess what, BSOD, first one was a system service exception, then I got 2 memory management ones 🙄🙄 running diagnostic tool now and it says it has detected hardware problems, brand new ram that I bought today

Very likely not the RAM if it was caused by a software install.

Memtest86 on a bootable USB is the best way to test for memory issues.

QUOTE/TAG ME WHEN REPLYING

Spend As Much Time Writing Your Question As You Want Me To Spend Responding To It.

If I'm wrong, please point it out. I'm always learning & I won't bite.

 

Laptop:

Lenovo Yoga 7 Air: Ryzen 7840S, 32GiB DDR5

 

Desktop (Old but I never replaced it):

Delidded Core i7 4770K - GTX 1070 ROG Strix - 16GB DDR3 @2000Mhz

Link to post
Share on other sites

11 hours ago, Jordancj said:

BSOD, first one was a system service exception, then I got 2 memory management ones

Boot into safe mode with networking to do the 64 bit Java installation.

Under what circumstances did the BSODs occur? Like, what specifically were you doing when they happened?

ENCRYPTION IS NOT A CRIME

Link to post
Share on other sites

  • 4 weeks later...
On 4/24/2020 at 12:42 AM, straight_stewie said:

Boot into safe mode with networking to do the 64 bit Java installation.

Under what circumstances did the BSODs occur? Like, what specifically were you doing when they happened?

I realized that is was my timings that were off because when I run it without XMP it doesn't do it so I guess this new ram doesn't like the timings thanks anyway 

Gaming PC Specs:

Motherboard: Gigabyte AORUS B450M Elite

CPU: AMD Ryzen 5 2400G

GPU: Gigabyte GeForce RTX 2080

RAM: Corasir Vengeance RGB pro 2x 8GB 3200MHZ

PSU: Corsair CX550M

Case: Deepcool matrexx 55

Link to post
Share on other sites

On 4/23/2020 at 6:53 AM, RadiatingLight said:

Memtest86 on a bootable USB is the best way to test for memory issues.

It's not, I've seen memtest86 give known faulty memory a pass many, many times.

Use Memtest for windows: https://hcidesign.com/memtest/

While no software memory testing utility is perfect, it detects way more issues then memtest86.

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×