Basic CPU Stress Testing On FreeBSD

 FreeBSD have a basic CPU stress test application that can do the job via command line. It is usually done to monitor how stable the system configuration especially CPU overclock, how much power supply that can withstand the load from the CPU, how much temperature that can produced until reached max limit and etc. I have an old AMD FM1 platform PC equipped with AMD A6-3500 APU which overclocked into 4.0Ghz (stock speed 2.1Ghz) and this low-end AMD FM1 CPU (TDP 65w) able to overlclock such higher speeds compared to higher-end ones, AMD A8-3870K that is unable to overclock further along with ridiculously high TDP of 100w which isn't really suitable for medium-sized heatsinks, even with 3rd party ones. 


In order to doing stress test and temperature monitoring, you will need to do some things:

1. Installing stress and bash program
      $ pkg install stress bash

2. Creating CPU temperature script

    i) Enable the CPU temperature module:

        $ kldload coretemp  #if using intel CPU
        $ kldload amdtemp #if using AMD CPU

      - You can even write this settings on /boot/loader.conf to load it permanently:

         coretemp_load="YES" #if using intel CPU
         amdtemp_load="YES" #if using AMD CPU

      ii) Write the bash script to create a simple CPU temperature monitor by looping the sysctl temperature output call

           #!/usr/local/bin/bash
              for ((c=1; c>0; c++))
              do
                   sysctl -a | grep temperature
                   sleep 1
              done

 

 3. Perform stress test while monitoring CPU. 

    i) Run the stress command below for performing stress test. You will need to specify its options first. See the example by running stress only command.

       $ stress [option-1] [option-2] ...

      Example:

       $ stress --cpu 4 --io 4 --vm 2 --vm-bytes 128M --timeout 10s

   ii) Run the bash script for simple CPU temperature monitoring tool and observe the temperature.

Comments

Popular posts from this blog

Installing nvidia-drm-kmod on FreeBSD

Setting Up GPU Cards on FreeBSD 13

How To Setup Optical Drives on FreeBSD