Mac OS X problems (and solutions): sytem slowdown and DVD burning

by Uche Ogbuji

Problem 1: Extreme slow-down
Problem 2: DVD-R burn failures

Problem 1: Extreme slow-down

Lori's computer is an iMac G4 1.25GHz, 17" monitor running Panther. The first problem we ran into was an excruciating system slowdown. All of a sudden apps were taking upwards of 5 minutes to launch or respond to UI actions. Low-level ops such as window drawing and widget response was not affected. It seemed more things that the apps had to actuall process in specific code. In addition start-up seemed very slow: sometimes up to ten minutes from power on to complete desktop.

Lori called AppleCare three times (we bought the 3 year support extension). Overall I'm a bit concerned about the cluefullness level of their support. I'd say based on the people we spoke to it's a notch below the savvy of Dell support techs (the other company I've had to call for tech support). To be fair, it seems they start with the not-so-savvy folks to screen out the CD-tray-as-cupholder level of support issues. The third time Lori called she did seem to get transferred to a more technical handler, but even then they didn't seem hip to the fix that I eventually did find.

But I'm getting ahead of myself. The first techie said that the whole problem was low disk space. True enough we had only about 4GB left on an 80GB drive, but I was still surprised that this would have the effects we were seeing on a BSD-based OS. Nevertheless we dutifully nuked 20GB of crud (which took forever because of the system sluggishness: just navigating finder was a click-and-go-get-coffee experience). Freeing up disk space had no effect.

So Lori called back. The second techie seemed to think that sufficient reboots would do the trick. Amazingly enough, this did work on the third reboot (though I never believed the "fix" would stick). Surely enough, the system went back to the super-slowdown later on the very same day.

I tried upgrading the 256MB RAM to 512MB, even though Activity Monitor wasn't showing memory bound or CPU bound problems (note: the dmesg logs weren't much help except as a precise record in timestamps of the super-slow startup). No dice. Side note: opening up the unit to perform the upgrade, I was once again impressed by the tidiness and attentiveness of Apple's design. These really are slick machines, even though the software often doesn't quite "fit my head".

I threw up my hands and went Googling hard (a more superficial googling earlier hadn't yielded much). It did seem that mny others had run into the slowdown problem with the update to OS X 10.3.6. When Lori and I thought about it, her problems did start about the time of that upgrade. I saw some posted suggestions, including clearing font caches (not an issue in our case). Nothing worked until I started to come across discussions of disk permissions "repair".

I ended up going to Disk Utility (I found it in Finder under Applications -> Utilities ). I selected the HArd drive volume and clicked "Verify Disk Permissions". Thousands of errors scrolled by, so I then clicked "Repair Disk Permissions". There was no immediate effect. but after a reboot, the system was back to its old, snappy self. Hallelujah.

An amusing epilogue is that Lori happened to be on the phone with techie number 3 while I was applying the permissions fix. This time she'd apparently been shunted to one of the more advanced techies. When Lori told the techie of my fix, the techie seemed to sound as if it was a kooky idea. Nevertheless, the system has been in good order ever since. I hope Apple soon educates its support staff about the permissions fix, which is, after all, a very easy fix to apply.

Problem number 2: DVD-R burn errors

Shorter story this time. We were having trouble burning DVD-Rs in iDVD 3 (but not in Roxio Lite for OS X). Burns would fail on Memorex and Imation 2x DVD-R media as well as on super-cheapo Comp-USA media (no surprise on the latter score). They seemed to work reliably on Apple media and TDK 4x media. I went to Best Buy today where Memorex 8x media was on sale, but the first burn on this media also failed. I smelled a rat at this point. Back to Google.

I ended up finding this posting and tried the suggested Energy Saver settings (actually, we set "put the computer to sleep when inactive..." to 1 hour rather than "none"). Bingo. That did the trick. No bad burns since then (just as well, because we were getting fed up with coasters). I'm surprised that iDVD doesn't automatically tweak the system sleep settings to avoid such problems. Maybe it does so in the iDVD4 update?


2004-11-27 20:59:36
A minor nit.
Do you really have 512GB of memory? That seems a bit over the physical limits of the system.



2004-11-27 21:24:52
A minor nit.
Oops. Indeed. Corrected in the article. Thanks.
2004-11-27 22:12:12
Periodically fix permissions
I put the following into /etc/weekly.local:

#!/bin/sh -

if [ -x /usr/sbin/diskutil ]; then
echo ""
echo "Repairing permissions:"
diskutil repairpermissions /

My permissions get repaired every time the weekly periodic job gets run.

2004-11-28 07:02:30
Repairing permissions
Repairing permissions is my first step in problem-solving most strange situations, from printing problems to apps not launching to volumes not mounting and more. I would've added this to a cron job as someone else suggested except my computer sleeps at night. So I manually run it about once/week.
2004-11-28 09:05:15
Remember, when diagnosing and recovering, BSD programs man, sudo, top, ps, du, df, and kill are all available for your use. Terminal (xterm with a scroll bar) is available under /Applications/Utilities. Console (also found in Utilities) can be opened to check whether running programs are throwing out any diagnostic messages. If the gui is unresponsive, log in remotely via ssh (this has to be enabled before the trouble starts [System Preferences, Sharing, Remote Log In]) and proceed with command line tools. Tcsh used to be the default shell, but nowadays it's bash. A standard OS X install has no root user. Members of the admin group may be given short term permission to have root's privileges through the sudo command.

If your running apps are big memory users, the needed memory (beyond the 256MB) is coming from the hard drive, which motivated the first useful advice you got. When there's more free space, the kernel can more quickly find a place to drop a page. But paging/swapping/thrashing issues, even with a lot of free hard drive space, result in significant operational degradation and are ultimately addressed by doing less or increasing RAM. All this offered as humble opinion, of course.

2004-11-28 14:57:56
Slowdowns and fixes
Just a few of my own opinons ;-)

