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?
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.
If you dont mind, could you post the link to download this? I'm not sure if this is the correct one ( http://www.java.com/en/download/faq/java_win64bit.xml )
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
@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 =.=
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.
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.
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.
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.
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.