Linux server load average is very high, but CPU and memory can be, what's going on?

Source: Internet
Author: User

Top found the load average is very high, the website almost can't open
Such as:


This is how I do, I do not understand the server, mainly to do PHP development

Reply content:

Top found the load average is very high, the website almost can't open
Such as:


This is how I do, I do not understand the server, mainly to do PHP development

No one answers, I'm all tangled up.

Should be hard disk IO problem, is not a lot of write file operation?

Thread is not released, there may be a dead loop

You write the information in a specific way, so you can't answer it.

You can use the following tool

ps -aux | sar -P ALL 1 100  

It's convenient to find out why.

Man uptime Visible:
Load average refers to the average number of processes (or threads) that are in the task_running or task_uninterruptible state.
A process (or thread) that is in a task_running state may be using the CPU or queuing for CPU usage.
A process (or thread) that is in the task_uninterruptible state may be waiting for I/O, such as waiting for disk I/O.
183 116 82 These three values refer to the load average in the last 1 minutes, 5 minutes, and 15 minutes, respectively.
For the last 1 minutes, 183来 said, there were an average of 183 tasks (processes or threads) in the running or uninterruptible state.

My Xubuntu14.04 desktop, the total number of tasks (process or thread) only 189, and your server actually has 4,355. And in the past 1 minutes on average 183 are in a running or non-interruptible state, and my computer averages less than 1.

In addition your 13.6 WA This value is also relatively high, this value is the meaning of the I/O waiting to occupy the percentage of CPU time, that is, I/O waiting to occupy 13.6% of the CPU resources.

It is not normal for the 32.5 sy to occupy a CPU time percentage of 32.5% for the kernel space, while the 4.8 US user space program consumes only 4.8% of the CPU time.

It is recommended to use atop-d (press T refresh) or iotop to find out which processes are reading and writing to the disk, if it is PHP, then the number of PHP process is lowered, you can try to tune to twice times the number of CPU cores (NPROC). because when the CPU and the disk are not busy, the process of more than a lot of meaning, will only increase the CPU context switch and disk I/O wait, not worth the candle.

  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.