[Osaka/Yokohama/Tokushima] Looking for infrastructure/server side engineers!

[Osaka/Yokohama/Tokushima] Looking for infrastructure/server side engineers!

[Deployed by over 500 companies] AWS construction, operation, maintenance, and monitoring services

[Deployed by over 500 companies] AWS construction, operation, maintenance, and monitoring services

[Successor to CentOS] AlmaLinux OS server construction/migration service

[Successor to CentOS] AlmaLinux OS server construction/migration service

[For WordPress only] Cloud server “Web Speed”

[For WordPress only] Cloud server “Web Speed”

[Cheap] Website security automatic diagnosis “Quick Scanner”

[Cheap] Website security automatic diagnosis “Quick Scanner”

[Reservation system development] EDISONE customization development service

[Reservation system development] EDISONE customization development service

[Registration of 100 URLs is 0 yen] Website monitoring service “Appmill”

[Registration of 100 URLs is 0 yen] Website monitoring service “Appmill”

[Compatible with over 200 countries] Global eSIM “Beyond SIM”

[Compatible with over 200 countries] Global eSIM “Beyond SIM”

[If you are traveling, business trip, or stationed in China] Chinese SIM service “Choco SIM”

[If you are traveling, business trip, or stationed in China] Chinese SIM service “Choco SIM”

[Global exclusive service] Beyond's MSP in North America and China

[Global exclusive service] Beyond's MSP in North America and China

[YouTube] Beyond official channel “Biyomaru Channel”

[YouTube] Beyond official channel “Biyomaru Channel”

What causes high server load? Explaining how to identify areas under load

My name is Ito and I am an infrastructure engineer.

Last time, we introduced a "load average" that you can check when the server load increases.
Check server load on load average? Beyond Blog

Load average is a representation of processes waiting to be processed.
The higher the number, the more processes are waiting for processing, and the situation is "higher load."

Why is the load so high this time? I would like to find out the cause.

There are two main causes

There are basically two main reasons why a high load average occurs.

  • CPU processing cannot keep up
  • Disk I/O processing cannot keep up

Now, I would like to explain how to find out if each is the cause.

If the cause is the CPU

First, check the CPU usage using the top command. The following two values ​​are worth noting.

%user CPU usage rate used by user processes
%system CPU usage rate used by the system (kernel)

If a general process is CPU intensive, the user mode (%user) CPU usage will probably be high.

Also, if a large number of processes are running in user mode, the process will be switched.
Since the kernel mode (%system) CPU is used when performing this "process switching",
the kernel mode CPU usage rate will be high for programs that often switch processes.

stress-user_022516_092215_PM
If user mode CPU usage is high

stress-system_022516_092244_PM
If kernel CPU usage is high

If disk I/O is the cause

If disk I/O is the cause, check the following at top.

%iowait Processes are idle when disk I/O is required
SWAP Amount of memory used up and HDD used instead of memory

The iowait value is often high when reading and writing data from disk in large quantities.
For example, a DB server with a large database access tends to have a high iowait value.

SWAP is the capacity that uses the HDD instead of memory when a process uses all of the memory.
An example of using SWAP is to use SWAP when there is a large amount of access on a web server, etc., to reserve memory and use SWAP.

When using SWAP, using HDD instead of memory means that disk I/O will increase the load, which will slow down the server.

stress-disk_022516_092255_PM
If iowait is high and load is high due to disk I/O

stress-swap
If you are using SWAP

We will investigate the cause

I think this will help you figure out whether the problem is caused by the CPU or I/O.
Furthermore, we will use the ps command to find out which processes are using the CPU (in the case of SWAP, which processes are using memory).

If the CPU usage rate in user mode is high, there is no problem with I/O, etc.,
so you may need to increase CPU performance or review the program.

If there is a problem with the disk I/O side, you may need to add more memory or have the program process work in a place with free memory instead of disk I/O.

Also, there may be cases where the load average is low but the processing is slow.
In that case, there may be a problem with the software settings or network processing.

If you are first facing the problem of "high load," the first step to solving this problem is to calmly identify which part of the load is being applied.

If you want to consult a cloud professional

Since its founding, our company Beyond has developed technology as a multi-cloud integrator and managed service provider (MSP) and has designed, constructed, and migrated it using a variety of cloud server platforms, including AWS, GCP, Azure, and Oracle Cloud.

We offer a custom-made cloud server environment optimized for customers according to the specifications and functions of the system and application that we are looking for, so if you are interested in the cloud, please feel free to contact us.

● Cloud/server design/construction
● Cloud/server migration/migration
● Cloud/server operation, maintenance, and monitoring (24 hours a day, 365 days a year)

If you found this article helpful , please give it a like!
4
Loading...
4 votes, average: 1.00 / 14
16,181
X facebook Hatena Bookmark pocket
[Webinar] Introduction to Multi-Cloud: Which cloud is best for your business? Get the latest information on the 8 major clouds!

[Webinar] Introduction to Multi-Cloud: Which cloud is best for your business? Get the latest information on the 8 major clouds!

[Webinar] From the operational structure to specific steps! A complete overview of cloud server operation and maintenance

[Webinar] From the operational structure to specific steps! A complete overview of cloud server operation and maintenance

The person who wrote this article

About the author