Skip to content

Commit bd01f3d

Browse files
minhancaosteveburnett
authored andcommitted
Add documentation for cache configuration properties
dasdad
1 parent 1d58bca commit bd01f3d

File tree

1 file changed

+127
-16
lines changed

1 file changed

+127
-16
lines changed

presto-docs/src/main/sphinx/presto_cpp/properties.rst

+127-16
Original file line numberDiff line numberDiff line change
@@ -102,22 +102,6 @@ Worker Properties
102102

103103
The configuration properties of Presto C++ workers are described here, in alphabetical order.
104104

105-
``async-cache-persistence-interval``
106-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
107-
* **Type:** ``string``
108-
* **Default value:** ``0s``
109-
110-
The interval for persisting in-memory cache to SSD. Setting this config
111-
to a non-zero value will activate periodic cache persistence.
112-
113-
``async-data-cache-enabled``
114-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
115-
116-
* **Type:** ``boolean``
117-
* **Default value:** ``true``
118-
119-
In-memory cache.
120-
121105
``runtime-metrics-collection-enabled``
122106
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
123107
* **Type:** ``boolean``
@@ -304,6 +288,133 @@ The configuration properties of Presto C++ workers are described here, in alphab
304288

305289
See description for ``shared-arbitrator.memory-pool-min-free-capacity``
306290

291+
Cache Properties
292+
----------------
293+
294+
The configuration properties of AsyncDataCache and SSD cache are described here.
295+
296+
``async-cache-persistence-interval``
297+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
298+
* **Type:** ``string``
299+
* **Default value:** ``0s``
300+
301+
The interval for persisting in-memory cache to SSD. Set this
302+
to a non-zero value to activate periodic cache persistence.
303+
304+
``async-data-cache-enabled``
305+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
306+
307+
* **Type:** ``boolean``
308+
* **Default value:** ``true``
309+
310+
In-memory cache.
311+
312+
``async-cache-ssd-gb``
313+
^^^^^^^^^^^^^^^^^^^^^
314+
315+
* **Type:** ``integer``
316+
* **Default value:** ``0``
317+
318+
The size of the SSD. Unit is in GiB (gibibytes).
319+
320+
``async-cache-ssd-path``
321+
^^^^^^^^^^^^^^^^^^^^^^^^
322+
* **Type:** ``string``
323+
* **Default value:** ``/mnt/flash/async_cache.``
324+
325+
The path of the directory that is mounted onto the SSD.
326+
327+
``async-cache-max-ssd-write-ratio``
328+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
329+
* **Type:** ``double``
330+
* **Default value:** ``0.7``
331+
332+
The maximum ratio of the number of in-memory cache entries written to the SSD cache
333+
over the total number of cache entries. Use this to control SSD cache write rate,
334+
once the ratio exceeds this threshold then we stop writing to the SSD cache.
335+
336+
``async-cache-ssd-savable-ratio``
337+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
338+
* **Type:** ``double``
339+
* **Default value:** ``0.125``
340+
341+
The min ratio of SSD savable (in-memory) cache space over the total cache space.
342+
Once the ratio exceeds this limit, we start writing SSD savable cache entries
343+
into SSD cache.
344+
345+
``async-cache-min-ssd-savable-bytes``
346+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
347+
* **Type:** ``integer``
348+
* **Default value:** ``16777216``
349+
350+
Min SSD savable (in-memory) cache space to start writing SSD savable cache entries into SSD cache.
351+
352+
The default value ``16777216`` is 16 MB.
353+
354+
NOTE: we only write to SSD cache when both ``async-cache-max-ssd-write-ratio`` and
355+
``async-cache-ssd-savable-ratio`` conditions are satisfied.
356+
357+
``async-cache-persistence-interval``
358+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
359+
* **Type:** ``string``
360+
* **Default value:** ``0s``
361+
362+
The interval for persisting in-memory cache to SSD. Set this configuration to a non-zero value to
363+
activate periodic cache persistence.
364+
365+
The following time units are supported:
366+
367+
ns, us, ms, s, m, h, d
368+
369+
``async-cache-ssd-disable-file-cow``
370+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
371+
* **Type:** ``bool``
372+
* **Default value:** ``false``
373+
374+
In file systems such as btrfs that support cow (copy on write), the SSD cache can use all of the SSD
375+
space and stop working. To prevent that, use this option to disable cow for cache files.
376+
377+
``ssd-cache-checksum-enabled``
378+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
379+
* **Type:** ``bool``
380+
* **Default value:** ``false``
381+
382+
When enabled, a CRC-based checksum is calculated for each cache entry written to SSD.
383+
The checksum is stored in the next checkpoint file.
384+
385+
``ssd-cache-read-verification-enabled``
386+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
387+
* **Type:** ``bool``
388+
* **Default value:** ``false``
389+
390+
When enabled, the checksum is recalculated and verified against the stored value when
391+
cache data is loaded from the SSD.
392+
393+
``cache.velox.ttl-enabled``
394+
^^^^^^^^^^^^^^^^^^^^^^^^^^^
395+
* **Type:** ``bool``
396+
* **Default value:** ``false``
397+
398+
Enable TTL for AsyncDataCache and SSD cache.
399+
400+
``cache.velox.ttl-threshold``
401+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
402+
* **Type:** ``string``
403+
* **Default value:** ``2d``
404+
405+
TTL duration for AsyncDataCache and SSD cache entries.
406+
407+
The following time units are supported:
408+
409+
ns, us, ms, s, m, h, d
410+
411+
``cache.velox.ttl-check-interval``
412+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
413+
* **Type:** ``string``
414+
* **Default value:** ``1h``
415+
416+
The periodic duration to apply cache TTL and evict AsyncDataCache and SSD cache entries.
417+
307418
Memory Checker Properties
308419
-------------------------
309420

0 commit comments

Comments
 (0)