Diagnose Common Speed Problems

Saying “My Mac is slow” is like going to the doctor and saying, “I feel yucky.” You won’t get anywhere with a cure—or even a diagnosis—unless you can be much more specific. In this chapter I help you to figure out exactly which aspects of your Mac are too slow (so I can direct you to appropriate fixes) and to actually measure how slow (so we can measure again afterward and determine how effective the fixes were).

We’ll work from general to specific. First, I explain the basic diagnostic principles you’ll use throughout the remainder of the book. Next, I show you how to benchmark your Mac’s raw performance so that you have a baseline against which to compare future results—something you should do regardless of what particular speed problem you’re trying to solve. Then I discuss tools that provide a real-time display of how various system resources are being used at any given moment, which helps you identify software that may be slowing you down. Finally, I provide links to tests described elsewhere in this book that help you narrow down several specific speed problems.

Understand Diagnostic Principles

Something has gone wrong. Your car has stopped moving, or your foot hurts, or your Mac is too slow. You want to solve the problem, but you can’t do that without understanding the cause. Sometimes it’s obvious: your gas gauge is on empty, there’s a rock in your shoe, or you’re trying to edit a 4K video while cloning your hard disk and scanning for malware. But when it’s not obvious, it helps to have general techniques to figure out the source of the problem so you can choose an appropriate solution.

One of the most powerful diagnostic techniques, which can be used to find problems with nearly any complex system, is to change just one thing and check whether the problem still exists. This technique isn’t foolproof; problems might have multiple causes, and sometimes several factors interact in ways that are difficult to pin down. But it’s an excellent starting point. If you try changing three things and the problem goes away, you won’t know whether one, two, or all three of those things caused the problem. So, I recommend that you internalize the following sequence of steps, which you’ll follow many times:

  1. To the extent possible, eliminate extraneous factors that could affect your test.

    For example, if you’re using your web browser to test the speed of your internet connection, quit other apps and background processes that are using your network, because they could skew your results.

  2. Measure the speed of some activity—and make a note of it for future reference.

  3. Change one thing that might affect that speed.

  4. Measure the speed again.

Then, if the problem still exists—that is, the speed hasn’t increased noticeably—repeat the steps, changing something different in step 3. (Depending on the situation, you may choose to return the thing you changed in step 3 to its original state before performing the next test, but in the absence of evidence to the contrary, your default assumption should be that if the tests in steps 2 and 4 showed the same result, then whatever you changed in step 3 was irrelevant to the slowdown.)

Once you have this basic outline down, the only things remaining to be learned are how to measure speed (which I discuss in the remainder of this chapter) and which items to try changing in step 3 (which I discuss throughout the book).

Alert readers may recognize the procedure I’ve just described as a simplified version of the scientific method: form a hypothesis, conduct an experiment to test the hypothesis, analyze the results, and then if necessary start over with a revised hypothesis. In diagnosing Mac slowdowns, as in science generally, the best-designed experiments isolate and test just one variable.

Benchmark Your Mac’s Performance

Benchmarking may sound highly technical, but it’s simple: you run an app that, after a couple of clicks and a few moments of work, spits out several numbers. These numbers represent your Mac’s overall speed and its speed at performing certain processing tasks. By comparing the numbers from two Macs, you can tell objectively how their performance differs. And, by comparing the numbers from a single Mac at different times, you can tell how changes (such as the software you’re running or the amount of RAM you’ve installed) since the original benchmark affect the performance. Regardless of the speed issues you’re experiencing, you should understand how benchmarking works and run at least one benchmark test before doing anything else.

Several benchmarking utilities exist for macOS, but for the purpose of this book I want to focus on a free app called Novabench. You can use benchmarking to determine whether, and to what extent, changes you make to your Mac successfully speed it up. (However, for some tasks you may need to Use a Stopwatch.) The procedure, as I explained in Understand Diagnostic Principles, is to eliminate as many variables as you can; run the benchmarking tool to get a number; change exactly one thing; and then immediately run the benchmarking tool again to compare the new number with the old.

Benchmark with Novabench

Novabench is a free, if somewhat basic, benchmarking app that takes just a minute or two to run and gives you a quick overview of your Mac’s CPU, graphics, RAM, and disk performance.

Novabench couldn’t be simpler to use: open the app and click Start Tests (Figure 2). Wait a minute or so for the results to appear.

