Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Infinite CPU benchmark with realtime reporting?
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Infinite CPU benchmark with realtime reporting?

Hi,

Does anyone maybe know of a benchmark like sysbench but that I could just tell to run infinitely and report the results at a set time inteval.

What I'm looking for, as an example, is something like executing:
vmstat 1
This will make it print out the results every second.

Is there something like this but as a CPU benchmark?

Thank in advance!

Comments

  • Cpu benchmark like geekbench running at least 3-5 minutes

  • @chocolateshirt said:
    Cpu benchmark like geekbench running at least 3-5 minutes

    Yeah, that's the only problem, what would be ideal is sysbench running indefinitely BUT reporting how many events it ran that second, every second.

  • @AleksaDjordjic said:

    @chocolateshirt said:
    Cpu benchmark like geekbench running at least 3-5 minutes

    Yeah, that's the only problem, what would be ideal is sysbench running indefinitely BUT reporting how many events it ran that second, every second.

    What is your objective? And where will you run the benchmark, is it on dedicated server or shared environment like VPS?

    Thanked by 1Falzo
  • edited October 2021

    @chocolateshirt said:

    @AleksaDjordjic said:

    @chocolateshirt said:
    Cpu benchmark like geekbench running at least 3-5 minutes

    Yeah, that's the only problem, what would be ideal is sysbench running indefinitely BUT reporting how many events it ran that second, every second.

    What is your objective? And where will you run the benchmark, is it on dedicated server or shared environment like VPS?

    I want to mess with LXC CPU settings in Proxmox and see how the task scheduler will prioritize each container in realtime with all of them using 100% of the CPU at the same time.
    It is a bare metal server in my home.

  • @AleksaDjordjic said:

    @chocolateshirt said:

    @AleksaDjordjic said:

    @chocolateshirt said:
    Cpu benchmark like geekbench running at least 3-5 minutes

    Yeah, that's the only problem, what would be ideal is sysbench running indefinitely BUT reporting how many events it ran that second, every second.

    What is your objective? And where will you run the benchmark, is it on dedicated server or shared environment like VPS?

    I want to mess with LXC CPU settings in Proxmox and see how the task scheduler will prioritize each container in realtime with all of them using 100% of the CPU at the same time.
    It is a bare metal server in my home.

    I think what you need is cpu stress testing software not a benchmark. Try read this article and modify the command as you like:
    https://linuxconfig.org/how-to-stress-test-your-cpu-on-linux

  • that does not make sense in any case. a benchmark gets its numbers by putting (testing) workloads onto the cpu. if you'd run it indefinitely this would mean you'd constantly run your cpu at 100% for no reason. probably even cannibalizing the real workload you want your service to be able to get done.

    in a shared environment like vservers regularly are, this could even be considered abuse. just don't.

  • @chocolateshirt said:

    @AleksaDjordjic said:

    @chocolateshirt said:

    @AleksaDjordjic said:

    @chocolateshirt said:
    Cpu benchmark like geekbench running at least 3-5 minutes

    Yeah, that's the only problem, what would be ideal is sysbench running indefinitely BUT reporting how many events it ran that second, every second.

    What is your objective? And where will you run the benchmark, is it on dedicated server or shared environment like VPS?

    I want to mess with LXC CPU settings in Proxmox and see how the task scheduler will prioritize each container in realtime with all of them using 100% of the CPU at the same time.
    It is a bare metal server in my home.

    I think what you need is cpu stress testing software not a benchmark. Try read this article and modify the command as you like:
    https://linuxconfig.org/how-to-stress-test-your-cpu-on-linux

    I do need a stress test, but also in a sense a benchmark since I want to monitor how much it slows down/speeds up, etc.
    A stress test just stresses the CPU, doesn't really measure anything.

    I need measurements of how fast the CPU is performing.

  • @Falzo said:
    in a shared environment like vservers regularly are, this could even be considered abuse. just don't.

    Message above, doing it on my own server at home...

  • @AleksaDjordjic said:

    @chocolateshirt said:

    @AleksaDjordjic said:

    @chocolateshirt said:

    @AleksaDjordjic said:

    @chocolateshirt said:
    Cpu benchmark like geekbench running at least 3-5 minutes

    Yeah, that's the only problem, what would be ideal is sysbench running indefinitely BUT reporting how many events it ran that second, every second.

    What is your objective? And where will you run the benchmark, is it on dedicated server or shared environment like VPS?

    I want to mess with LXC CPU settings in Proxmox and see how the task scheduler will prioritize each container in realtime with all of them using 100% of the CPU at the same time.
    It is a bare metal server in my home.

    I think what you need is cpu stress testing software not a benchmark. Try read this article and modify the command as you like:
    https://linuxconfig.org/how-to-stress-test-your-cpu-on-linux

    I do need a stress test, but also in a sense a benchmark since I want to monitor how much it slows down/speeds up, etc.
    A stress test just stresses the CPU, doesn't really measure anything.

    I need measurements of how fast the CPU is performing.

    You can run both.. why not?

  • @chocolateshirt said:

    @AleksaDjordjic said:

    @chocolateshirt said:

    @AleksaDjordjic said:

    @chocolateshirt said:

    @AleksaDjordjic said:

    @chocolateshirt said:
    Cpu benchmark like geekbench running at least 3-5 minutes

    Yeah, that's the only problem, what would be ideal is sysbench running indefinitely BUT reporting how many events it ran that second, every second.

    What is your objective? And where will you run the benchmark, is it on dedicated server or shared environment like VPS?

    I want to mess with LXC CPU settings in Proxmox and see how the task scheduler will prioritize each container in realtime with all of them using 100% of the CPU at the same time.
    It is a bare metal server in my home.

    I think what you need is cpu stress testing software not a benchmark. Try read this article and modify the command as you like:
    https://linuxconfig.org/how-to-stress-test-your-cpu-on-linux

    I do need a stress test, but also in a sense a benchmark since I want to monitor how much it slows down/speeds up, etc.
    A stress test just stresses the CPU, doesn't really measure anything.

    I need measurements of how fast the CPU is performing.

    You can run both.. why not?

    I'm not sure what you mean...?

    Like, lets say I have 3 LXC containers I'm testing with, so run a stress test on 2 of them, and benchmark the 3rd?

  • @AleksaDjordjic said:

    @chocolateshirt said:

    @AleksaDjordjic said:

    @chocolateshirt said:

    @AleksaDjordjic said:

    @chocolateshirt said:

    @AleksaDjordjic said:

    @chocolateshirt said:
    Cpu benchmark like geekbench running at least 3-5 minutes

    Yeah, that's the only problem, what would be ideal is sysbench running indefinitely BUT reporting how many events it ran that second, every second.

    What is your objective? And where will you run the benchmark, is it on dedicated server or shared environment like VPS?

    I want to mess with LXC CPU settings in Proxmox and see how the task scheduler will prioritize each container in realtime with all of them using 100% of the CPU at the same time.
    It is a bare metal server in my home.

    I think what you need is cpu stress testing software not a benchmark. Try read this article and modify the command as you like:
    https://linuxconfig.org/how-to-stress-test-your-cpu-on-linux

    I do need a stress test, but also in a sense a benchmark since I want to monitor how much it slows down/speeds up, etc.
    A stress test just stresses the CPU, doesn't really measure anything.

    I need measurements of how fast the CPU is performing.

    You can run both.. why not?

    I'm not sure what you mean...?

    Like, lets say I have 3 LXC containers I'm testing with, so run a stress test on 2 of them, and benchmark the 3rd?

    I am not sure what is your objective, but you can run both stress test & benchmark on a single lxc container at the same time.

  • edited October 2021

    @chocolateshirt said:

    @AleksaDjordjic said:

    @chocolateshirt said:

    @AleksaDjordjic said:

    @chocolateshirt said:

    @AleksaDjordjic said:

    @chocolateshirt said:

    @AleksaDjordjic said:

    @chocolateshirt said:
    Cpu benchmark like geekbench running at least 3-5 minutes

    Yeah, that's the only problem, what would be ideal is sysbench running indefinitely BUT reporting how many events it ran that second, every second.

    What is your objective? And where will you run the benchmark, is it on dedicated server or shared environment like VPS?

    I want to mess with LXC CPU settings in Proxmox and see how the task scheduler will prioritize each container in realtime with all of them using 100% of the CPU at the same time.
    It is a bare metal server in my home.

    I think what you need is cpu stress testing software not a benchmark. Try read this article and modify the command as you like:
    https://linuxconfig.org/how-to-stress-test-your-cpu-on-linux

    I do need a stress test, but also in a sense a benchmark since I want to monitor how much it slows down/speeds up, etc.
    A stress test just stresses the CPU, doesn't really measure anything.

    I need measurements of how fast the CPU is performing.

    You can run both.. why not?

    I'm not sure what you mean...?

    Like, lets say I have 3 LXC containers I'm testing with, so run a stress test on 2 of them, and benchmark the 3rd?

    I am not sure what is your objective, but you can run both stress test & benchmark on a single lxc container at the same time.

    Won't they interfere with eachother tho?
    The benchmark won't get the actual CPU performance since its also being stressed in the same container, I want to see how multiple container will behave and affect other containers with different priorities, all utilizing the CPU at the same time to their maximum.

    I think I just though of a quick shell script that I can write for this, so gimme a bit, if I get it working I'll explain exactly what I needed and share the script.

  • @AleksaDjordjic said:

    @Falzo said:
    in a shared environment like vservers regularly are, this could even be considered abuse. just don't.

    Message above, doing it on my own server at home...

    hmm still don't think this is a feasible approach. if you look at a benchmark like geekbench it runs different types of tests in row, also one round only single threaded, the other using all cores and so on.

    so obviously if you even run mutliple of these in parallel as a testbench your result will jump around a lot, depending on which machine is at which stage. this might be closer to real world behaviour but I doubt you can make much sense from it, for what you seem trying to achieve.

    pure stress tests running the very same thing might be better in that case (numbers of pi?) but as said won't have much value about real world cases.
    so I guess you need to be much more specific in defining your use or test case and ideally write your own workload to stress the LXC containers with and log some kind of result in between...

  • edited October 2021
    while [ true ]
    do
        SECONDS=0
        count=0
        while (( SECONDS < 1 ))
        do
            # find primes up to 40
            limit=40
            i=2
            while [ $i -le $limit ]
            do
                flag=1
                j=2    
                while [ $j -lt $i ]
                do
                    rem=$(( $i % $j ))
                    if [ $rem -eq 0 ]
                    then
                        flag=0
                        break
                    fi
                    j=$(( $j+1 ))
                done
                i=$(( $i+1 ))
            done
    
            count=$(( $count+1 ))
        done
    
        echo "Loops per second: $count"
    done
    

    Here... actually was much simpler than what I thought, and its exactly what I need.
    Just a simple benchmark that tries to find primes up to 40 as many times per second as possible, and logs out how many times it did it each second.

    Its singlethreaded, though I don't need anything more than that.

    So now, I basically spin up a KVM VM inside with the resources I want to test with, in this case, just 2 CPU cores, inside of it spin up 3 LXC containers, and run this on all of them, if the scheduler is fair share, which it should be, they should roughly do the same amount of events per second.

    Now what I want to test is, if I increase the priority of one VM, how much of an impact will it make, how much do I have to increase it until 2 vms share 1 core, and 1 has a core almost dedicated to it.

    This is the stuff I like to mess around with and test to better understand terms in software I use, here specifically, I want to see more how the "CPU Units" plays a role in performance using Proxmox.

  • watch -n1 sysbench --time=1 --test=cpu run

    Thanked by 1AleksaDjordjic
  • @TerokNor said:
    watch -n1 sysbench --time=1 --test=cpu run

    Oh...
    Well that's perfect, thanks!

  • You can also hammer more threads
    watch -n1 sysbench --time=1 --num-threads=8 --test=cpu run

    Thanked by 1AleksaDjordjic
Sign In or Register to comment.