Server Optimization Startup Script

Discussion in 'Bukkit Help' started by ThePlayingNoob, Apr 30, 2013.

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

    ThePlayingNoob

    Hello, i want i big Optimization for my server startup script, i have about 30 players on everyday and 3GB ram which is enought for now.
    this is the code im using:

    Code:
    Echo OFF
    SET BINDIR=%~dp0
    CD /D "%BINDIR%"
    "%ProgramFiles%\Java\jre7\bin\java.exe" -d64 -server -Xms1g -Xmx4g -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:+CMSIncrementalPacing -XX:ParallelGCThreads=2 -XX:+AggressiveOpts -XX:PermSize=128m -XX:MaxPermSize=256m -jar "%~dp0craftbukkit.jar"
    PAUSE
    Should i add something to the code or remove? im running on craftbukkit 1.5.1 Beta2.

    My Question is: does anyone know where the ram code is located in the startup script im using? The server say i have 2GB of ram, later when i added 5 new plugins the server said im using 4GB of ram which is very weird.

    EDIT: im keep getting error at start: ''Java HotSpot(TM) 64-Bit Server UM warning: disabling UseAdaptiveSizePolicy; it is incompatible with UseConcMarkSweepGC.''
    But the server is still starting. Fixed
     
  2. Offline

    mbaxter ʇıʞʞnq ɐ sɐɥ ı

    Do you even know what any of those mean?

    Aside from setting a max heap size, unless you know what it means you shouldn't be using it.
     
  3. Offline

    TheOnlyRealTGS

    I am curious, any1 can tell me some magic things to put into the startup script?
    I only have min ram, max ram, and the "start"
     
  4. Offline

    ThePlayingNoob

    I know what some of they does but i cant find a tutorial which explain what all of these are for
     
  5. Offline

    mbaxter ʇıʞʞnq ɐ sɐɥ ı

    My point is, without knowing exactly how it works you shouldn't just be throwing things at your startup script.

    Let's start with this:
    Code:
    "%ProgramFiles%\Java\jre7\bin\java.exe" -Xmx3072M -Xms1024M -jar craftbukkit.jar
    Start with a smaller heap, maximum 3GB, run craftbukkit.jar. Done.
     
  6. Offline

    ThePlayingNoob

    I have been using that code for long time but now i want better performance when im starting the server and the main problem right now is that I dont know how to edit ram amount in this code im using
    I have 2GB of ram but i dont know how to edit that.
     
  7. Offline

    mbaxter ʇıʞʞnq ɐ sɐɥ ı

    ThePlayingNoob Throwing java parameters at a problem isn't going to magically bring about performance improvements.

    -Xmx is the max heap, -Xms is the initial heap. Set the initial to probably 512M or so, and the max at a bit under 2GB if that's your limit, so maybe 1792M

    java -Xms512M -Xmx1792M -jar craftbukkit.jar
     
    angeplay likes this.
  8. Offline

    ThePlayingNoob

    Yes but my question is how i can edit the ram in startup script, i added some more codes and the map rendering is just awesome. Im not going to use the default which bukkit recommend because its MUCH slower i mean it, everyone noticed the changes since i started using the new code but i still need know how i can change amount of ram with that code.
     
  9. Offline

    mbaxter ʇıʞʞnq ɐ sɐɥ ı

    I pointed out what the values are that affect RAM.

    Meanwhile, your parameters are conflicting with each other.
     
  10. Offline

    ThePlayingNoob

    But the problem is that i dont have -Xms or -Xmx in the code and it still have 2GB ram from nowhere
     
  11. Offline

    mbaxter ʇıʞʞnq ɐ sɐɥ ı

    I don't think you're understanding what I'm writing. I'll quote myself.

    You need to learn what the parameters mean before adding any of them back. Start with what I gave you.
     
  12. Offline

    ThePlayingNoob

    Yes i understand what you mean, but i was using that code for long time and now its time for a faster code and i wont learn anything if nobody want help me.
     
  13. Offline

    Onyblia

    ThePlayingNoob, You need to listen to what he is saying. He's written out a script for you, which has been quoted throughout his posts. Don't try to edit your own script if you don't know what you are doing, what it all means or how to go about it.

    He's provided a stable and reliable script for you already. Just use that for now and study properly into what you are doing.
     
  14. Offline

    ThePlayingNoob

    No his not i was using almost the same script as he gav me for long time and now im searching for a new startup script to get better performance and the script he gav me can be found on bukkit's wiki
    java -Xms512M -Xmx1792M -jar craftbukkit.jar
     
  15. Offline

    gamalamin1

    What do you mean a script to get better performance?
    Just make those numbers in -Xms and -Xmx higher.
    Xms is the minimum ram.
    Xmx is the maximum ram.
    Dedicate RAM to your server for better performance.
     
  16. Offline

    ThePlayingNoob

    Yes its easier way, im searching for a advanced startup script. But im wondering how to change server ram with the code im using right now.
     
  17. Offline

    Necrodoom

    java parameters arent black magic that effect resource usage. java can manage itself good enough.
    if you refuse to any help offered by anyone, then you shouldnt ask for help.
     
  18. Offline

    ThePlayingNoob

    What do you mean? No one helped me i found this code self.
     
  19. Offline

    MikeA

    As everyone has said, startup params in your code won't make your server magically perform better. Either get better hardware (dedicated/vps) or check your plugins/world.
     
  20. Offline

    ThePlayingNoob

    Your wrong when saying that, yes getting better hardware will remove some lag. Adding java arguments to the code may make the server faster if you know what your adding to the script and right now nobody is willing to answer my main question.
     
  21. Offline

    Necrodoom

    and, obviously, you dont know what you are doing, and just adding random stuff to it, proof supplied by yourself, "Java HotSpot(TM) 64-Bit Server UM warning: disabling UseAdaptiveSizePolicy; it is incompatible with UseConcMarkSweepGC.''
    how about you actually listen to what we say. if you dont want help, then dont post.
     
  22. Offline

    ThePlayingNoob

    I semi know what im doing and no im not adding totaly random stuff which i did in beginning. I fixed that error already but my question is how i can assign more ram to that code and i dont want examples of easier codes.
     
  23. Offline

    MikeA

    Change the -Xms and -Xmx values.
     
  24. Offline

    gamalamin1

    Listen, adding more code will NOT MAKE YOUR SERVER HAVE BETTER PERFORMANCE!
    There is no such magic, if there was, I would use it.
     
  25. Offline

    ShadowDog007

    gamalamin1

    The placebo effect is a wonderful thing.
    He believes it makes a difference, so it does.

    ThePlayingNoob

    Did you tell your players you changed your script before they told you how much better it was running?
     
  26. Offline

    ThePlayingNoob

    Of course i told them im running on a new script and therefore i want know if there is bugs or if something changed.

    Its true, adding random codes to make the startup script doesnt make the server faster but server performance may change if you know which java arguments you are adding. I semi know what all of codes does, im new to java and im still learning.

    In which code should i change Xms and Xmx? In the code mbaxter gav me or in mine? in My code there is no -Xms and -Xmx.

    EDIT: i added -Xms and -Xmx.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 1, 2016
  27. Offline

    ShadowDog007

    Then its probably just placebo.

    When players experience lag, they will notice it. If they don't they will just play as normal. Telling them that it should run faster will likely cause them to pay more attention to how often it runs smoothly.

    Java is quite capable of determining its own values for settings. There is very little reason to change any starting arguments other than -Xmx and -Xms
     
  28. Offline

    ThePlayingNoob

    -Xmx is server ram, adding java arguments will make the server a bit faster. And right now im searching after java arguments to the code to make it faster and not allocating more ram.
     
  29. Offline

    Bobcat00

    Or, more likely, make the server a lot slower!
     
  30. Offline

    ThePlayingNoob

    Yes if you paste wrong java arguments.
     
Thread Status:
Not open for further replies.

Share This Page