[MC] Server not using enough RAM

Discussion in 'Bukkit Help' started by VitalViper, Oct 19, 2011.

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

    VitalViper

    So, here is my problem
    The server allocates plenty of RAM, problem is it wont use it.
    I have set -Xms to 1G but it just sits at 500MB of RAM usage with 5 players in it.
    I run about 20-25 plugins.
    Reason i want it to use more RAM is because I am using worldedit and voxelsniper on my server and more RAM causes less lag when used for players.

    This is my startup.bat : -server -Xms1G -Xmx4G -XX:parallelGCThreads=4 -XX:+UseConcMarkSweepGC -XX:MaxGCPauseMillis=50

    Thanks in advance, If I have posted this in the wrong place, my apologies.

    -Vital
     
  2. Offline

    Rwembee

    It shouldn't use it until it needs it. Are you basing this usage off of an ingame command like lagmeter, or external taskmanager/top? Have you been crashing with out of memory errors?
     
  3. Offline

    ImminentFate

    @VitalViper can you please post your entire bat file?
     
  4. Offline

    VitalViper

    I am basing this off taskmanager. Java only uses about 300-500mb max.
    Sure.
    Code:
    @ECHO OFF
    
    title CraftBukkit Server JRE7
    
    Color 17
    
    java -version
    timeout/nobreak 3 >NUL
    cls
     
    echo Optimizing PC... PLease wait
    timeout/nobreak 1 >NUL
    echo Removing Temporary Files...
    rmdir "%TEMP%" /s /q >NUL
    rd "%WINDIR%\Temp" /s /q >NUL
    timeout/nobreak 1 >NUL
    echo Complete!
    timeout/nobreak 1 >NUL
    echo Prioritizing Java.exe...
    cmd /c start /AboveNormal Java.exe >NUL
    timeout/nobreak 4 >NUL
    echo Complete!
    timeout/nobreak 1 >NUL
    echo Optimization Completed Sucessfully!
    timeout/nobreak 3 >NUL
    cls
    timeout/nobreak 1 >NUL
    IF /I "%PROCESSOR_ARCHITECTURE:~-2%"=="64" java -server -Xms1G -Xmx4g -XX:ParallelGCThreads=4 -XX:+UseConcMarkSweepGC -XX:MaxGCPauseMillis=50 -jar "%~dp0craftbukkit.jar" nogui
    PAUSE
     
  5. Offline

    mrvertigo27

    mmm switch -Xms1G for -Xginc and your ram usage will scale as needed both up and down BTW ram is not the only thing that can reduce lag so try not to spend too much time stressing over this.
     
  6. Offline

    VitalViper

    Yea In have thought about that, however when I use -Xincgc it just keeps on adding RAM till it eventually hits the max of 4GB
     
  7. Offline

    mrvertigo27

    mmm maybe try using something to help manage resourced like nolagg and logsaver and keep your config as is. this will help you focus on more serverside optimizations while you get your start.bat file worked out. (careful with chunk persistence though)
     
  8. Offline

    Rwembee

    -Xincgc shouldn't do that, its the incremental, meaning it will actually try to clear it periodically after a set time without regard to fullness.
    Are you still invoking parnewgc with that? I think you can only have one run.
     
  9. Offline

    ImminentFate

    Try replacing everything with this: (note i removed the optimization stuff. It was crap anyway)
    PHP:
    @ECHO OFF
    title CraftBukkit Server
    Color 17
    IF /"%PROCESSOR_ARCHITECTURE:~-2%"=="64" java -server -Xmn512M -Xms2G -Xmx4G -XX:ParallelGCThreads=-XX:+UseConcMarkSweepGC -XX:MaxGCPauseMillis=30 -jar "%~dp0craftbukkit.jar" nogui
    PAUSE
    You don't need so many threads for garbage collection. I changed it to 2
    I added 512Mb for the "New Generation" can help in some cases
    Increased you minimum RAM usage to 2Gigs
    Decreased the pause in garbage collection, a smaller pause takes less time.
    if you have java 64bit, try adding a "-d64" tag in there right after "-server"
     
  10. Offline

    VitalViper

    I do have 64 bit java but adding the -d64 tag gives me an error stating that its an unknown function.
    The xmn seems to have brought up my RAM usage at start, so i guess that is good.
    Edit: its at 1.3GB with 1 person in it atm lol
     
  11. Offline

    ImminentFate

    Ok, try removing some plugins and see again. Ones like worldeditand voxelbox use up heaps of RAM
     
Thread Status:
Not open for further replies.

Share This Page