1. re VM

To check virtual memory (vm) issues, first run vm_stat (command line) and see what it reports. You can also glean similar info from Utilities>Activity Monitor but I prefer vm_stat's report. Also the command-line is (seems!) generally more responsive than the GUI when the system is stressed.

From what little I know (...), Apple's vm system has two traits that can cause issues on low disk space:

1. the vm files seem to be allocated in exponentially-increasing sizes: 64Mb, 64Mb, 128Mb, 256Mb, etc. Of course this means that if you cross the threshold to some very large vm size, you can suddenly have little disk to play with. Have a look in /var/vm is you're curious.

2. I am under the impression that once allocated, these vm files seem to persist (indefinitely?). (True?, anyone) If true, that'd mean the only fix on pushing the VM too far is either delete a lot of files (or shift them to another volume) or reboot to start the vm file allocation from "zero" again. (You can recover space within vm space by closing apps and windows, but I'm talking about recovering the disk space allocated here.)

On that note, does anyone know how to ask the system to try clean up the virtual memory to see if it can close (delete) one of the vm files? For example, it'd be nice to be able to recover the vm space a runaway app created without re-booting.

Personally, I like to see Apple allow an installation option to create a separate vm partition, as you can in Linux installations. Prevents user files from conflicting with system requirements. An ounce of prevention, etc...

2. re Permissions

I've seen advice that you ought to consider repairing permissions before and after every software install that requires a reboot. The trouble I have with this advice is that if this were true, surely Apple would have included this into its installer by now, so surely there must be more to it than this? Anyone?

3. Runaway apps eating CPU

Another "slowdown" I've seen on a system of mine quite frequently is a app running away and eating all CPU (metaphorically speaking, of course :-) ). Use Activity Monitor to spot the culprit. Sometimes just closing a window or two in the guilty app is enough to get a fix. E.g. Firefox is right now using ~45% of the CPU whilst doing nothing much. Closing one particular window has dropped this to around 7-8%. This is the most common slowdown I get on this particular system.

4. A little whinge ;-)

One of my (few) long-standing disappointments with OSX is the frequency with which I have to reboot the system for one reason or other. You very rarely reboot Linux systems for software installs or altering settings files, etc...

Hmm, this got rather long. Excuse my using the bandwidth, but I hope this is useful for someone.

2004-11-28 16:49:26
Rebooting Panther
One of my (few) long-standing disappointments with OSX is the frequency with which I have to reboot the system for one reason or other. You very rarely reboot Linux systems for software installs or altering settings files, etc...

To to provide a bit of balance to this experience (which I'm sure is valid): I've been using Panther since it's come out, and have found it extremely stable. I've only needed to reboot when software updates dictate (and I run a laptop). My current uptime is 16 days.

2004-11-28 17:23:39
Rebooting Panther
Yes, but that is my point. On Linux and other Unix-based systems you rarely have to reboot, even for software updates. On OSX you're doing it relatively frequently. Bear in mind that my time perspective is different to your's - I'm comparing OSX with other Unix-based systems, not OS9 or Windows. OSX is certainly more stable than OS9 (can't speak knowledgeably enough about Windows), but
16 days is nothing when you compare it with other Unix-based systems - its a different comparison.

Its also useful to distinguish between uptime and (software) stability. The core OS might be very stable, but have relatively short uptimes due to requirements to re-boot for other reasons.

The reason re-boots irk me is that you're forced to bookmark all those web pages you've got open, close all the apps, noting what you were working on and then undo all that on the system coming back up. Its quite a disruption on workflow. I tend to need things to stay open, so its disruptive for me. For others it might not be much of an issue.