Figure 2: The main Novabench window. Click Start Tests to begin.
Figure 2: The main Novabench window. Click Start Tests to begin.

In the Novabench results window (Figure 3), the main Novabench Score indicates how much work your Mac can do at this moment, given the demands on system resources; scores for specific categories appear below that. Higher numbers are better! You can either jot down these numbers, which you’ll want to refer to after making any changes and rerunning the test, or save the results in a format that Novabench can reopen (choose File > Save).

Figure 3: The Novabench results window.
Figure 3: The Novabench results window.

If you’re making a change intended to affect CPU availability or disk speed, the CPU Score and the Disk Score, respectively, will be of particular interest. Otherwise, the overall score at the top—which incorporates the results of all the individual tests—gives you a good idea of the impact your change made.

Use a Stopwatch

Utilities like Novabench and Geekbench, because they measure your Mac’s overall performance, are good to use before and after making broad changes—repairing your disk, deleting caches, adding RAM, freeing up disk space, and so on. But they don’t tell you how fast a particular activity is, such as restarting your Mac, launching an app, or saving a file. For that, you’ll need another tool, such as…a stopwatch! If you need to time an activity before and after making a change, a simple stopwatch may be the most useful measurement tool.

I recommend using an actual physical stopwatch (perhaps built into your watch or a kitchen timer) or a stopwatch app on your favorite iOS device, as opposed to a stopwatch app on your Mac, because you may be unable to run the Mac app while you perform your tests.

A few timing tips:

  • You’ll get better results if you don’t have to look for your stopwatch’s start/stop button, so that you can pay attention to the Mac’s screen; keep your finger over the button after you press it.

  • When you start timing, try to press your stopwatch’s start button with one hand at exactly the same moment as clicking a button (or pressing the power button) on your Mac with the other.

  • Identify the event that will definitively mark the moment timing should stop. For example, restarting your Mac could take several minutes, and it may not be obvious at what point the process is finished. So look for something specific, such as the appearance of a particular element on the screen, to signal the end of the test.

  • Because of the imprecision and lag inherent in manual timing, you should disregard differences of less than a second when comparing test results.

Check Your Resource Usage

Benchmarks show how fast your Mac runs before and after a change, but they don’t give you any clues as to what you should change. Which processes are running right now, and how much strain are they putting on the system? How much RAM is free? What percentage of the CPU power is available? How busy is the hard disk? To answer questions like these, turn to a tool that monitors resource usage in real time. Conveniently, macOS includes just such a tool: Activity Monitor.

Use Activity Monitor

Activity Monitor, located in /Applications/Utilities, is one of the most useful tools for determining what your Mac is up to and exactly how busy various processes keep it. Activity Monitor displays real-time statistics about all sorts of Mac behavior, but the two aspects of your Mac’s performance we’re most concerned with here are CPU and RAM usage, about which Activity Monitor can show you many details.

When you open Activity Monitor, you’ll see something along the lines of Figure 4. The top portion of the window shows a list of all the processes running at the moment and various pieces of information about each one. The window has a series of views (CPU, Memory, Energy, Disk, and Network), each of which gives you a broad overview of that resource’s current usage.

Figure 4: Activity Monitor lists your Mac’s current processes at the top, and overall system statistics at the bottom.
Figure 4: Activity Monitor lists your Mac’s current processes at the top, and overall system statistics at the bottom.

As in most list views, you can resize or rearrange the columns to suit your needs by dragging in the column header area. You can also change the sort order, by clicking a column header to sort on that value; clicking again reverses the sort order.

By default, Activity Monitor updates its display every five seconds to reflect the most recent state of your Mac’s running processes (you can change the frequency using the View > Update Frequency submenu). You should not be surprised to see things pop onto and off of the list and move up or down repeatedly as their resource usage changes over time.

Check CPU Usage

The first thing to check when you open Activity Monitor is the current CPU usage: click CPU at the top to display all your processes with their respective CPU usages, plus a graph of overall usage and percentages of total CPU power allocated to user and system processes and the percentage that’s idle.

If your total usage—User plus System in the table at the bottom of the window—is under 100%, or if it peaks to 100% only occasionally, then you have CPU power to spare; your Mac is not, at this moment, being slowed down due to CPU overload. However, this state can change at any time as processes turn on and off and each one’s load varies (and of course many other factors could be making your Mac slow).

