使用MMAP提升缓存读取性能

This commit is contained in:
GoEdgeLab
2024-03-29 19:30:12 +08:00
parent dc5d828bc3
commit 9e9ec24bd2
5 changed files with 42 additions and 6 deletions

View File

@@ -70,6 +70,13 @@
<p class="comment">缓存磁盘保留的最小空余空间如果为0表示自动限制目前默认保留5GiB</p>
</td>
</tr>
<tr v-show="moreOptionsVisible && policyType == 'file' && teaIsPlus">
<td class="color-border">启用MMAP</td>
<td>
<checkbox name="enableMMAP" checked="checked"></checkbox>
<p class="comment">选中后表示允许系统自动利用MMAP提升缓存读取性能。</p>
</td>
</tr>
<tr>
<td class="color-border">缓存文件句柄缓存</td>
<td>

View File

@@ -46,6 +46,13 @@
<a :href="Tea.url('.update', {cachePolicyId:cachePolicy.id})"><span class="red">请设置一个内存容量作为缓冲区,以提升缓存写入性能。</span></a>
</td>
</tr>
<tr v-if="cachePolicy.options != null && teaIsPlus">
<td class="color-border">启用MMAP</td>
<td>
<span class="green" v-if="cachePolicy.options.enableMMAP || cachePolicy.options.enableMMAP == null">Y</span>
<span class="disabled" v-else>N</span>
</td>
</tr>
<tr v-if="cachePolicy.options.openFileCache != null && cachePolicy.options.openFileCache.isOn && cachePolicy.options.openFileCache.max > 0">
<td class="color-border">缓存文件句柄缓存</td>
<td>{{cachePolicy.options.openFileCache.max}}</td>

View File

@@ -77,6 +77,13 @@
<p class="comment">缓存磁盘保留的最小空余空间如果为0表示使用默认目前默认保留5GiB</p>
</td>
</tr>
<tr v-show="teaIsPlus">
<td class="color-border">启用MMAP</td>
<td>
<checkbox name="enableMMAP" v-model="cachePolicy.options.enableMMAP"></checkbox>
<p class="comment">选中后表示允许系统自动利用MMAP提升缓存读取性能。</p>
</td>
</tr>
<tr>
<td class="color-border">缓存文件句柄缓存</td>
<td>