Assigning more RAM to a server GUIDE!

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

  1. Offline

    Mr Olive

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    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!
  2. Offline

    InhumanSkills

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    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.
  3. Offline

    ImminentFate

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    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

    This post has been edited 1 time. It was last edited by ImminentFate Oct 3, 2011.
  4. Offline

    InhumanSkills

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    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.
  5. Offline

    ImminentFate

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    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.
  6. Offline

    InhumanSkills

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    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.
  7. Offline

    ImminentFate

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    true that
  8. Offline

    zipfe

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    What a silly, uninformed and completely superfluous statement.

    While running the actual server on a linux box, I use a Mac to test everything before it goes live on the real server. Simply do whatever you do on a Linux box. Never had any problems.
  9. Offline

    InhumanSkills

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    It's kind of an inside joke lol.
    Don't worry about it.
  10. Offline

    Raldo94

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Thanks, This fixed my server running on 1 GB now at 12 GB of 16GB :D +internetz
  11. Offline

    YES Minecraft

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    There is already so many guides on this.
  12. Offline

    InhumanSkills

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    This is one of the first.
  13. Offline

    mmmmmm419

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    im getting an error "could not access jarfile craftbukkit-0.0.1-SNAPSHOT" im running a 1.0 server btw
  14. Offline

    Grovert11

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    For 1.0.0 you have to change "craftbukkit-0.0.1-SNAPSHOT.jar"to "craftbukkit-1.0.0-SNAPSHOT.jar"!
  15. Offline

    mmmmmm419

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    thanks but instead i changed the craftbukkit file name to 123 and then i got more problems cause i had 32 bit java on 64 bit pc, but now i can allocate 7 gb of ram to my server
  16. Offline

    HourlyCookie

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    How can I run It at 6gigs of ram?
  17. Offline

    InhumanSkills

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Try something like this
    Code:
    @Echo off
    "C:\Program Files\Java\jre6\bin\java.exe" -Xms1024M -Xmx6144M -jar craftbukkit-1.0.0-SNAPSHOT.jar
    pause
  18. Offline

    blue_marble_ball

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    @ECHO OFF
    IF /I "%PROCESSOR_ARCHITECTURE:~-2%"=="64" "%ProgramFiles(x86)%\Java\jre6\bin\java.exe" -Xincgc -Xmx4096M -jar "%~dp0craftbukkit-0.0.1-snapshot.jar"
    IF /I "%PROCESSOR_ARCHITECTURE:~-2%"=="86" java -Xincgc -Xmx4096M -jar "%~dp0craftbukkit-0.0.1-snapshot.jar"
    PAUSE
    ---------------------------------------------------------------------------------------------------------------------------------
    Its saying "invalid maximum heap size: -Xmx4096M"
    I have a 8GB 64bit computor and this worked for my server before but when I reset my server this ste back to 1024 and I tried setting it back to 4 GB but it just isnt working.
  19. Offline

    InhumanSkills

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Go press Ctrl+Shift+Esc this will open up task manager. From there on go to Performance and see how much Physical Memory (MB) you have available. You might be running another ram intensive program that has taken it's share of allocated memory. Make sure the -Xmx4096M is not exceeding that. Also the incremental garbage collection might be cool and all but it's not necessary. You can try changing Xincgc just to Xms1024M.

    Also note that you CAN use 4G to mean 4GB.
  20. Offline

    blue_marble_ball

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    You can try changing Xincgc just to Xms1024M.? Dosent that mean that this server will go back down to 1 GB? Cause there are to xmx's on my notepad. Wich one do I change the XMX to change the RAM? "Sorry imma nub at this"
  21. Offline

    Tallcraft

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
  22. Offline

    micdoodle8

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Holy upload speed... *bow*

    That's the only reason why I pay for dedicated hosting, because my upload speed is 2Mb/s ....
  23. Offline

    bobmatino17

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    The instructions are great for someone who is using Ubuntu or Mint (very popular Debian-based Linux distributions) However, not all distributions install packages (in this case java) the same way. Other than that, it works fine for Debian based distros, but I would suggest putting a statement that it only works for certain distributions.
  24. Offline

    Bertware

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    You don't have to get internet explorer 64bit!
    https://www.java.com/en/download/manual.jsp
    Search your version in this list ;)
    Use -xincgc or -xms128M or similar. Don't you ever dare to use -XMS1024M or higher values. That's only causing more unnecessary memory use.
    64 bit computers that want to run 64 bit java: Use Program Files
    64 bit computers that want to run 32 bit java: Use Program Files (x86)
    32 bit computers that want to run 32 bit java: Use Program files
    Just to make shure everyone gets it right ;)

    Note: If you run a home server, your upload speed will probably be a bottleneck

    This post has been edited 1 time. It was last edited by Bertware Dec 26, 2011.
  25. Offline

    Paralith

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Thank you so much! I had a great server 9 months ago, but I forgot almost everything. Your guide is the only one that made sense! Thanks again.
  26. Offline

    iiSilentz

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    what is number for a 16GB RAM computer that is 64 bit? if there is one
  27. Offline

    Tallcraft

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Intervalls of 1024 mb ... :)

    This post has been edited 1 time. It was last edited by Tallcraft Dec 30, 2011.
  28. Offline

    freshlybaked123

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    I jumped through the hoops as well. Downloaded 64 bit internet explorer. Downloaded 64 bit Java with all the fixings. Got notepad++ and made a new .bat file and replaced the bukkit starter all together. I used the code that is in another thread. I changed the path in the starter to reflect my new install of java 7 , so in the path it now reads jre7. I also changed the path in my system to point towards the program files folder where jre7 is now stored.
    I also changed the snapshot.jar path as the one in the examples is a different build. mine is 1.0.1 . I run 8 gigs of ram on my computer so when I changed the Xmx and Xms I set the Xms to 1024M and the Xmx to 3072M so I could have 3 gigs on my server.
    I ran my new server.bat and it boots up just fine. However, I cannot see the changes that I have made. I have another custom .bat file for the single player and it works fine and I can actually see the memory allocation changes I have made my hitting f3 , the changes are visible in the upper right hand corner. This is not the case on my server. I hit f3 and I see the same information as when I started.
    Is that normal? shouldn't I see a change?
    I don't get any error messages when I run the server.bat. Like I said , it boots just fine.
  29. Offline

    Techcuron

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Code:
    Unrecognized option: -d64
    Could not create the Java virtual machine.
    Press any key to continue . . .
        
    
    ?
  30. Offline

    InhumanSkills

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    You probably don't have a 64bit operating system. If you are unsure go to
    Start<right click (computer)<properties
    Look for the System type. It should either say 64-bit or 32-bit Operating system.
    If you do have a 64bit system you also need to install 64bit java.
    Which you can find here.

    Good luck!

Share This Page