# Xmx and Xms set the maximum and minimum RAM usage, respectively.
# They can take any number, followed by an M or a G.
# M means Megabyte, G means Gigabyte.
# For example, to set the maximum to 3GB: -Xmx3G
# To set the minimum to 2.5GB: -Xms2500M

# -XX:+UseZGC and -XX:+ZGenerational are here to force java to use its new garbage collector that more stable and efficient.

# The minimum that I recommend for my modpack is 4GB but 8GB will offers you the best.
-Xms6G -Xmx8G -XX:+UseZGC -XX:+ZGenerational