Pressure Measurement and server monitoring tools

We must first of its profits; always want to run a variety of applications, you can use server monitoring tool to see how their server status in the server above; if you need to learn how server performance, you need to measure pressure tool;

  • View server CPU core usage:top
  • View server memory usage: free -m
  • View server disk IO usage:iotop
  • Check the server disk usage:df -h
  • View server network IO usage:iftop
  • Upgraded version of the top command: htop

Pressure measurement

  • Tools for different types of server resources will be more pressure measured; they will just write use;
  • CPU Stress Test:
    # 使用lookbusy
    ./lookbusy -h   # 打印帮助信息
    ./lookbusy --n=4 --cpu-util=80 --mem-util=4096MB    # 将4个逻辑核的使用率变为80%,内存使用4096MB
    
  • Memory Stress Test:
    # 使用stress-ng
    # 下载与安装stress-ng
    wget http://kernel.ubuntu.com/~cking/tarballs/stress-ng/stress-ng-0.08.01.tar.gz
    tar -xvf stress-ng-0.08.01.tar.gz
    cd stress-ng-0.08.01
    make && make install
    # help
    stress-ng --help
    #在4个CPU逻辑核上面产生80%的负载(不耗用内存利用率):
    stress-ng --cpu 4 --cpu-load 80
    #在4个CPU逻辑核上面产生20%的负载,并使用两个进程总共占用1024MB内存:
    stress-ng --cpu 4 --cpu-load 20 --vm 2 --vm-bytes 1024M #此时可以查看系统的CPU使用率,发现约为70%左右,因为在分配并耗费内存资源的时候,两个进程对两个CPU逻辑核的利用率是100%,因此:综合利用率是100%*0.5+20%=70%
    
  • Disk IO performance testing tools: fio, dd, iozone
  • Network bandwidth testing tools: Use netperf communications network between two machine performance testing
    • netperf comprising two components:
      • Client netperf
      • netserver
        #物理机上测试,在服务器端和客户端安装程序
        wget https://github.com/HewlettPackard/netperf/archive/netperf-2.7.0.tar.gz
        tar -xvf netperf-2.7.0.tar.gz
        cd netperf-netperf-2.7.0/
        ./configure && make && make install
        # 安装完成
        # 在服务器端运行:
        netserver
        # 在客户端运行
        netperf -H $ip -l 60 -t TCP_STREAM  # ip是服务器端的ip地址
        

reference

stress-ng
grasp of Linux PC performance benchmark tests
using NETPERF test network performance
network testing tool installation Netperf


Original: Big Box  server Pressure Measurement and Monitoring Tools


Guess you like

Origin www.cnblogs.com/petewell/p/11615042.html