---
title: 碎片整理配置
description: "GlobalCache提供读缓存磁盘空间碎片整理功能，可以提升部分场景的读缓存命中率，建议在需要提升读缓存命中率时开启。开启方法如下："
url: https://www.hikunpeng.com/document/detail/zh/kunpengboostkithistory/2200SPC5/sds/kunpengglobalcache_06_0123.html
sourcePath: /source/zh/kunpengboostkithistory/2200SPC5/sds/kunpengglobalcache_06_0123.html
indexId: 4aeaa67a5ee196c8980947a18657fc3f6aaaa9efdeb10025e1a78d555606768f78
---
# 碎片整理配置

GlobalCache提供读缓存磁盘空间碎片整理功能，可以提升部分场景的读缓存命中率，建议在需要提升读缓存命中率时开启。开启方法如下：

1. 修改/opt/gcache/node_config.xml中smart_cache_defragment_switch配置项，把0修改为1。
  <smart_cache_defragment_switch>1</smart_cache_defragment_switch>

2. 重启对应节点的GlobalCache服务。
  sudo systemctl restart globalcache.service
