mac | How to stress-test your CPU in Mac OS X
May 10th, 2009 at 0:10
Sometimes people want or even need to produce some CPU-usage without big effort i.e. for testing issues.
The following article describes an easy way to realize that using the Terminal in Mac OS X.
System
Hardware


Software
- CPUPalette.app to display CPU usage
- yes command to generate some stress
CPUPalette.app is not installed on Mac OS X by default – while it is part of the free Apple Developer Tool-Set. If you are not willing to install CPUPalette – consider using Activity Monitor.app which is installed in
/Applications/Utilities/Activity Monitor.app
CPU Graphs
Idle
Which means – besides the basic processes i have Firefox, iTunes, RSS-Reader, Thunderbird runnig as i am writing while testing

1 CPU Core
Now – lets start.
- Open Terminal.app
- Enter: yes > /dev/null
- Press Enter

Lets check the CPU

2 CPU Cores
Now open a new Terminal window and do the re-do the above

Lets check the CPU

3 CPU Cores
Now open a new Terminal window and do the re-do the above

Lets check the CPU

4 CPU Cores
Now open a new Terminal window and do the re-do the above

Lets check the CPU

Lets take a look into Activity Monitor.app

and

Conclusion
Using the yes command and redirecting it to the black hole is a very simple but effective method to generate some CPU usage without big effort.
My 3 year old Mac Pro – first generation – easily handled the task – Mac OS X was acting without issues as expected. The temp increased slowly from 33 degree celcius up to 40 at the end.
Tags: activity monitor, cpu, cpu-cores, cpupalette, mac pro, stress test, yes, yes > /dev/null



May 10th, 2009 at 13:26
[...] the original here: mac | How to stress-test your CPU in Mac OS X Nessun tag per questo [...]
January 23rd, 2010 at 14:59
[...] also noch mit minimal Mehraufwand im Terminal künstlich CPU Verbrauch produzieren – geht doch alles direkt aus der Schaltzentrale [...]
March 3rd, 2010 at 18:38
where is to download that aplication?(procesor)
March 3rd, 2010 at 18:45
@rea
Hi – which application are you talking about?
March 7th, 2010 at 19:28
cpupalette.app where is to download?
March 8th, 2010 at 08:35
@rea:
please read this post – i guess it might answer your question
http://macfidelity.de/2007/11/07/xcode-cpupaletteapp/
Best Regards
fidel
April 13th, 2010 at 03:52
Thanks for the tip! I’m trying to figure out what is wrong with a Mac Pro, first generation. It’s been freezing quite frequently, sometimes seconds after booting up, sometimes 30+ minutes, but pretty consistent. Sometimes one of the CPU diagnostic LEDs goes red when it freezes, but I ran four instances of yes > /dev/null for about 30 minutes without any freezes. I also ran memtest for a few hours without incident… so I think the Mac Pro may simply not want me to get any work done.
April 13th, 2010 at 07:08
@bvac
hi – glad to hear this post was helpful for you.
May i ask how those freezes happen & look like on your Mac Pro?
Since when does that happen? (pre or post 10.6.3?)
I’m asking as i am having similar issues here since some days – Mac Pro 1.1 like you.
Best Regards
fidel
April 13th, 2010 at 19:17
Hi fidel,
It’s hard to tell how the freezes happen. Earlier this year I started getting artifacts on the screen, lines of random color, pixels that looked stuck or broken but really weren’t, et c. so I thought the video card was at fault. Then it began to lock up on occasion, so I figured that maybe an upgrade to Snow Leopard would smooth over some of the problems.. and that’s when it began locking up almost immediately after booting.
I swapped out the RAM, trying various combinations of the two original sticks and the two 3rd party sticks. Using just the original RAM made it more stable, but then I tried using just the 3rd party RAM and it was equally as stable, so I don’t know what to make of that. Currently I have all of the RAM in and I’ve been running Apple Hardware Test for about 2 hours without any problems.
In addition to the cpu stress test you outlined, I tried Cinebench and it got through it several times without freezing. What I need to do now is find a good graphics card stability test (ATI X1900) and do a thorough hard drive check. A few years ago my Windows machine couldn’t go all of 10 minutes without crashing and it turned out to be bad sectors on the HD.
What are your crash patterns like?
April 13th, 2010 at 19:26
Hi Bvac,
well for me it started with 10.6.3 (first impression)
My debug problem is that i started playing with other topics at the same time (added a pcie eSATA card & realizing an issue with 2 FB-Dimms.
Apart from the non-clear source the pattern is as follows:
* screen goes black
* computer is no longer accessible via network (ssh etc)
a quick reboot (lovely) helps usually – while it might jump again into that black-screen mode directly on login (happened 2 times so far)
In addition – this happens “only” sometimes – so i am far away from being able to reproduce it.
Regarding your memory tests:
Have you ever tested memtest86 for osx?
Best Regards
fidel
April 13th, 2010 at 19:36
I used the memtest available at this page: http://www.command-tab.com/2008/01/11/how-to-test-ram-under-mac-os-x/
Ran it for a few hours, no incidents. I think what I might try is installing one stick at a time and testing it by itself. But it’s looking more and more like RAM is not the issue for me. Have you tested your video card in any way?
April 13th, 2010 at 19:40
Thanks for the link.
Well – in my case i def. had a trouble-causing RAM – but i don’t think either that was the reason for my issue in general.
Regarding GFX
No test at all – to be honest i do not even know a good method to test my card. I guess it’s the same answer for you right?
April 13th, 2010 at 19:58
Cinebench has an OpenGL/video card stress test but it says that my card (ATI X1900) doesn’t have the required features to run it. There’s also supposedly a mac version of SPECViewperf but I haven’t been able to find it
April 13th, 2010 at 20:17
regarding Cinebech:
i can start the Cinebech OpenGL Test – but get the following error message during the test
>> https://dl.dropbox.com/u/223435/public_trash/20100413_210933_ss.jpg
Pressing ok continues the test but without final result or similar.
regarding SPECViewperf:
never heard of – gonna start my search and report if i stumble upon something interesting.
April 13th, 2010 at 20:31
Cinebench measures how your video card renders a scene compared to their baseline render, that error only means that the pixels your card renders are not 100% accurate. Running it on a loop as a stress test should still be fine though.
April 13th, 2010 at 20:33
yes – it works perfect to generate some stress on the openGL front