Welcome to your wiki!

This is the default page, edit it as you see fit. To add a new page simply reference it within brackets, e.g.: [SamplePage].

The wiki uses Markdown syntax.

Project Members:


  • amwfc

    amwfc - 2013-12-10

    CPU burning tool for Linux - finally a mltithreaded dedicated CPU burn

    One night I decided to write my own CPU burning utility for Linux for lack of a dedicated open source tool.

    My tool will detect number of CPU cores you have on your system and load corresponding number of threads. The benefit over shell for-loop scripts is that it not just executes CPU commands in a loop - it also reads and writes potentially large amounts of data in memory, thus utilizing memory controller and north bridge/bus, thus creating load on entire CPU system.

    You have control over payload with command line parameters.

    The tool is so simple that you can get source code here and compile your own, no need to d/l .tar.gz!

    The methods I've used to enumerate CPU cores would work on FreeBSD and Linux - the only two O/Ss where I had an opportunity to test. It should work on AIX, BSD, HP-UX, Solaris, SGI and others. If it does not work for you, google is your friend and finding CPU enumeration code is not too difficult.

    You can also change the algorithm used for creating CPU load down at the very end. I used random calculations that my hands typed, they do not in any way pretend to be smart in a sense that they would create heavy load, crafted for any kind of CPU architecture. This is a very rudimentary tool that does the trick of bringing my own CPU's temperature to the top.

    Obtaining source code

    Proceed to the Files section and download two files: cpuburn_smp.cpp and makefile.


    In order to build cpuburn, you are going to need GNU C++ compiler and make. Type 'make' in the folder where you downloaded both files and it will build an executable cpuburn_smp.


    No special installation required. You can copy cpuburn_smp into /usr/local/bin if you like, or leave it where you compiled.


    When invoked from command line, cpuburn_smp will print a short help and automatically start # of threads equal to your CPU core count, using 65535 byte memory buffers.

    You can control both thread count and memory buffer size using command line arguments:

    1. Core count. Supply an integer number. It is sufficient to supply a number which is less or equal to the number of CPU cores, available to the session, however you can supply larger number as well.
    2. Buffer size. The buffers are arrays of Double numbers, therefore the actual memory size will be 2*8*X where X is the argument. For example, f you have 4GB of RAM available to the session, your maximum buffer size will be 268435456.
      When specifying large buffer sizes, you will notice how it takes increasingly longer for the tool to allocate memory for each thread, so please be patient.
      If memory allocation would fail, the error message would tell you exactly how many bytes the program was trying to allocate and in which buffer - source or destination. Compare that with available RAM to adjust the buffer size accordingly.
    Last edit: amwfc 2014-01-10
  • amwfc

    amwfc - 2014-01-10

    CPU burn goes multiplatform! Added support for most major UNIX systems: BSD, HP-UX (needs testing) AIX, Solaris etc. Check source code for all defines.

  • amwfc

    amwfc - 2014-04-21

    Added FreeBSD 10 and Solaris 11 binaries.


Log in to post a comment.