Continuing the previous post, now we will enter into the subtitles:
The relationship between CPU utilization and the Load average on the linux system
CPU utilization is very large to small numbers that indicated by the load average. I will explain the relationship of the begaimana CPU utilization against the Load Average. CPU utilization here is the use of a number of resources from a processor to perform specific tasks.
Here I will explain the Handbrake, what is a handbreake?, henadbrake is a program used to convert video files. Here I will limit the use of CPU utilization by as much as 2 of 8 cores. During the process of encoding takes place, I will run the command "sar" to see how big his CPU utility usage.
The output is indicated by the "sar" above shows load average as much as 6 times with an interval of 30 seconds. At first look the CPU utilization of 2.10%. Furthermore when I start the application using the handbrake encode, CPU utilization increases to 23.83%. Where is the next stable in the range of 25%.
This indicates that overall the system spent roughly as much as 1/4 time for working on processes that are run by other users, 3/4 is simply not used. Why load used only 1/4 only?
Because the engine has a total of 8 CPU cores, whereas I limit the application to use the handbrake 2 core CPU only. So 6 other cores in a State of idle. then I get back run command cat/proc/loadavg to see his average load.
It can be concluded that the calculation of the load average is directly proportional to the increasing use of CPU resources by each process being run. The figures shown in the calculation of load average above is 2, but the system resources used his 1/4 of bari alone. So that conclusions can be drawn when system resources are used by as much as 100%, then the average load will show the number 8.
Of things that are already described above, you can now find out that limit load average before a system is overloaded i.e. as much as the number of CPU cores that are owned by the system.
Some characteristics and consequences arising when servers are overloaded
A server system that overloaded one of which may be marked with a load average value that far exceeds the limit in a long period of time. a server that is experiencing the overload will cause some of the following:
# Server becomes less responsife and difficult to access
For example, when you login to the SSH terminal will be much longer than usual. After you successfully open the SSH terminal, every command that you type do not appear immediately.
# Web page displayed is slower than usual
A server which provides dynamic web kontens (PHP and MYSQL), will noticeably slow when accessed when the system is experiencing conditions of overload. This is because execution bitcode PHP or a database LookUp will be hampered. Because the number of run-queue which is also awaiting to be processed.
# Page website often display error code 500
Website server that is in a State of high overload will also more often showing error code such as 502, 504 or 503. This can happen because the web server does not receive a response from the interpreters in a specific time period. Delay occurred in the process of execution of files in the request by the visitor, so any timeout occurs.