Help Center/ MapReduce Service/ FAQs/ Performance Tuning/ How Do I Improve Presto Resource Usage?
Updated on 2025-03-17 GMT+08:00

How Do I Improve Presto Resource Usage?

Symptom

Presto tasks take too long to finish due to uneven node resource utilization.

Procedure

  1. Decrease the memory available for the YARN node.
    1. Log in to Manager, choose Cluster > Services > Presto > Instances. Check and record the host names of the nodes where all Presto instances are deployed.
    2. Choose Cluster > Services > Yarn > Instances, click the names of the NodeManger instances on the same node as the Presto instance, click Instance Configurations and All Configurations, and search for yarn.nodemanager.resource.memory-mb. Decrease the value of this parameter. Click Save.
    3. Go back to the Instances tab, select the instances whose configurations have been changed, and choose More > Instance Rolling Restart.
      • yarn.nodemanager.resource.memory-mb indicates the total physical memory that can be used by YARN on the node. When the workload is high, YARN and Presto contend for available memory. Set this parameter to a smaller value based on service requirements.
      • YARN tasks may behave abnormally during a rolling restart due to repeated attempts. Restart the service during off-peak hours.
  2. Increase the value of xmx for Presto Work.

    Log in to FusionInsight Manager, choose Cluster > Services > Presto > Configurations > All Configurations, search for the JAVA_OPTS parameter, and set the xmx value of it under Presto Work. Increase the value based on service requirements. Click Save and restart the Presto service.

    Restarting Presto will cause service unavailability. Restart Presto during off-peak hours.