Server RAM capping at 4,194,304KB, despite the limits being raised.

Discussion in 'Bukkit Help' started by Zombiemold, Oct 17, 2011.

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

    Zombiemold

    See Title.

    Basically, even if I set the server to use up to 8gigs, it still caps at 4,194,304KB no matter what...

    It runs that high, likely do to the sheer amount of mods that we run. That is ok because I don't plan on going over how many people we already have on the server but.. I would like to allocate more RAM to the server, up 8Gigs.

    Why is it capping out?
     
  2. Offline

    Acrobot

    It isn't "capped"
    Your java flag, Xmx tells java how much memory CAN it take. It reserves a smaller values first. Then, when it reaches the limit and the garbage collector can't handle it - it goes for more ram.

    From documents:
    "-Xmx - With this option you can change the maximum heap size the Java virtual machine can address on Java 1.4 systems. By default this is 64 MB. For large files this might not be enough. Use this option to encrease the heap size, e.g. -Xmx512m, which would encrase the heap size to 512 MB."
    And what is Java heap space, you might ask:
    http://wiki.answers.com/Q/What_is_Java_heap
     
  3. Offline

    Zombiemold

    This is my current BAT file.

    @echo off
    "%ProgramFiles%\Java\jre6\bin\java.exe" -Xmx30M -Xms30M -XX:MaxPermSize=40M -jar Minecraft_RKit.jar ************:************

    This is the bat for Remote Toolkit. The author of the plugin says that the lower memory values in this bat, are just for the server wrapper, and i need to set the memory in a specific properties file. I have done so, but I am seeing it not go over 4,194,304KB ever.

    I believe I am indeed, directing it to the 64bit Java (My machine is 64bit, with 8 Gigs of Ram)
     
  4. Offline

    Acrobot

    @Zombiemold
    Yep - you are directing it to the Java x64.
    However, this seems like it's just an issue with Minecraft Remote Toolkit - may I ask you to post the file where you set the memory on pastebin.com?
     
  5. Offline

    Zombiemold

  6. Offline

    ImminentFate

    @Zombiemold
    Okay there is a decent sized problem there. Your batch file is not going to use any more than about 3omegabytes of RAM, because of your Xmx tag. If you want it to work properly, try this:
    PHP:
    @ECHO OFF
    java 
    -Xmn1G -Xms4G -Xmx8G -jar "%~dp0Minecraft_RKit.jar"
    And you may want to consider these tags : -d64 (makes it run in Java x64 mode) and -server (makes it run as server)

    PHP:
    @ECHO OFF
    java 
    -d64 -server -Xmn1G -Xms4G -Xmx8G -jar "%~dp0Minecraft_RKit.jar"
     
    Rwembee likes this.
  7. Offline

    Zombiemold

    It goes up to 4g, just fine. Additionally the author of Remote toolkit says that the values in that batch file, don't reflect the actual values of the server, they are just for the wrapper.
     
  8. Offline

    drdanick

    Double check the output of java -version (Don't use the absolute path to the java binary). It will generally say whether it is a 64bit VM or not.
     
  9. Offline

    Rwembee

    If he doesn't provide a way to pass java options, that's pretty severe, and you should try it without the toolkit.

    I know that I can start the minecraft client by passing java opts to the minecraft.exe, I would not be surprised if the child processes inherit the options of the parent.
     
  10. Offline

    TnT

    @Zombiemold - What you need to post is your wrapper.properties file.

    Did you have any better luck with the changes I suggested yesterday on IRC?
     
  11. Offline

    Zombiemold

    How do I go about doing that?
    One thing I noticed for sure, after changing my values to waht you said, was that the server seemed to take a LOT LESS ram to run, even with 12+ people on. It sits happily at 1.6G-2G.

    I did notice however, that when a plugin went haywire, it still capped out at what I mentioned earlier.

    http://pastebin.com/wtS1U4SD This is the wrapper properties file.
     
  12. Offline

    drdanick

    They don't in this case. At a lower level, the process is forked (this actually results in the child briefly being a clone of the parent) and then made to execute a new Java VM with its own flags (this is a somewhat standard way of executing a child process under C (at least under Unix), and is how Java elects to do it (or so I have read)). The minecraft launcher, as far as I know, does not actually spawn a new child process, which is why the client proper retains flags that you give the launcher.

    Also, arguments can be set in the properties file, along with the option to override the invocation command completely.

    If you have access to a shell/console, you should just be able to enter that command directly. I actually suspect that the toolkit is launching the minecraft server with a completely different JVM to what you're launching the wrapper with (this can be fixed by overriding the JVM invocation command in wrapper.properties).
    Although, I was always under the impression that the maximum amount of memory the 32bit JVM could allocate was <4000M. I could be wrong, i've never personally encountered this problem.
     
  13. Offline

    Zombiemold

    I'm a smart guy, but I'm also completely new to all of this. Where exactly should I input the command " java -version"?
     
  14. Offline

    drdanick

    I should have been clearer, sorry. You can enter it into the command prompt (I assume you are using windows).
     
  15. Offline

    Zombiemold

    Microsoft Windows [Version 6.1.7601]
    Copyright (c) 2009 Microsoft Corporation. All rights reserved.

    C:\Users\Zombiemold>java -version
    java version "1.6.0_27"
    Java(TM) SE Runtime Environment (build 1.6.0_27-b07)
    Java HotSpot(TM) 64-Bit Server VM (build 20.2-b06, mixed mode)
     
  16. Offline

    drdanick

    This confirms that the both the wrapper and the server are being started with a 64bit VM. My next suggestion would be to try setting both the minimum and maximum heap sizes to the same value. The advantages of setting a lower minimum heap to the maximum have always been negligible, in my experience - considering that the VM will eventually end up with the maximum heap size allocated to it anyway (and there is always the overhead associated with dynamically allocating memory (though this is also somewhat negligible, as far as I know)).
     
  17. Offline

    Zombiemold

    For the longest time, I have had bot set at 8g.

    The server seemed to cap out the most when this setting was in place. Switching it to this new, low, high value seemed to help performance in a big way, from what I can tell.
     
  18. Offline

    drdanick

    Out of curiosity, how much physical RAM do you have installed in your computer?
     
  19. Offline

    Zombiemold

    8g,

    For while, I had them both set at 6g, pushed em to 8g when I thought I needed more performance
     
  20. Offline

    drdanick

    As a rule of thumb, you should not allocate within 1GB of your physical memory limit to a process, considering that the operating system and any other running processes all require some memory.
     
  21. Offline

    ImminentFate

    @Zombiemold try using java 7, it does have some performance increases
     
  22. Offline

    Zombiemold

    Alright, Iv'e got Java 7, and it still has the problem... I really don't know whats going on here...

    Still capping out, even when I use a custom made bat, that allocates all the possible ram it can get, and forces it to use java 7.
     
Thread Status:
Not open for further replies.

Share This Page