# Mini stresstest



## zsolt_93 (Aug 29, 2011)

This is one of my old projects... A program for stress testing which was my first and last attempt at multithreading. Works pretty well, if configured right it manages 100% cpu load with a simple algorythm searching for prime numbers. Originally written in Delphi, but i plan on rewriting it in C# if there is any interest and people are willing to help.





How to achieve 100% load 
0. Run Project1.exe
1. Choose Prime
2. Select number of threads depending on cpu
3. Select stresstest
4. Type infinite in the textbox
5. Run

I hope you like it.


----------



## heky (Aug 29, 2011)

It doesnt really stress my i7 2600K. The load shows 100%, but the temperature doesnt even get to 50°C. In Prime95 the temperature goes to 69°C.


----------



## zsolt_93 (Aug 29, 2011)

Never tried on my i7 so far. Have you run with 8 threads?


----------



## entropy13 (Aug 29, 2011)

Well it really is a "mini" stresstest. Temps are just the same when I leave Football Manager 2011 on holiday for a month or so in-game, except this stresstest is "100%" for all threads.


----------



## temp02 (Aug 29, 2011)

As it is currently it gets the CPU to 100% surely, but doesn't really stress it, don't get me wrong, I'm not trying to put you down or something, sure there is workload that must be handled but it isn't being done the right way, or at least the way I would do it:
- preferably no GUI code should  be on the child thread (workload threads), that means no "Application.ProcessMessages" and no "if CheckBox1.Checked then" and such (sure this will maybe "crap out" the GUI on a single core system but it will maximize the threads _real_ workload processing);
- no function calling inside inner (work) loops, that means try to inline the code as much as you can on each thread cycle (the less overhead you put on the call stack the better the processor will be stressed);
- and finally Delphi/Lazarus supports inline assembler code, all you have to do is replace the function *begin* statement with the *asm* statement (like __asm on C), that is if you are familiar with the processor registers usage ofcourse (mess with EBX on Delphi and it will get freaky  )

Oh and one more thing, keep the current interface, I rather like it 

*EDIT:* here is a rather good tutorial on how to create and manage threads on Delphi/FPC, in case you wanna continue working on it (*insert Nike's slogan*).


----------



## heky (Aug 29, 2011)

zsolt_93 said:


> Never tried on my i7 so far. Have you run with 8 threads?



Yes, ran 8 threads.


----------



## micropage7 (Aug 29, 2011)

what about like intelburntest
from softpedia


----------

