Hive Performance Tuning
Also available as:

Hive, Tez, and YARN Settings in Ambari 2.1 and HDP 2.3

HiveServer2 and Tez settings can also be set from the Hive configuration page in Ambari.

Hive and Tez

Hive configuration in the Interactive Query pane of the Hive configuration page in Ambari enables choosing a set of default queues for the interactive queries. This pane also enables you to initialize Tez sessions per session and choose sessions per queue:

Figure 2.9. Interactive Query Pane of Hive Configuration Page in Ambari

Under Optimization on the Hive configuration page, you can select holding containers and choose the number of containers to hold:

Figure 2.10. Optimization Pane of Hive Configuration Page in Ambari

YARN Single Queue with Fair Scheduling

The concept of "fair scheduling" policy in YARN is introduced in HDP 2.3. Fair scheduling enables all sessions running within a queue to get equal resources. For example, if there is a query running already in a queue and taking up all of the resources, when the second session with a query is introduced, the sessions eventually end up with equal numbers of resources per session. Initially, there is a delay, but if ten queries are run concurrently most of the time, the resources are divided equally among them.

Fair scheduling is specified by setting Ordering policy to fair in the Capacity Scheduler View in Ambari, shown in the following figure. This is supported in HDP 2.3 and later. To manually set this in the capacity-scheduler.xml file, see the YARN Resource Management Guide.

Figure 2.11. Ordering Policy Setting in Ambari