5/20/2023 0 Comments Linux cpu usage command![]() ![]() You can see that after MySQL is started, it creates many internal threads to work on. You can see the ID of each thread in MySQL. If you want to see the thread status, you need to use top-h MySQL is a single-process multithreaded structure, which means that only one row of data can be seen in an exclusive MySQL server using the top command. For simplicity, this is mainly used to refer to the scenario where %us is too high. ![]() Several other indicators that are too high also indicate that MySQL is in an abnormal state. ![]() In general, when we talk about excessive CPU usage, we refer to the %us metric, and the CPU usage in monitoring is usually the same value (there are other ways to calculate it, but for simplicity, we don't consider other cases). ![]() %st: CPU time stolen by the virtual machine.%si: time spent by the CPU to process soft interrupts.%hi: time spent by the CPU to process hard interrupts.%wa: indicates the time the CPU is waiting for I/O.%ni: indicates the elapsed time of the user process by CPU nice.% SY: indicates the CPU usage time of system processes, mainly used by the kernel.%us: indicates the CPU usage time of the user process (not scheduled by NICE).The %CPU column shows CPU usage, and the percentage refers to the percentage of time spent overall: Take the top command in Linux as an example. This article will introduce you to the relationship between MySQL and CPU, after a certain understanding of this can more accurately determine the cause of the problem, but also to find some hidden problems caused by CPU problems in advance. In my daily work, when I find that MySQL is not in the right state, I usually look at the monitoring indicators, and many times I see a familiar scene: CPU usage has exploded again. The article was first published in Tencent Cloud + community Tencent cloud database expert services column. The author Wang Wen 'an, Tencent CSIG database special database engineer, mainly responsible for Tencent cloud database MySQL related work, love technology, welcome to leave a message for communication. ![]()
0 Comments
Leave a Reply. |