关闭服务以释放系统内存
关闭服务以释放内存并提高性能。
| Redis 企业软件 |
|---|
Redis Enterprise Software 集群节点托管一系列支持集群进程的服务。 在大多数部署中,要么需要所有这些服务, 或者节点上有足够的内存资源来满足数据库要求。
在内存资源有限的部署中,可以从 API 端点禁用某些服务以释放系统内存,或使用rladmin命令。
在关闭服务之前,请确保您的部署不依赖于该服务。
关闭服务后,您可以以相同的方式重新启用。
您可以关闭的服务包括:
- RS 管理控制台 -
cm_server - CSV 格式的日志 -
stats_archiver - LDAP 身份验证 -
saslauthd - 发现服务-
mdns_server,pdns_server - 主动-主动数据库 -
crdb_coordinator,crdb_worker - 警报管理器 -
alert_mgr(为获得最佳效果,请仅在您有备用警报系统时禁用。
要使用rladmin cluster config命令中,使用servicesparameter 和服务名称,后跟disabled.
rladmin cluster config
[ services <service_name> <enabled | disabled> ]
To turn off a service with the API, use the PUT /v1/services_configuration endpoint
with the name of the service and the operating mode (enabled/disabled) in JSON format.
For example:
-
To turn off the Redis Enterprise Cluster Manager UI, use this PUT request:
PUT https://[host][:9443]/v1/cluster/services_configuration
'{
"cm_server":{
"operating_mode":"disabled"
}
}'
-
To turn off the CRDB services and enable the stats_archiver for cluster component statistics, use this PUT request:
PUT https://[host][:9443]/v1/cluster/services_configuration
'{
"crdb_coordinator":{
"operating_mode":"disabled"
},
"crdb_worker":{
"operating_mode":"disabled"
},
"stats_archiver":{
"operating_mode":"enabled"
}
}'