Benchmarking

Various tools for testing different hardware components

CPU

Measures processing power by running CPU-intensive tasks. Tools like sysbench or stress can stress-test the CPU.

  • Example using sysbench:
    sudo apt-get install sysbench  
    sysbench --test=cpu --cpu-max-prime=20000 run
    

Memory

Evaluates memory bandwidth and latency using tools like memtest86 or stress-ng.

  • Example using stress-ng:
    sudo apt-get install stress-ng  
    stress-ng --vm 2 --vm-bytes $(awk '/MemFree/{printf "%d\n", $2 * 0.9;}' < /proc/meminfo)k --vm-keep -t 60s
    

Disk

Measures disk I/O performance using tools like fio or hdparm.

  • Example using fio:
    sudo apt-get install fio  
    fio --filename=/dev/sdX --direct=1 --rw=randread --bs=4k --size=1G --numjobs=1 --runtime=60 --time_based --group_reporting --name=test
    

Network

Assesses network throughput and latency using tools like iperf.

  • Example using iperf:
    # On the server side:  
    iperf -s  
    
    # On the client side:  
    php  
    iperf -c <server_ip>
    

GPU

Evaluates graphics rendering performance using graphical benchmarks like glxgears.

  • Example:
glxgears

Power Consumption

  • powertop
    • powerstat 1 10
      • cpu power monitoring
      • /sys/class/power_supply (laptops)
  • Power Topology
    • Example:
      apt-get install sysbench stress-ng fio --all  
      sysbench --test=cpu --cpu-max-prime=20000 run stress-ng --vm 2 --vm-bytes $(awk '/MemFree/{printf "%d\n", $2 * 0.9;}' < /proc/meminfo)k --vm-keep -t 60s
      

This structure organizes the information into clear sections, making it easy to navigate and understand each component's performance evaluation.