Presto cluster + how to tune the jvm.config according to memory resources

jessica :

we are using presto cluster as distributed SQL query

our cluster size

1 machine as coordinator machine

12 presto workers machines

each machine is 64G memory size , and on each machine only presto application installed

about the jvm.config on the workers , look like this

-server
-Xmn10G
-Xmx50G
-XX:+UseG1GC
-XX:+ExplicitGCInvokesConcurrent
-XX:+CMSClassUnloadingEnabled
-XX:+AggressiveOpts
-XX:+HeapDumpOnOutOfMemoryError

and the jvm.config on the presto coordinator , like like this

-server
-Xmn4096M
-Xmx30G
-XX:ReservedCodeCacheSize=600M
-XX:MaxHeapFreeRatio=30
-XX:MinHeapFreeRatio=10
-XX:+UseG1GC

we set the Xmn and Xmx values as above , but this setting is only estimation

can we get help how to tune the Xmn and Xmx according to MAX memory - 64G so presto cluster performance will tune to the best practice sizing

Piotr Findeisen :

Usually, there is no reason to set -Xmn (size of young gen), because the JVM will tune this size at run-time. Or, in other words, you have to have good reasons to set -Xmn.

-Xmx -- you basically want to tell the JVM it can use all of the memory, but at the same time need to account for non-heap memory in JVM (certain buffers, GC data structures, etc.) and memory occupied by OS-level services. In Presto case, as a rule of thumb you typically set -Xmx to 80% of available memory and tune it later, based on your monitoring of your workloads.

Regarding other properties you set:

  • -XX:+CMSClassUnloadingEnabled is redundant (CMS garbage colelctor is not used, G1 is, as per -XX:+UseG1GC flag)
  • -XX:+AggressiveOpts is unlikely something you want to set
  • -XX:MinHeapFreeRatio, -XX:MaxHeapFreeRatio -- if Presto is the only service on the box, you don't want to set these
  • you're missing some recommended properties (and we recommend each of them for a reason). See https://prestosql.io/docs/current/installation/deployment.html#jvm-config

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=124739&siteId=1