doc-exports/docs/css/umn/css_01_0130.html
Wuwan, Qi 050b395397 CSS UMN 23.2.1 20230926
Reviewed-by: Kacur, Michal <michal.kacur@t-systems.com>
Co-authored-by: Wuwan, Qi <wuwanqi1@noreply.gitea.eco.tsi-dev.otc-service.com>
Co-committed-by: Wuwan, Qi <wuwanqi1@noreply.gitea.eco.tsi-dev.otc-service.com>
2024-01-10 14:23:15 +00:00

20 lines
2.6 KiB
HTML

<a name="css_01_0130"></a><a name="css_01_0130"></a>
<h1 class="topictitle1">Managing the Vector Index Cache</h1>
<div id="body0000001200234616"><p id="css_01_0130__en-us_topic_0000001268154549_p9773716335">The vector retrieval engine is developed in C++ and uses off-heap memory. You can use the following APIs to manage the index cache.</p>
<ul id="css_01_0130__en-us_topic_0000001268154549_ul4779753312"><li id="css_01_0130__en-us_topic_0000001268154549_li6770717336"><strong id="css_01_0130__en-us_topic_0000001268154549_b1919783612367">View cache statistics.</strong><pre class="screen" id="css_01_0130__en-us_topic_0000001268154549_screen16934641315">GET /_vector/stats</pre>
<p id="css_01_0130__en-us_topic_0000001268154549_p1977210351817">In the implementation of the vector plug-in, the vector index is the same as other types of Lucene indexes. Each segment constructs and stores an index file. During query, the index file is loaded to the non-heap memory. The plug-in uses the cache mechanism to manage the non-heap memory. You can use this API to query the non-heap memory usage, number of cache hits, and number of loading times.</p>
</li><li id="css_01_0130__en-us_topic_0000001268154549_li295515542292"><strong id="css_01_0130__en-us_topic_0000001268154549_b136281519203916">Preload the vector index.</strong><pre class="screen" id="css_01_0130__en-us_topic_0000001268154549_screen3693164910305">PUT /_vector/warmup/{index_name}</pre>
<p id="css_01_0130__en-us_topic_0000001268154549_p28561843163016">You can use this API to preload the vector index specified by <strong id="css_01_0130__en-us_topic_0000001268154549_b612616506486">index_name</strong> to the off-heap memory for query.</p>
</li><li id="css_01_0130__en-us_topic_0000001268154549_li1477147103311"><strong id="css_01_0130__en-us_topic_0000001268154549_b12737115474510">Clear the cache.</strong><pre class="screen" id="css_01_0130__en-us_topic_0000001268154549_screen62573551112">PUT /_vector/clear/cache </pre>
<pre class="screen" id="css_01_0130__en-us_topic_0000001268154549_screen178541841152315">PUT /_vector/clear/cache/index_name</pre>
<p id="css_01_0130__en-us_topic_0000001268154549_p1170584816113">The caching mechanism limits the non-heap memory usage when vector indexes are used. When the total index size exceeds the cache size limit, index entry swap-in and swap-out occur, which affects the query performance. You can use this API to clear unnecessary index cache to ensure the query performance of hot data indexes.</p>
</li></ul>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="css_01_0117.html">Vector Retrieval</a></div>
</div>
</div>