Ubuntu Start Script

Discussion in 'Systems Administration' started by Salman, May 8, 2017.

  1. Hey guys, i want the start.sh script for my spigot server on ubuntu. i searched all over here and didn't find.
    [EDIT: i heard people add java flags to increase performance, if its true please add it :)]
  2. The following is a fairly simple start script
    Code (Text):
    java -jar -Xms6G -Xmx6G spigot.jar
    The first line tells it what type of shell to use (optional), the second line tells it to start the Spigot server with exactly 6GB of RAM.

    Here is a more complex one, with the added java flags for performance, but will still start the Spigot server with 6GB of RAM:
    Code (Text):
    java -Xms6G -Xmx6G -XX:+UseG1GC -XX:+UnlockExperimentalVMOptions -XX:MaxGCPauseMillis=100 -XX:+DisableExplicitGC -XX:TargetSurvivorRatio=90 -XX:G1NewSizePercent=50 -XX:G1MaxNewSizePercent=80 -XX:InitiatingHeapOccupancyPercent=10 -XX:G1MixedGCLiveThresholdPercent=50 -XX:+AggressiveOpts -XX:+AlwaysPreTouch -Dusing.aikars.flags=mcflags.emc.gs -jar spigot.jar
    An explanation of all those flags can be found here