If you notice usage remaining at or near 100% for an extended period of time, your next step is to figure out which processes are using up so much power. To do this, click the % CPU column in the process list at the top of the window to sort by CPU usage (and, if necessary, click a second time to sort in descending order, so that the processes using the most CPU power are listed at the top).

Be aware, however, that the process list at the top of the Activity Monitor window shows the percentage of a single processor core, unlike the numbers in the CPU view at the bottom of the window, which represent total processing power. So you should not be troubled to see a process with a value of 100 or more in the % CPU column; for example, if you have four CPU cores, the figures in the % CPU column could add up to 400% without anything being amiss.

Some of the processes in this list are easily identifiable; iTunes, Safari, and Microsoft Word, for instance, are listed by their actual names. But many of the items you’ll see here are background processes that don’t correspond to any app you ever see in the Dock. And, of these, some are quite likely to stress your CPU from time to time. Here are a few examples of interesting processes you might wonder about:

  • backupd: This is Time Machine’s background process for backing up your files. It may be quite high in CPU usage during its hourly run but should then turn itself off.

  • kernel_task: This is the macOS kernel—the heart and soul of the operating system. Because it’s responsible for so many aspects of what happens on your Mac, it can use up lots of CPU cycles and RAM at times.

  • mds and mdworker: These two components are parts of Spotlight. When Spotlight is actively indexing files (for example, when you first install a new version of macOS or attach a new external drive), either or both of these processes may be extremely busy for minutes or even hours.

  • spindump: When an app crashes in macOS, the spindump process collects data about what just happened, displays an alert, and offers to send Apple a report about the problem.

  • SystemUIServer: This process handles portions of the macOS user interface, such as those little icons (called Menu Extras) on the right side of your menu bar. Some of the third-party apps that display icons in your menu bar are, in fact, SystemUIServer plugins, so any CPU or RAM they use will show up as part of this process, not as an independent process.

  • WindowServer: As the name suggests, this process is responsible for drawing windows on your screen; it’s also responsible for the desktop. It’s an essential core component of macOS.

When you identify a process that seems to be taking up more than its fair share of resources, you can often quit it to free up those resources. (The next time the process runs, it will use CPU and RAM again, but possibly at a lower rate; for help making long-term reductions to CPU usage, see Lighten Your CPU Load.) However, ordinarily you should not quit a process if you don’t know what it is, unless it’s bogging down your Mac severely and you have no choice. (Processes that aren’t responding at all—ones that are frozen or have crashed—appear in red, although a process may respond and still be overusing the CPU. Likewise, a process that is unresponsive for a moment or two isn’t necessarily a problem; you’re looking for apps that remain frozen for several minutes or more.)

You can quit a normal app using the standard Quit command on its application menu (the one with the app’s name). If you need to quit a process that doesn’t appear as an ordinary app (with its own Dock icon and Quit menu command), you can select it in the Activity Monitor list, click the X button on the toolbar, and then click Quit. If the process is owned by any user account other than your own (including the root account), you must supply an administrator’s username and password after clicking Quit.

If the process doesn’t quit, repeat the procedure but click Force Quit instead of Quit. Note that some processes are essential to macOS (for example, WindowServer and loginwindow), and quitting them automatically logs you out, while others (typically those owned by root) could cause parts of macOS not to work correctly if you quit them. And kernel_task can’t be quit at all, because that would be equivalent to restarting your Mac.

Check RAM Usage

CPU and RAM usage go hand in hand to some extent, but a process that uses a lot of RAM may use only a small amount of CPU power, and vice versa. So you should check RAM usage separately. Click Memory at the top of the Activity Monitor window to get an overview of your Mac’s current RAM usage (Figure 5).

Figure 5: In Activity Monitor’s Memory view, the Memory Pressure graph provides the most useful information.
Figure 5: In Activity Monitor’s Memory view, the Memory Pressure graph provides the most useful information.

