Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

redis 内存分析 #192

Open
shenkonghui opened this issue Sep 14, 2023 · 0 comments
Open

redis 内存分析 #192

shenkonghui opened this issue Sep 14, 2023 · 0 comments

Comments

@shenkonghui
Copy link
Owner

shenkonghui commented Sep 14, 2023

查看容器使用内存1.6G

NAME                                                CPU(cores)   MEMORY(bytes)
redis-s-redis-single-6d9fcf76d9-bkv9h               4m           1624Mi

实际在pod中top查看内存使用了1个G,即设置的redis maxmemory参数

top - 16:22:12 up 7 days,  1:11,  0 users,  load average: 6.37, 5.83, 6.05
Tasks:   7 total,   1 running,   6 sleeping,   0 stopped,   0 zombie
%Cpu(s): 40.6 us, 26.4 sy,  0.0 ni, 30.2 id,  0.2 wa,  0.0 hi,  2.6 si,  0.0 st
MiB Mem :  11854.8 total,    228.5 free,   5948.5 used,   5677.7 buff/cache
MiB Swap:      0.0 total,      0.0 free,      0.0 used.   4866.9 avail Mem

   PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND
     1 root      20   0 1246092   1.0g   1840 S   0.0   8.7   1:55.58 redis-server

回收pagecache后

echo 1 > /proc/sys/vm/drop_caches

NAME                                                CPU(cores)   MEMORY(bytes)
redis-s-redis-single-6d9fcf76d9-bkv9h               4m           1036Mi
@shenkonghui shenkonghui changed the title 如何查看进程使用的pagecache redis 内存分析 Sep 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant