2

I am hosting via Strato V server a modded Minecraft server 1.12.2. I allocated about 8 to 10 GB to JVM but when I check with htop it says that only about 4.2 GB RAM are used for the whole system.

I thought there was a typo for the allocation but I verfied with -XshowSettings:all that 8 to 10 GB are allocated.

On the server is also Mystcraft installed and when exploring a new dimension or in general generating new chuncks, the server starts to have major lags and if not stopped the server crashes because a tick took longer than 60 seconds

Stats

  • Start Script (will be run in a screen)

    /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java -Xms8G -Xmx10G -XshowSettings:all -jar forge-1.12.2-14.23.5.2847-universal.jar nogui
    
  • OS: Ubuntu 18.04 LTS 64bit

  • CPU Cores: 6vCores

  • RAM: 12 GB

  • Java-V: openjdk-8-headless

  • Mods:

  • DynamicTrees (1.12.2-0.9.7)

  • IvToolkit (1.3.3-1.12)

  • NetherPortalFix (1.12.1-5.3.17)

  • SpartanWeaponry (1.12.2-beta-1.3.8)

  • RecurrentComplex (1.4.8.2)

  • VanillaFix (1.0.10-99)

  • RoguelikeDungeons (1.12.2-1.8.0)

  • EnderIO (1.12.2-5.1.55)

  • EnderCore (1.12.2-0.5.73)

  • mystcraft (1.12.2-0.13.7.04)

  • Server properties

spawn-protection=16
max-tick-time=60000
generator-settings=
force-gamemode=false
allow-nether=true
gamemode=0
broadcast-console-to-ops=true
enable-query=false
player-idle-timeout=0
difficulty=1
spawn-monsters=true
op-permission-level=4
pvp=true
snooper-enabled=true
level-type=DEFAULT
hardcore=false
enable-command-block=false
max-players=20
network-compression-threshold=256
resource-pack-sha1=
max-world-size=29999984
server-port=1744
server-ip=
spawn-npcs=true
allow-flight=false
level-name=world
view-distance=10
resource-pack=
spawn-animals=true
white-list=false
generate-structures=true
online-mode=false
max-build-height=256
level-seed=
prevent-proxy-connections=false
use-native-transport=true
enable-rcon=false
motd=Msg

Next approaches

I am not sure whether the lags a caused because of missing ram or missing cpu power

  • Setting the max tick time higher -> but I doubt that the lags are going to stop, probably stops only crashes
  • Hosting on a different machine

Questions

  • Could the cause be to low CPU power?
  • Or is it normal for Java to be under the min heap size?
  • Is there anywhere else a config file for the JVM heap size?
  • Should I downgrade to Java 7?
Giacomo1968
  • 58,727

1 Answers1

1

It is more likely a cpu issue :

  • Could the cause be to low cpu power? Yes it could, those are virtual core and you didn't mention the frequencies. To my knowledge, minecraft server is singlethreaded, which is maybe your bottleneck if you have a low frequency per vcore.

  • Or is it normal for Java to be under the min heap size? If you don't use the memory, it can be given back to the system until you need it.

  • Is there anywhere else a config file for the jvm heap size? Nop, your approach was the right one.

  • Should I downgrade to Java 7? No, you don't need to. Performance wise, you shouldn't notice it.

On https://minecraft.gamepedia.com/Server/Requirements it is said that "Minecraft servers, as of 1.14, can use multiple cores for some operations, so now they no longer sit idle, and increase server performance." Maybe upgrading your version will balance cpu usage.

Asperio
  • 66
  • 1
  • 7