我有一个 Redis 3.0.5 实例,随着时间的推移,它往往会显示 mem_fragmentation_ratio 的增长。
使用该实例的应用程序不断地创建和删除密钥。
一个月后,我的结果是 mem_fragmentation_ratio > 1.30。这会影响 Redis 在该服务器上的内存占用:
~$ redis-cli info memory
# Memory
used_memory:7711297480
used_memory_human:7.18G
used_memory_rss:10695098368
used_memory_peak:11301744128
used_memory_peak_human:10.53G
used_memory_lua:95232
mem_fragmentation_ratio:1.39
mem_allocator:jemalloc-3.6.0
Run Code Online (Sandbox Code Playgroud)
如果我重新启动 Redis 服务并从 AOF 重新加载,mem_fragmentation_ratio 会回到可接受的水平 (1.06):
~$ redis-cli info memory
# Memory
used_memory:7493466968
used_memory_human:6.98G
used_memory_rss:7924920320
used_memory_peak:8279112992
used_memory_peak_human:7.71G
used_memory_lua:91136
mem_fragmentation_ratio:1.06
mem_allocator:jemalloc-3.6.0
Run Code Online (Sandbox Code Playgroud)
回收 Redis 正在影响我们的应用程序(即使我们在从服务器重启后使用 Sentinel 故障转移来执行此操作)。
是否有另一种方法可以减少 mem_fragmentation_ratio,例如我可以安排非高峰期的“碎片整理”过程?
我需要授予进程(构建管道)对 AKS API 的 RBAC 访问权限以进行部署。但目标 AKS 群集已激活 AAD 集成(如此处所述)
我原本希望能够通过简单的服务主体访问 AKS API,但我被重定向到设备登录页面:
$ az login --service-principal --username [REDACTED]-XXXX-XXXX-XXXX-XXXXXXXXXXXX --password [REDACTED]XXxxXXxxXXxxxXXXxxXXxxXXxx= --tenant [REDACTED]-XXXX-XXXX-XXXX-XXXXXXXXXXXX
$ az aks get-credentials -n oli-aksdemo01 -g oli-aksdemo01
Merged "oli-aksdemo01" as current context in /home/olivier/.kube/config
$ kubectl get nodes
To sign in, use a web browser to open the page https://microsoft.com/devicelogin and enter the code C2NP77EGR to authenticate.
Run Code Online (Sandbox Code Playgroud)
:-(
在 Azure 上集成 AAD 的 AKS 群集上对服务主体进行身份验证时,是否有办法避免设备登录页面?