Max Ram?

Discussion in 'Bukkit Help' started by LightKing, Feb 8, 2011.

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

    LightKing

    My problem is, when I run my server at
    Code:
    @echo off
    "%ProgramFiles(x86)%\Java\jre6\bin\java.exe" -Xms1024M -Xmx1024M -jar craftbukkit.jar
    pause
    The server works fine, but when I try to run it at

    Code:
    @echo off
    "%ProgramFiles(x86)%\Java\jre6\bin\java.exe" -Xms2048M -Xmx1048M -jar craftbukkit.jar
    pause
    It gives me 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...
    
    Computer Specs :

    Quad core 3.2Ghz
    Ram : 8 Gb
    Os : Windows 7 x64
    I have Java 6 installed

    So, what's the max # of ram I can add to server?
     
  2. Offline

    TnT

    With 32 bit java (which is what you are running, btw) you can only run 1.5 GB RAM.

    If you get x64 Java you can run a lot more.
     
  3. Offline

    LightKing

  4. Offline

    TnT

    Keep following the links, you're doing fine.
     
  5. Offline

    Phaedrus

    Use 64-bit version of Internet explorer and go to java.com and it will let you download 64-bit java

    Then use this torun your server:

    Code:
    @echo off
    "%ProgramFiles%\Java\jre6\bin\java.exe" -server -Xmn1024M -Xms2048M -Xmx4096M -XX:+UseConcMarkSweepGC -XX:+DisableExplicitGC -XX:+UseAdaptiveGCBoundary -XX:MaxGCPauseMillis=500 -XX:-UseGCOverheadLimit -XX:SurvivorRatio=16 -Xnoclassgc -XX:UseSSE=3 -XX:ParallelGCThreads=3 -jar craftbukkit.jar
    pause
    
    Hope this helps
     
    jdietz43 likes this.
  6. Offline

    LightKing

    @jasonUmm, why is that code to run the server one-damn-ass-panda-that-ate-chili-pepper real long? @TnT Oh and also, sorry but , I found this and I wonder If I could download the 2nd link of Windows 7 Java , Is that x64? ( The 15mb one)

    I don't wanna update internet explorer lawl =.=
     
  7. Offline

    Phaedrus

    If you have 64-bit windows you already have 64-bit internet explorer. just find the shortcut for it in the start menu.

    the line is long because it includes some garbage collection optimizations. That line is the Mojang Spec recommended way to start your server by the way.
     
  8. Offline

    mughi



    maybe i'm wrong about this, and i would have thought someone else would have noticed by now, but if Xms is the starting size, and Xmx is the MAXIMUM size, then wouldn't that automatically fail due to start being greater than max.. That's pretty much what it looks like it is doing anyhow.
     
  9. Offline

    TnT

    Better to just replace them with -Xincgc. All those other flags aren't worth it.

    Simply, the command you should run is this:
    Code:
    java -Xincgc -Xmx1024 -jar craftbukkit.jar nogui
    Change the 1024 to whatever RAM value you would like. You can also point "java" to the full path of the java executable ("%ProgramFiles%\Java\jre6\bin\java.exe") if you get an error "java command not found".

    Any other java flags you see are not going to aid you in getting your server setup fast and easy. Ignore them.
     
  10. Offline

    Phaedrus

    I'm just going from the post on Get Satisfaction about a server memory leak causing the server to crash after being up for a while. That command line is the recommended fix. I've been using it for a couple months now and my server runs regularily for 7 days straight at a time before a restart to upgrade.
     
  11. Offline

    LightKing

    Ok thank you jason, it works now. So how much ram do i have in my server now? I copied you code.
     
  12. Offline

    Phaedrus

    It will set aside between 2 and 4 gigs of ram for the minecraft server. That should be enough for minecraft and leave enough for the other things on your computer. I'm guessing that you probably aren't running a server for more than 20 people.
     
Thread Status:
Not open for further replies.

Share This Page