
管理階層決定縮減產品伺服器規模。
Current size: Standard B16ms (16 vcpus, 64 GiB memory)
Desired size: Standard B8ms (8 vcpus, 32 GiB memory)
CPU 大部分處於閒置狀態(輸出來自 sar -u)
10:20:01 CPU %user %nice %system %iowait %steal %idle
10:30:01 all 15.46 0.00 4.24 0.19 0.00 80.11
10:40:01 all 17.11 0.04 4.21 0.18 0.00 78.47
10:50:01 all 19.29 0.00 4.76 0.52 0.00 75.43
我關心的是記憶:
root@precious-server:~# free -h
total used free shared buff/cache available
Mem: 62G 7.9G 26G 510M 28G 53G
Swap: 0B 0B 0B
看起來我有 53GB 可用空間,但免費價值只有 26GB。
Sar 報告使用了 53%-57%(%memused 欄位),其中只有約 15%-18% 被提交(%commit 欄位):
10:20:01 kbmemfree kbavail kbmemused %memused kbbuffers kbcached kbcommit %commit kbactive kbinact kbdirty
10:30:01 28.9G 55.2G 33.9G 53.9% 2.6G 19.8G 9.7G 15.4% 24.1G 3.7G 11.5M
10:40:01 27.0G 53.3G 35.8G 57.0% 2.6G 19.8G 11.6G 18.5% 26.0G 3.7G 1.7M
10:50:01 26.8G 53.1G 36.0G 57.3% 2.6G 19.8G 11.8G 18.7% 26.2G 3.7G 4.3M
所以,你看到我的困惑了嗎? free 指令說我有 53GB 可用空間,sar 說記憶體已使用 52%,而 Grafana 說已使用 15%。我不確定我可以縮小規模:)
先生們您有什麼考慮?