Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Max your CPU usage for ... some reason? System
Okay, to be completely honest, I don't know why anyone would want this, but I found a simple way to (nearly) max out your machine's CPU usage. Perhaps it could be used to artificially load your system while testing to see how other apps perform under duress. Use some sort of CPU usage tool (like CPU Monitor) to watch the effect. Ctrl-C or close the Terminal window to stop.

To max out userspace CPU time
yes > /dev/null
To max out kernel CPU time
cat /dev/zero > /dev/null
I don't own a dual-processor system, but I'm curious what the effect is.
    •    
  • Currently 3.25 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (4 votes cast)
 
[20,359 views]  

Max your CPU usage for ... some reason? | 12 comments | Create New Account
Click here to return to the 'Max your CPU usage for ... some reason?' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Results on a Dual 533
Authored by: rdn2 on Aug 20, '02 02:20:54AM

On my dual 533 yes > /dev/null command took about 50% or so of the proccessor time from each cpu. The cat /dev/zero > /dev/null command seemed to only take about 15% from each... In both situations the machine was still very responsive...



[ Reply to This | # ]
or run OS X on a G3
Authored by: Treavize on Aug 20, '02 02:36:06AM

I don't really need this hint as I run OS X on a 450 G3. I use CPU Monitor, and it will let me know when I have tapped out the cpu. This happens 3 or 4 ties a day.



[ Reply to This | # ]
Why would you use this?
Authored by: monkeyvoodoo on Aug 20, '02 06:14:01AM
I just have one question. How is this a MacOS X hint?

This is something that will work on any *nix system, and really doesn't seem to hold any real value to the average user (unless I am completely unaware of some group of people who like their computer to run slow).

Perhaps what this site needs is a "Stupid Computer Tricks" section, or something...

[ Reply to This | # ]

Why would you use this?
Authored by: beastie on Aug 20, '02 07:13:54AM

hey no flames please!

yes it is not very useful hint, but i think it's amusing and may be of interest to some.



[ Reply to This | # ]
Testing...
Authored by: robg on Aug 20, '02 08:28:01AM

I used it last night to see what would happen with iMovie rendering an effect, iTunes playing, and the CPU struggling ... amazingly enough, not much happened at all! But mainly it's a mildly amusing diversion.

If I use the criteria that if a UNIX hint submission works on any UNIX system then it's not an OS X hint, I wouldn't be able to run most of the UNIX hints! Probably 99% of the UNIX hints will work (perhaps with some modifications) on most all UNIX systems; the exceptions are things like GetFileInfo, SetFileInfo, cpMac, etc. That's part of the beauty of UNIX ... learn once, use anywhere.

-rob.



[ Reply to This | # ]
Why would you use this?
Authored by: Likos on Aug 23, '02 12:53:50PM

I was having problems with my machine crashing on high loads. This hint would have helped me immensely when I wanted to artificially increase CPU loads to troubleshoot. (Ended up Dual 1Ghz was overheating. Silver thermal compound on CPU's solved issue)

Thanks for the tip!

Mano



[ Reply to This | # ]
Why would you use this?
Authored by: uochris on Jan 12, '06 09:54:36AM

I'm currently working on an iMac that presents an issue only when the CPU is under heavy load. This hint makes it a snap to reproduce the problem. I for one would like to thank the original poster for this hint.



[ Reply to This | # ]
yea it's useful
Authored by: the_shrubber on Aug 20, '02 10:38:30AM

I've got one of those bum heatsink screws that i've not gotten around to replacing. Right now, to prevent my machine from crashing, i just run it with one processor. This hint would be a useful for testing purposes; i could make the computer crunch crunch crunch, and watch it (not) crash. Haven't tried it yet though.



[ Reply to This | # ]
PowerMate+CeePeeYou = Disco!
Authored by: victory on Oct 15, '02 04:30:27AM

Okay, so I may have actually found a marginally useful(?) application for this hint -- tonight I got a Griffin PowerMate USB knob ('blue throbby-thing') and was thrilled to find that it works with a favorite haxie of mine: Unsanity's CeePeeYou menubar CPU load monitor. Basically, CeePeeYou can be configured to flash the PowerMate's blue LED at a rate that corresponds to the current CPU usage. The heavier the system load, the faster the light flashes. I wanted to see what it would look like under max load. Well, using this hint, I got the PowerMate flashing like a strobe light!



[ Reply to This | # ]
Dual CPU
Authored by: yrn1 on Feb 19, '03 10:46:26AM

Just run yes > /dev/null twice (in two terminals or put one in background (CTRL-Z bg) and start another)

If you just run one, it will keep 1 CPU fully occupied. I wonder why it keeps on switching between the two CPUs though (which is why they both seem to be at 50%). This is not very optimized, since switching CPU has some overhead.



[ Reply to This | # ]
Totally useful
Authored by: brandonarbini on Mar 22, '06 10:48:37AM

I have a problem with one of the fans on my PowerBook. I needed to find a way to heat up the CPU to cause the fans to turn on to hear the wonderful cruching noises the fan makes. Exactly what I was searching for. Thanks for the hint.



[ Reply to This | # ]
Max your CPU usage for ... some reason?
Authored by: fractacular on Dec 21, '06 07:00:12AM

Thanks for the hint. I am sick in bed today and the heat is not working too well in the apartment. My powerbook is freezing cold in the morning, since it sleeps in my cold room at night, and I wanted to warm it up as fast as possible to put it in my lap as a portable heater and so I could check my email, etc..

Now it is toasting up quite nice -- thanks!!



[ Reply to This | # ]