HiveServer2 performance tuning

This topic describes methods for collecting diagnostic data and enabling stack logs to tune or troubleshoot HiveServer2 performance issues.

Effective performance tuning and troubleshooting of HiveServer2 often requires gathering specific diagnostic information and enabling detailed logging. These methods help in identifying bottlenecks and understanding the runtime behavior of your HiveServer2 instance.

Collecting diagnostic information

To gather essential diagnostic data for HiveServer2, you can use the following methods:
  1. Use direct beeline commands for troubleshooting.
    • To inspect HiveServer2 host binding, run the following command: SET hive.server2.thrift.bind.host;
    • To set logging verbosity, use the following command: SET hive.server2.logging.operation.level=VERBOSE;
  2. Enable stack logs.
    Stack logs are highly useful for detailed performance troubleshooting.
    • For Hive:
      1. Go to Cloudera Manager > Hive > Configuration.
      2. Select the Stack logs collection enabled checkbox.
      3. Save the changes and restart the Hive service.
    • For Hive on Tez:
      1. Go to Cloudera Manager > Hive on Tez > Configuration.
      2. Select the Stack logs collection enabled checkbox.
      3. Save the changes and restart the Hive service.
  3. Collect runtime configurations.

    Collect a snapshot of runtime configurations on the HiveServer2 host by running the following command: beeline -e "SET -v;" >& set-v_$(date +%s).txt