Apache Ambari Administration
Also available as:
PDF
loading table of contents...

Chapter 19. Tuning Ambari Performance

For clusters larger than 100 nodes, consider the following tuning options:

  • Increase available memory by adjusting heap size based on the number of cluster nodes.

    Steps

    1. On the Ambari Server host, edit the ambari-env.sh file:

      vi /var/lib/ambari-server/ambari-env.sh
    2. For the AMBARI_JVM_ARGS variable, replace the default -Xmx2048m with a value such as:

      -Xmx4GB -Xmn2GB

      based on the number of nodes in your cluster. Use the following recommendations as guidance:

      # Cluster Nodes

      Xmx value

      Xmn value

      100 - 400

      4 GB

      2 GB

      400 - 800

      4 GB

      2 GB

      800 - 1200

      8 GB

      2 GB

      1200 - 1600

      16 GB

      2.4 GB

  • Calculate the new, larger cache size, using the following relationship:

    ecCacheSizeValue=60*<cluster_size>

    where <cluster_size> is the number of nodes in the cluster.

  • On the Ambari Server host, in /etc/ambari-server/conf/ambari-properties, add the following property and value:

    server.ecCacheSize=<ecCacheSizeValue>

    where <ecCacheSizeValue> is the value calculated previously, based on the number of nodes in the cluster.

  • Add the following properties to adjust the JDBC connection pool settings:

    server.jdbc.connection-pool.acquisition-size=5

    server.jdbc.connection-pool.max-age=0

    server.jdbc.connection-pool.max-idle-time=14400

    server.jdbc.connection-pool.max-idle-time-excess=0

    server.jdbc.connection-pool.idle-test-interval=7200

  • If using MySQL as the Ambari database, in your MSQL configuration, increase the wait_timeout and interacitve_timeout to 8 hours (28800) and max. connections from 32 to 128.

    [Important]Important

    It is critical that the Ambari configuration for server.jdbc.connection-pool.max-idle-time and server.jdbc.connection-pool.idle-test-interval must be lower than the MySQL wait_timeout and interactive_timeout set on the MySQL side. If you choose to decrease these timeout values, adjust downserver.jdbc.connection-pool.max-idle-time and server.jdbc.connection-pool.idle-test-interval accordingly in the Ambari configuration so that they are less than wait_timeout and interactive_timeout.

After performing one or more of these options, restart Ambari server for the option(s) to take effect.

ambari-server restart

If you are using the Ambari Metrics service, you might want to consider switching from the default embedded mode to distributed mode, as well as other tuning options.

More Information

AMS Performance Tuning