Assigning more RAM to a server GUIDE!

Discussion in 'Bukkit Help' started by InhumanSkills, Jan 21, 2011.

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

    Claryn

    I'm running McMyAdmin with Bukkit.
    I cannot assign more then 1524
    I got 64x bit
    I got 8 GB ram
     
  2. Offline

    sheape

    well my computer is a:

    Asus
    i7 prosser
    8 GB of ram
    nvida GT 530

    so i want to add more ram so i go in and put:
    @echo off
    "C:\Program Files\Java\jre6\bin\java.exe" -Xms4096M -Xmx4096M -jar craftbukkit-0.0.1-SNAPSHOT.jar
    pause

    And get an error:
    "Error occurred during initialization of VM
    Could not reserve enough space for object heap
    Could not create the Java virtual machine."

    Now why is that? help please thanks
     
  3. Offline

    GenBOOM

    Well I did those things and it didn't work.
    Turns out the world file was corrupted.
    Good thing it was a new world at least.
     
  4. Offline

    Steadyedy1

    i don't understand which one is the bat file...?
     
  5. Offline

    Banana937

    That means nothing. It's a stupid error. Google search BlockCantKeepUpSpam (it's Inactive, yet works with the most recent version of Craftbukkit).
     
  6. Offline

    harrybridgen

    i have internet exp bit 64, and java bit 64, 453 GB of memory on my computer,
    all good right? so i put @echo off
    "C:\Program Files\Java\jre6\bin\java.exe" -Xms1536M -Xmx1536M -jar craftbukkit-0.0.1-SNAPSHOT.jar
    pause
    just to test it, and it says:
    error loading: c:\program files\java\jre6\bin\msvcr71.dll
    error occurred curing intialization of VM
    java/lang/NoClassDefFoundError: java/lang/object
    press any key to continue....
    Any help?
     
  7. Offline

    InhumanSkills

  8. Offline

    InhumanSkills

    Sorry I have been pre occupied with school lately but i will be answering questions about how to launch your servers from now on. Once a day i will get on and check for questions. If i miss your question feel free to message me.
     
  9. Offline

    KaizenNeko

    REMINDER

    Using 32-bit Windows or 32-bit Java (on 64-bit Windows) you CANNOT use more than 1GB of RAM allocated to Minecraft.
     
  10. Offline

    InhumanSkills

    You buy it, make sure you computer has enough room for more ram, and that the ram you buy is compatible with the ram you already own and the socket it is placed in.

    If you still need help please be more specific about your problem.
    Why are you not able to assign more ram?
    Best guess i have is you do not have 64 bit java.
    Open up Internet Explorer x64 and go to Javas' website. From there download 64 bit and try again.

    If you still need help. The problem here is that you probably don't have 64 bit java installed.
    Download it from Javas website using 64 bit internet explorer.

    If you still have the problem press Ctrl+shift+esc go to performance and look at the memory usage.
    That should let you know how much available ram you have left in your system.

    If you still need help.

    The .bat file is a file you create yourself.
    First open up a .txt document, Notepad works fine.
    Then copy paste the code that i have supplied.
    When you go to save it it will tell you the file ending is .txt simply change that to .bat and then hit save.
    It will then turn it into a .bat file and the next time you double click the file it should open your server.

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

    The_Weaver

    Nice! My server is running quite faster now!
     
  12. Offline

    InhumanSkills

    Great! I'm glad I could help!
     
  13. Can I have some help for this? It dosnt show that to change the ram. Here is what it says:
    @ECHO OFF
    SET BINDIR=%~dp0
    CD /D "%BINDIR%"
    "%ProgramFiles%\Java\jre6\bin\java.exe" -Xincgc -Xmx2G -jar craftbukkit-0.0.1-SNAPSHOT.jar
    PAUSE
     
  14. Offline

    Perling

    What is now better?

    This :
    java -Xms6144M -Xmx6144M -jar craftbukkit-0.0.1-SNAPSHOT.jar

    This :
    java -Xincgc -Xmx6144M -jar craftbukkit-0.0.1-snapshot.jar

    hmm ?
     
  15. Offline

    InhumanSkills

    -Xincgc is not bad to use, it sets up incremental garbage collection but decreases overall gc by roughly 10%. You can use it if you want but for me it makes no difference.

    I'm not quite sure what you are asking but ill try to do my best. There are a lot of things you can write into the bat file to get java to do certain things. I'm not sure why you are asking it to change the directory but if you just did

    Code:
    @ECHO OFF
    
    "%ProgramFiles%\Java\jre6\bin\java.exe" -Xincgc -Xmx2G -jar craftbukkit-0.0.1-SNAPSHOT.jar
    
    PAUSE
    it should work fine.

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

    Perling

    ok thank you :)
     
  17. Offline

    Mr Olive

    I just updated my java to 64bit and now I can't even run the freaking server. It says "Can't find path" or whatever it says in english (I'm swedish so..)
    I've tried to understand the posts I've seen here but it doesn't make any sense to me at all. All this java mumble jumble is like trying to have a conversation with a 3 year old for me.
    I have 8GB ram and I want my server to run as smooth as possible


    All help greatly appreciated!

    Code:
    @ECHO OFF
    IF /I "%PROCESSOR_ARCHITECTURE:~-2%"=="64" "%ProgramFiles%\Java\jre6\bin\java.exe" -Xincgc -Xmx4096M -jar "%~dp0craftbukkit-0.0.1-snapshot.jar"
    IF /I "%PROCESSOR_ARCHITECTURE:~-2%"=="86"  java -Xincgc -Xmx1024M -jar "%~dp0craftbukkit-0.0.1-snapshot.jar"
    PAUSE
    
     
  18. Offline

    Simanova

    Your
    Is inappropriate for linux users without desktop environment. You should consider to provide a gui-less guide :)
     
  19. Offline

    Baummann

    Add "nogui" to your sh file
     
  20. I would like to update the ram with that but i dont know how to.
     
  21. Offline

    InhumanSkills

    I'm not completely sure what you mean by update the ram? If you would like to increase the amount of ram your minecraft server uses paste that into a notepad file and save the file as a .bat. You will then be able to launch the .bat file which in turn launches your server.
    Make sure you have the right amount of ram available and that your path to java is correct.

    I wish I could go more in depth with the linux guide but I don't really use Linux much. I pretty much learned all that in an hour or so. If i have some more time after my tests i might go have another look at it.
    I posted a link to a purely Linux guide if you want to use that.
    If you need further help refer to this forum
    http://forums.bukkit.org/threads/ho...kkit-craftbukkit-server-running-java-x64.598/

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 6, 2016
  22. I already have a .bat file starting my server. The code in it is @ECHO OFF
    SET BINDIR=%~dp0
    CD /D "%BINDIR%"
    "%ProgramFiles%\Java\jre6\bin\java.exe" -Xincgc -Xmx2G -jar craftbukkit-0.0.1-SNAPSHOT.jar
    PAUSE
    So I dot know how to upgrade the ram because it isnt the same as the code you put in the example.
     
  23. Offline

    InhumanSkills

    Try that.

    Obviously the path to your java file and the actual name of your craftbukkit might be different.
    I don't know why you would have an if statement to check the CPU type in your .txt?
    It might be pretty cool and all but if you know you have a 64 bit operating system why ask?

    Lycka till!

    Ohh ok well what you have there is more general for different computers. I make mine specific to my computer.
    The file essentially does the same thing.

    Try:
    @Echo OFF
    "C:\Program Files\Java\jre6\bin\java.exe" -Xincgc -Xmx2G -jar craftbukkit-0.0.1-SNAPSHOT.jar
    PAUSE

    Even this should work

    "%ProgramFiles%\Java\jre6\bin\java.exe" -Xincgc -Xmx2G -jar craftbukkit-0.0.1-SNAPSHOT.jar

    Just raise the numbers in red to whatever you would like the maximum ram set at. So here it's set at 2Gb

    I hope I answered your question.

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

    Mr Olive

    Yeah, I figured it out! I just had to change the "..\Java\jre6\bin\.." to "..\Java\jre7\bin\.." and it worked.
    The if statement was there to begin with, I don't know why either.

    Thank you for your kindness!
     
  25. Offline

    InhumanSkills

    No problem! Haha I'm not quite sure why you have jre7 though? That's still in beta and jre6 is still the recommended version. Odd haha.
     
  26. Offline

    ImminentFate

    just letting you know that you don't need the full directory of the java.exe file, you can just use "java" for example:
    PHP:
    @echo off
    java 
    -server -d64 -Xmn2048 -Xms4096M -Xmx8194M -jar "%~dp0craftbukkit-0.0.1-snapshot.jar"
    PAUSE
    adding the -server tag should also help give it a boost
     
  27. Offline

    InhumanSkills

    You can only use "java" if you have added the java path to your Environmental Variables.
    Also this will be iffy if you have both 32 bit and 64 bit java installed.

    Also this is a guide for beginners, sure you can add -server but that's more detail that needs to be added.

    If anyone want more info about -server or any other performance options simply type -help or -X into the .bat file to learn more.
     
  28. Offline

    ImminentFate

    I don't want to seem antagonistic, so I'll apologize first incase. But, when you have two versions of java installed like me, both (32bit j6 and 64bit j7)java defaults to the newest one you install. It also automatically adds it's own program name to the env. variables, because I've never done it manually.
     
  29. Offline

    InhumanSkills

    Some people have to install it manually for instance if they get a Beta version of JRE 7 or something.
    It's ok I'm not saying you're wrong I'm simply saying this is probably the best way to do it to ensure that it works properly.
     
  30. Offline

    ImminentFate

    true that
     
Thread Status:
Not open for further replies.

Share This Page