Describe the bug
redis4.0.11 info cpu used_cpu_user sudden increase
To reproduce
redis.4.0.11 is single process and single single thread, so used_cpu_user should not sudden increase. 179414 as redis-server pid. my shell:
while ((0<1))
do
top -b -p 179414 -n 1 | grep 179414
redis-cli -p 6703 info cpu | grep -E '(used_cpu_sys:|used_cpu_user:)'
sleep 1
done
result:
Comment From: lizheng207
Comment From: lizheng207
Comment From: oranagra
@lizheng207 can you try a more recent version of redis? (e.g. 7.0) i see some change were done in that area (#5168), although they don't seem to explain the issue, but i can't reproduce it either.
Comment From: judeng
hi, redis get the cpu usage by using 'getrusage' directly, this approach is unlikely to go wrong, and I have had some cases where the bug in the kernel resulted in incorrect statistics about cpu usage information of redis. can you provide the kernel information of your os?
Comment From: lizheng207
@judeng , 3.10.0-327.el7.x86_64。