copy and paste these additional arguments into the “Additional Arguments” or “JVM Arguments” Section in the Launcher:
-XX:+UseG1GC -XX:MaxGCPauseMillis=10 -XX:ParallelGCThreads=4 -XX:ConcGCThreads=1 -XX:G1MixedGCCountTarget=185 -XX:G1HeapRegionSize=4M -XX:+UnlockExperimentalVMOptions -XX:G1OldCSetRegionThresholdPercent=1 -XX:G1ExpandByPercentOfAvailable=0 -XX:GCTimeRatio=2 -XX:InitiatingHeapOccupancyPercent=1 -XX:MinHeapFreeRatio=8 -XX:MaxHeapFreeRatio=18
Make Sure You change the -XX:ParallelGCThreads=4, to the number of cores you have(minus 1 or 2)