In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
How to evaluate the performance of Linux server? How to develop a web page with technical content? In response to this problem, the editor today summarizes this article on server performance evaluation, hoping to help more friends who want to solve this problem to find a more simple and easy way.
CPU usage and load
First of all, you need to make it clear that CPU usage and machine load are not the same concept, if CPU utilization, but does not necessarily mean that the machine load is also high. So about the difference between CPU usage and load:
CPU usage: shows the percentage of CPU occupied by the program while running; CPU load: shows the average number of CPU tasks in use and waiting for use over a period of time; view CPU utilization and load
You can use the uptime,w command to view the load, while the top,vmstat tool can also observe both CPU usage and load.
View CPU cores:
Grep "model name" / proc/cpuinfo | wc-luptime command:
The load average in the command return information is about the average load of the system, and the three numbers represent the average load of the system within 1 minute, 5 minutes, and 15 minutes, respectively.
Top tool
(if it is multicore CPU,1, view the details of each CPU)
The three values after the first line of the top tool also represent the average load in the previous 1, 5, and 15 minutes.
The third line is about the meaning of the parameters of CPU utilization:
(us) the time spent by user:CPU in low nice (high priority) user mode; (most of the CPU time is executing such programs) (sy) the time sytem:CPU spent in the kernel, and the operating system fell from the user state to kernel state through system calls to perform specific services (this value is usually small, but when the server is performing a relatively dense IO, it will be larger) ni (nice): the time taken by CPU to run at low priority in high nice (low priority) user mode (nice > 0); si (softirq): the time it takes for the system to process soft interrupts st (steal): in the case of a virtual machine, because the CPU under the virtual machine is a shared physical CPU, it indicates the time that the virtual machine waits for hypervisor to schedule CPU during this period of time. CPU utilization and load metrics
First of all, for CPU usage, if you stay in the range of 60-80% for a long time, it means that there may be a bottleneck on the server. If you need specific analysis, you also need to observe whether the user occupancy rate is too high or the system occupancy rate is too high. Specific:
Us: when the user occupancy rate is too high, it is usually some individual processes that take up a lot of CPU;sy: when the system occupancy rate is too high, it means that the system management takes a lot of time, such as some IO operations, or part of the kernel, driver modules
* (secondly, there has been a lot of controversy in terms of load metrics. I have combined the views of some articles. Specifically, the CPU load is kept within the range of (CPU cores 0.7). Such a load is safe, and if it exceeds a certain load (= CPU cores), it can be regarded as over load.) * * memory
Memory, also known as memory memory, is used to temporarily store operational data in CPU, as well as data exchanged with external memory such as hard disk.
Physical memory: memory space obtained through physical memory strips, namely random access memory (RAM), internal memory that exchanges data directly with CPU, also known as main memory virtual memory: a memory management technology of a computer that makes an application think that it has continuously usable memory (complete address space), which is actually divided into multiple physical memory fragments and partially temporarily stored on external disk memory. Exchange data when needed. Swap partition: when the physical memory of the system is insufficient, a part of the physical memory is released for use by the currently running program. The free space may come from programs that have not been operated for a long time, and the free space is temporarily saved into the Swap space. When those programs need to run, the saved data is recovered from the Swap partition to memory. View memory free command:
The free command displays idle, used physical memory, and Swap partitions on the Linux system:
Total: total free space, used: used space; free: free free space; shared: shared use of physical memory space; available: physical memory space that can be used by applications. Buffers is about to be written to disk, and cache makes it read from disk. Buff/cache: physical memory space used by buff and cache free is really unused physical memory space, avaiable is from the application point of view, if the application needs to use memory, memory can be reclaimed from buff/cache to meet the application's request. Vmstat tool:
Top tool:
(show the memory footprint of different processes)
Disk IPUBO
For disk I / O access load is too high, usually there will be system operations, application services can not respond and other problems, usually through top, iostat,iotop,ps,lsof tools to locate the problem.
Top command:
(wa: indicates the percentage of CPU time spent waiting by IO, and the IO pressure is too high when it is higher than 30%)
Iostat (additional installation of sysstat packages)
(when the util is close to 100%, there are too many Imax O requests and it is running at full capacity. )
Iotop (install additional iotop packages to see which processes take up too much IO)
The network
Testing about network performance is generally from the aspects of availability, response time, network utilization, network throughput and network bandwidth capacity. The commonly used tools are (ping, netstat, sar, tcpdump, iptraf)
Iptraf (additional installation of iptraf package is required)
View the throughput of the Ethernet card:
Iptraf-ng-d eth0
Sar (additional installation of sysstat required)
Check the performance of the Nic:
Sar-n DEV 1 100
Parameter meaning:
Packets received by IFACELAN interface rxpck/s per second txpck/s sent packets per second rxbyt/s or rxkB/s received bytes per second (upload speed, Nic inbound traffic) bytes sent by txbyt/s or txkB/s per second (download speed Network card outbound traffic) compressed packets received by rxcmp/s per second txcmp/s sent compressed packets per second rxmcst/s received Multicast packet Server performance Analysis Software
This is the end of the server performance evaluation. I hope the above content can be helpful to everyone and learn more knowledge. If you think the article is good, you can share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.