How to Determine If Your Mac is Stressed-Out

You wouldn't believe how immersed our Macs can get when working on numerous simultaneous tasks. The processor is truly a busy beaver. Not only is it handling the productivity applications we know are running, but it’s actually doing more in the “background” than we can shake a stick at. And, believe me, it’s a pretty large stick.

Individual applications typically have a number of sub-processes, each handling separate tasks within the application. There are data communications processes, system and data maintenance processes, processes that watch and manage network and security, processes that monitor and report on other processes, logging processes, power management processes, process processes… just tons of work to do… quietly and efficiently. However, on occasion, the Mac complains.

Sometimes, any computer can get bogged down and affect how smoothly and nimbly you can get your work done. There are other processes that are supposed to keep performance issues in check. However, because of any number of reasons, such as bugs in the program code or software incompatibilities just to name a couple, your Mac could get very much bogged down.

Our favorite fruit company gives developers and users a number of tools to monitor all this activity. There have been many discussions about the topic of troubleshooting performance issues, as there are just as many techniques and procedures. A great resource for understanding all the technical aspects and how to troubleshoot and fix issues, can be found by listening to Dave Hamilton and John F. Braun on The Mac Observer’s Mac Geek Gab podcast. This is the go-to podcast for all who want to learn about troubleshooting by gently diving into some of Mac’s (and iOS Device) technical aspects. However, new users to the Mac should not shy away from the MGG podcast because of this.

In this article, I’ll keep it real simple, and examine one of the tools to help you determine how much work your Mac is doing. This is a Terminal command called uptime

Do not be frightened away because of the word “Terminal.” Yes, it can be risky if you willy-nilly go in and issue commands without knowing what they do, but there are some safeguards in place.

You’ll need to locate the Terminal app. You can navigate to your Applications folder, where you will find the Utilities folder nested within. That’s where Terminal lives.

The Spotlight search field and drop down hits list

Spotlight makes a great app launcher

A quick way to launch Terminal is use Spotlight’s app launch technique: clicking on Spotlight’s magnifying glass in the Finder’s menubar and typing “terminal” in the search field. Most likely, the Terminal app will be one of the top hits and already selected. If so, simply press the Return key. Finally, in Finder, you can always get to the app via Go > Utilities and launch Terminal.

As opposed to the Finder’s friendly graphical user interface, Terminal is used by those who need to access the operating system at a low level. It is used generally by developers, programmers - and even plain-ole-users with a bit of a technical bent - as a general-purpose terminal emulator to issue commands directly to the Unix underpinnings of OS X.

Follow these steps to get to the core of this discussion:

Open Terminal as described above

The Terminal window and user prompt

The Terminal prompt is where you type commands to the OS

After a brief instant, you will see your user prompt indicating that Terminal is waiting for a command.

Type Uptime and then press return

You will see a line of information returned instantly by Terminal in its window.

The Terminal window and the uptime command with results

Pay particular attention to the fifteen-minute load average figure

Uptime shows you how long your Mac system has been running since your last restart. It displays the current time, the length of time the system has been up-and-running, the number of users, and the load average of the system over the last one, five, and fifteen minutes.

I call your attention to the load average part. This a great measurement indicating the amount of stress a computer is under; that is, how much work it’s doing. If bottle-necks are encountered causing processes to slow down, the result will be increased load averages. Load average figures will increase when:

your Mac’s processor is stressed,

your Mac has run out of physical RAM memory and your system is having to do a lot of data swapping to and from the disk storage, which is slower than RAM, 

Your Mac is doing a lot of disk reads and writes (Disk I/O) and the drive is too slow to keep up.

How do you know when these load average figures indicate a stressed-out processor? First, you need to know how many logical CPU cores your processor has. For example, my Late 2011 MacBook Pro is running an Intel Core i7 with four physical CPU cores. Because of something called hyper threading, it presents itself as having eight addressable (logical) CPU cores. 

So, how do you determine the number of logical CPU cores in your Mac’s processor. The quickest way to find out is to painstakingly type (or copy/paste) at the Terminal prompt the following command exactly as shown:

sysctl hw.ncpu | awk '{print $2}’

This will return a single number - the number of logical CPU cores.

How to determine the number of logical CPU cores in the Terminal window

Type this command exactly as show to retrieve the number of logical CPU cores on your processor

Ideally during normal use, none of the load averages listed should surpass the number of logical CPU cores. It’s OK for the 1 minute load average to occasionally surpass the number of CPU cores. However, keep an eye on the 15-minute load average figure. Unless you’re doing something particularly processor intensive, such as video encoding, you still need to see that load average stay below the number of logical CPU cores on your Mac. If the 15-minute load average is consistently high, your Mac is in need of an upgrade: RAM, faster drive, or better still, a shiny new Mac!

When done with Terminal app, simply Quit it.

Troubleshooting your Mac and other devices can be fun, educational, and even entertaining (to some of us). Keep your Mac happy and stress-free!