Bukkit wont let me host with more than 1.5GB even though my Computer has 8GB ram?

Discussion in 'Bukkit Help' started by Po1ntBlank, Jul 11, 2011.

Thread Status:
Not open for further replies.
  1. Offline

    Po1ntBlank

    Hi, so my Desktop had 4 GB Ram, and I could only host with a gigabyte. Recently, I upgraded my RAM to 8GB (says so in My computer -> Properties) But if I host with anything more than 1.5 GB It says I dont have enough ram! Something about a Virtual Heap! I Know I cant host with the whole 8GB, but I should at least be able to use 3-4GB, right? THanks :)

    (Btw if you want to check out the server Google Felthedonia Revolution)

    If you need ANY other info, just ask :D

    BY THE WAY... This is my run.bat
    @Echo OFF
    SET BINDIR=%~dp0
    CD /D "%BINDIR%"
    "C:\Program Files (x86)\Java\jre6\bin\java.exe" -Xincgc -Xms1024m -Xmx1536m -jar craftbukkit.jar
    PAUSE


    (1024 and 1536 MAY be backwards... I changed em both to 2048, and that didnt work :(


    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 17, 2016
  2. Offline

    ionbasa

    You need to have the 64 bit version of java installed:
    http://jdk7.java.net/download.html
    I linked to the java 7 version as it adds much needed performance increase. Also do you have a multiprocessor system? your run.bat can be made to run multiple threads.
     
  3. Offline

    Po1ntBlank

    Ok.. I have dual core if that is your question? I know alot about this stuff, but not everythign XD

    I installed the 64-bit Java, with the link you gave me, but I still get this error

    Code:
    Error occurred during initialization of VM
    Could not reserve enough space for object heap
    Could not create the Java virtual machine.
    Press any key to continue . . .
    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 17, 2016
  4. Offline

    ionbasa

    okay, just wondering if it was Intel, as they have hyper threading, so you could use four java threads. And depending on what sse support you have you can increase performance in java dramatically. Just install the 64 bit version of Java 7 and switch your run.bat file to the following:
    Code:
    @ECHO OFF
    SET BINDIR=%~dp0
    CD /D "%BINDIR%"
    "%ProgramFiles%\Java\jre7\bin\java.exe" -Xmx4096M -XX:ParallelGCThreads=4 -Xincgc -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:+CMSIncrementalPacing -XX:+AggressiveOpts -XX:+CMSParallelRemarkEnabled -XX:+DisableExplicitGC -XX:MaxGCPauseMillis=500 -XX:SurvivorRatio=16 -XX:TargetSurvivorRatio=90 -XX:+UseAdaptiveGCBoundary -XX:-UseGCOverheadLimit -Xnoclassgc -XX:UseSSE=3 -XX:PermSize=128m -XX:LargePageSizeInBytes=4m -jar craftbukkit-0.0.1-SNAPSHOT.jar nogui
    PAUSE
     
  5. Offline

    Po1ntBlank

    THANKS!!! YOU ARE MY NEW HERO :DDDD WORKS BEATUIFULLY ILY
     
  6. Offline

    ionbasa

    Your welcome.
     
  7. Offline

    Po1ntBlank

    So.. just for Sh*Ts and giggles, I changed the 4096 to 20000 and it worked... but doesnt seem faster lol. How can I use more RAM if I want to in the future?
     
  8. Offline

    ionbasa

    What you edited was the Maximum allowed value, aka: "-Xmx4096M" if you wanted 6 gigs which it think would be decent just change that flag to : "-Xmx6144M"
     
  9. Offline

    Po1ntBlank

    I did, and it didnt seem to make much of a difference, But I guess its not just RAM I think it probably has to do with other things too. Thanks though :)

    But what I am curious about, is... The server ran when I made Xmx like 8000 or 9000, even though I dont have that much RAM?
     
  10. Offline

    ionbasa

    Well because you did not really use that much you wold probably hit the wall at where you physical RAM is.
     
Thread Status:
Not open for further replies.

Share This Page