This view shows the real and compressed memory used by each process, but the most interesting statistics are at the bottom:

  • Memory Pressure: This dynamic graph gives you an instant picture of your Mac’s current overall RAM efficiency. As RAM demands increase (forcing increased use of compression and virtual memory and reducing the amount of free RAM), the colored portion of the chart grows taller, eventually turning from green to yellow and then red. As long as it’s green most of the time, you have plenty of RAM. If it spends a lot of time in the yellow and red bands, you need to add RAM or decrease the number of apps, windows, and tabs that are open at once; see Increase Your Free RAM.

  • Memory Used: The total amount of physical RAM currently in use is subdivided into App Memory (RAM used by apps and macOS itself), Wired Memory (RAM contents that are being actively used and can’t be swapped to disk), and Compressed Memory (explained earlier).

  • Swap Used: This figure is the total amount of disk space currently used for swap files. If your disk is running out of space and this number is large, the quickest way to solve the problem is to restart. Read Free Up Disk Space for more suggestions.

As with CPU usage, if the overall numbers at the bottom of the window displease you, your next step is to look at individual processes to figure out what’s using up all your RAM. To do this, click the header of the Memory column in the process list to sort by RAM usage (and, if necessary, click a second time to sort in descending order, so that the processes using the most RAM are listed at the top).

Any app’s RAM needs vary from moment to moment depending on what it’s doing. However, more-complex apps do use more RAM than less-complex ones, and the number and size of documents open in an app also contribute to its RAM usage.

In short: if a process is using too much RAM, first try closing documents, windows, or tabs in that app; if that doesn’t free up enough RAM, quit the process. As always, using an app’s Quit menu command is best, but if you can’t, selecting the process in Activity Monitor, clicking the X button on the toolbar, and then clicking Quit will also work.

Use Live Monitoring Tools

Although Activity Monitor is fantastically useful (not to mention free), it can’t tell you anything about your Mac’s performance unless it’s running—in which case it normally takes up quite a bit of screen space. And, although you can hide most of its user interface, that also gives you less information to work with. However, industrious third-party developers have produced lots of utilities that can run constantly in the background and display their information in your menu bar or a floating window, for example, giving you an easy way to keep tabs on system performance at a glance. Some go even further by alerting you to specific conditions (such as disk space that’s running lower than you prefer).

Here are a few examples of such tools:

  • Checkmate, from the makers of TechTool Pro, provides background monitoring of not only disk space and drive health but also RAM and battery functioning, file structures, and several other critical system parameters.

  • iStat Menus is a versatile, attractive, and highly configurable utility that can display detailed information in your menu bar about CPU, RAM, network, and disk usage, temperatures, and more. It can also graph your activity and alert you when parameters go beyond figures you specify.

  • MenuMeters, my favorite of the group, adds tiny, customizable indicators to your menu bar to display any or all of the following: CPU load, RAM usage, disk access activity (with usage on a drop-down menu), and network traffic (Figure 6).

    Figure 6: MenuMeters can display RAM and CPU usage, as well as numerous other bits of information, in highly configurable menus.
    Figure 6: MenuMeters can display RAM and CPU usage, as well as numerous other bits of information, in highly configurable menus.
  • Although primarily a disk repair tool (and an excellent one at that), TechTool Pro also includes a customizable alert system to tell you when you’re running low on disk space or when various other errors are discovered.

  • xScan is a beautifully designed utility that provides real-time data about RAM, disk, CPU, and network usage, as well as internal computer temperature and active processes. It also performs several maintenance tasks.

Test Specific Speed Problems

So far in this chapter I’ve shown you how to benchmark your Mac’s overall performance, which can give you an idea of how much a particular change affects its speed if you do the test both before and after. And I’ve told you how to use Activity Monitor and third-party tools to tell which processes are using disproportionate amounts of your CPU power and RAM. However, some of the sources of slow Mac performance require additional tests and procedures, which I discuss later in the book:

  • Slow network: To learn about testing for network bottlenecks, which may be on your Mac, on a remote server, or anywhere in between, see Speed Up Your Network.

  • Slow browser: If your web browser in particular seems sluggish, see Speed Up Your Browser for tests and suggestions.

  • Slow booting, waking, or sleeping: For causes of (and solutions to) slow startups—as well as delays with entering or leaving sleep mode—read Speed Up Booting, Sleeping, and Waking.

  • Everything else: If you need to test something that isn’t directly reflected in benchmarks, process activity, or other tests listed here, consider using a stopwatch. For example, you can time how long it takes to launch an app, upload a file, or rip a CD; this can give useful information to determine whether a change truly does speed up one of those tasks.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset