|
| 1 | + |
| 2 | +================== |
| 3 | +Configuring Presto |
| 4 | +================== |
| 5 | + |
| 6 | +Presto has many configuration parameters that can be modified to |
| 7 | +tweak performance or add/remove features. While Presto should work decently well out-of-the-box, |
| 8 | +you still may need to make some changes. |
| 9 | + |
| 10 | +For example, it is often necessary to change the default memory configuration |
| 11 | +based on your cluster's capacity. The default max memory for each Presto server is 16GB, but in |
| 12 | +an environment with less than 16GB available per node, you will have to adjust the settings |
| 13 | +to be lower. Similarly, if you have a lot of memory (say, 120GB/node), you may want to allocate more |
| 14 | +memory to Presto for better performance. |
| 15 | + |
| 16 | +In the second case, in order to update the max memory value to 60GB per node, |
| 17 | +change the line in ``/etc/opt/prestoadmin/coordinator/jvm.config`` and |
| 18 | +``/etc/opt/prestoadmin/workers/jvm.config`` that says ``-Xmx16G`` to ``-Xmx60G``. |
| 19 | + |
| 20 | +In addition, change the following lines in ``/etc/opt/prestoadmin/coordinator/config.properties`` |
| 21 | +and ``/etc/opt/prestoadmin/workers/config.properties``: :: |
| 22 | + |
| 23 | + query.max-memory-per-node=8GB |
| 24 | + query.max-memory=50GB |
| 25 | + |
| 26 | + |
| 27 | +to :: |
| 28 | + |
| 29 | + query.max-memory-per-node=30GB |
| 30 | + query.max-memory=<30GB * number of nodes> |
| 31 | + |
| 32 | + |
| 33 | +We recommend setting ``query.max-memory-per-node`` to half of the JVM config max memory, though if your workload is highly concurrent, you may want |
| 34 | +to use a lower value for ``query.max-memory-per-node``. |
| 35 | + |
| 36 | +To deploy this configuration change to the cluster, run the following command: :: |
| 37 | + |
| 38 | + sudo ./presto-admin configuration deploy |
| 39 | + |
| 40 | + |
| 41 | +Then, restart the Presto servers so that the changes get picked up: :: |
| 42 | + |
| 43 | + sudo ./presto-admin server restart |
| 44 | + |
| 45 | + |
| 46 | +For detailed documentation on ``configuration deploy``, see :ref:`configuration-deploy-label`. |
| 47 | +For more configuration parameters, see the Presto documentation. |
0 commit comments