Used_cpu_sys and used_cpu_user in redis.
The info command output result of redis contains the following four indicators. The redis official website provides the following explanation, but still does not understand what it means.
used_cpu_sys
: System CPU consumed by the redis Server
used_cpu_user
: User CPU consumed by the redis Server
used_cpu_sys_children
: System CPU consumed by the background processes
used_cpu_user_children
: User CPU consumed by the background processes
The difference between user_cpu_sys and user_cpu_sys_children is obvious. One is the consumption of the redis master process, and the other is the consumption of the background process (the consumption of the RDB files in the background, the consumption of the master and slave synchronization ), however, the direct difference between used_cpu_sys and used_cpu_user is unclear. In English, one is the system CPU and the other is the user CPU. What is the system CPU and the user CPU?
After some Google operations, I found that a time command exists in Linux, which is used to display the CPU time occupied by a process.
$ Time PHP test. php
real 0m0.003s
user 0m0.000s
sys 0m0.004s
Here, real refers to the actual time when the process is executed, that is, the time when the clock passes.
User refers to the CPU time consumed by commands in user mode.
Sys refers to the CPU time consumed by the command in the kernel mode.
Used_cpu_sys and used_cpu_user in redis info are the two time points here.
What is the difference between the kernel mode and the user mode? You can Google it by yourself. Here we also provide an answer on stackoverflow.com for your reference:
Http://stackoverflow.com/questions/556405/what-do-real-user-and-sys-mean-in-the-output-of-time1
Back to redis, after testing, we found that these four CPU indicators are a statistical indicator. For example, used_cpu_sys isCore StateCPU usage timeSum TotalSo it will continue to increase with the duration of redis startup, and clear 0 after you restart the redis service.
I personally think that the relationship between used_cpu_sys and used_cpu_user does not indicate any problems, after several tests, the system is basically higher than the user. This indicates that redis is named as the core State environment of the system running directly.
I have just been in touch with redis. If you have any questions, please leave a message to correct them.
This article from "unintentional circle" blog, please be sure to keep this source http://bobzy.blog.51cto.com/2109336/1439751