Validate you changed the max in the gameserver startup script.
If you only have 8 gb to play with, you probably need to adjust down your memory and expect lag as it truly needs 12gb ram.
Default Max =
"-Xmx12g"'
Snippet from gameserver.sh shell script:
# Add default JVM options here. You can also use JAVA_OPTS and GAMESERVER_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-DLog4jContextSelector=org.apache.logging.log4j.core.async.AsyncLoggerContextSelector" "-server" "-Xms4g" "-Xmx12g"'
12 gb Ram is merely server / 1 client (considered your dev environment), nothing more.