Don't think I'm trying to knock OSX - I do use it by choice. Its just that long uptimes were something I looked forward to and haven't quite gotten (yet!).

2004-11-28 22:08:28
Rebooting Panther
I must say I agree with this to some extent. Uptimes on my laptop running Fedora Core Linux are usually well over a month, and this is just because of situations where i run out of power (ACPI on Dells is one weakness I've experienced under Linux). On my desktop, uptimes usually stretch upwards of 120 days and on company servers running Linux, we often go over a year.

I was a bit shocked when tech support person #2 told Lori she should be rebooting Mac OS X every day. I know it's far more stable than that and I think maybe it's not in their best interests to give the impression OS X needs as much ginger treatment as Windows.

I like what Apple has done with building a kick-ass GUI on top of BSD, and I appreciate that OS X itself is relatively young and has not had the time to mature as much as the underlying BSD. I expect as time goes on, Apple will ll get things to the point where the whole enchilada is as long-term stable as bare BSD or Linux.

2004-11-28 22:16:54
Great insights, all (and update)
Thanks. You've exactly aided my purpose in accumulating all this useful wisdom on these issues in a place, so that others don't have to piece together the knowledge as laboriously as i did. I'm learning a great deal from these comments.

For one thing, thanks for the reminder that all the UNIX basics are a command line app away. I've already started using the terminal more.

An update: just today the computer became sluggish again. I manually fixed permissions again and rebooted. Fixed again. As a result, I've added the repair job to weekly.local, as suggested in comment below (and maybe I should make it daily). This sounds like something Apple might want to set up by default.

2004-11-29 05:58:53
more on the "why" would have been nice
What is missing from the troubleshooting account is a discussion of why the permissions needed fixing so badly - i.e. which permissions were wrong and why did this make the system sluggish.

Permissions should not normally need repairing unless some process with 'root' privileges is changing the permissions to incorrect values. Which process might that be? Are you using any 3rd-party system utility that might be screwing up the permissions?

It's probably too late now unless you have logs of the permission repair, but it would have been interesting to see some examples of the files that had incorrect permissions. This might have allowed us to get a clue as to what might be causing the problem.

2004-11-29 09:47:29
more on the "why" would have been nice
Reasonable suggestion. I'm sorry it didn't occur to me when I first ran the permissions tool. To be sure, there is no way I would have been able to post the results here because it ran to what seemed like several thousands of correction report items. It seemed permissions were screwed up all over the place. But I could have posted a few representative cases. Next time, perhaps.

As for why permissions would have made the system sluggish, that's Mac OS X Fu way beyond my belt level. I simply followed a suggestion I saw a few times upon googling. I never once saw a substantive technical explanation for the permissions fix. I'd be as grateful as you if any readers could post one (or a link).

"Permissions should not normally need repairing unless some process with 'root' privileges is changing the permissions to incorrect values. Which process might that be? Are you using any 3rd-party system utility that might be screwing up the permissions?"

Doesn't sound likely. Lori's iMac usage is about as plain jane as it comes. We have hardly any third-party software on it, and the only third party app I'd describe as a "utility" is Roxio's CD/DVD burning software, which we rarely use. Pretty much all we run on it regularly is Safari, Mail, iTunes, iDVD and iPhoto. I've used Keynote for a couple of presentations (though until it has solid export to something can read, or that I can otherwise play back in Linux, I'm not likely to be able to use Keynote again, nice as it is). That's it. No obvious permissions-munging monsters there.

2004-11-29 10:45:29
more on the "why" would have been nice
I mentioned one app that might do this in my (overly long) message: installers. Not a 3rd party app, though.
2004-11-29 11:29:17
more on the "why" would have been nice
Good point. In almost all the postings I saw about the repair permissions fix, it was accompanied by a guru type saying "I always repair permissions before and after any software install or upgrade". But like you mentioned, this seemed a remarkably sophisticated precaution to impose upon the average user. As you ask, if this is indeed sound practice, why would Apple not build such a step into their installers?
2004-12-17 13:15:12
more on the "why" would have been nice
Your point seems uneducated hayne.

If his permissions were slowing him down (which has happened to me before) there would be hundreds of repairs required. Reading his article reminded me that another repair may be in need and a repair is taking place.

it has been running now for about 2mins and it hasnt even reached a 5th complete. As for the permissions being repaired they are flashing past the window at such a rate that they cannot be read.

Try the repair for yourself and find out.

2004-12-17 13:21:54
Rebooting Panther
It is not neccecary to reboot immediatly when the update/whatever asks.

I frequently hide the window using the apple+H command and then just carry on till either i turn off my mac anyway or i have nothing else to do and i may aswell.

by the way my disk permissions havent even reached a 5th yet. I think maybe this was a good idea.