Caches in Vespa
Content node summary cache
The summary cache caches summary requests and is enabled by proton tuning configuration. When enabling a proton summary cache, one should also change the way proton reads summary data from mmap to directio as done below. The summary cache saves IO and cpu spent on decompressing of chunked blocks (default 64KB) of summary data. Note that the summary cache is shared across multiple document types. By default the cache is enabled, using up to 5% of available memory.
<content id="music" version="1.0"> <engine> <proton> <tuning> <searchnode> <summary> <io> <read>directio</read> </io> <store> <cache> <maxsize-percent>5</maxsize-percent><!--percentage of available memory on the content node--> </cache> </store> </summary> </searchnode> </tuning> </proton> </engine> .... </content>
Protocol phases caches
ranking.queryCache and groupingSessionCache described in the search api reference are only caching data in between phases for a given a query, hence other queries do not get any benefits, but these caches saves container - content node(s) round-trips for a given query.