The mds process was too greedy


Every now and then when my mac is slow, I take a peek in the Activity Monitor, to find out what is the culprit. Today I didn’t find any usual suspect and the only odd bit was the process mds. While it was using barely 10% of the CPU, the memory it used was outrageous. I remember having only 1MB free memory left, and that mds was using 14GB of the virtual memory (this figure stuck, while the real memory one didn’t).

I had learnt that mds is in use for Spotlight indexing. I have no use for Spotlight indexing, because I use other tools or tricks. So I searched for the way to disable Spotlight and did it in the Terminal:

sudo mdutil -a -i off
Password:
/:
 	Indexing disabled.

All of a sudden the process mds jumped from using 14GB of virtual memory to 77MB of virtual memory, whee! And the system memory, of which 1MB was free, reached the comfortable level of 1.7GB, re-whee!

If I ever need Spotlight, the command above is reversed by using “on”.

You’re welcome!

Update of the day after:
It turns out I need that Spotlight indexing after all, if only to search in iCal. <sigh />
mds is on again! until it gets too greedy, that is.

sudo mdutil -a -i on
Password:
/:
 	Indexing enabled.

Fixed iCal 24-hour input problem

Since the Leopard (OS 10.5) upgrade, and until yesterday, I was quite reluctant to use iCal, for at least two reasons. Adding a new event no longer made appear the box of options, and second, it was time-consuming, after double or triple clicking on the entry, to figure out how best to input a start and end time in the box of options. For example, typing 14 in the hour field would instantly transform into 16. The up and down arrows were what I ended up using most of the time, because extending the event box with the mouse was not exactly accurate.

The reason is that I’m using custom time and date settings, a recipe that is just right for me (living in France and using English as work language) and that I spent a fair amount of time crafting and refining several years ago. I was loathe to have to touch it so as to compensate that fact that Apple had coupled iCal with input from international/regions preferences.

How easy the solution was: Open the System Preferences, look for International, select the Formats tab, look for the Times section, click on the “customize…” button, click on the hour and select “0-23” from the drop down menu. OK. Quit System Preferences. That is it.

kernel panic

Today I learnt what a kernel panic is. In fact my powerbook G4 started to experience it yesterday morning. It’s only today I learnt what it was, and how to fix (and boy do I pray I don’t have to do that again).

It all started when I opened the lid of my computer. Let’s call it Precious, for the sake of simplicity, since it is called Precious. So Precious had been sleeping all night and as I opened the lid, nothing happened. I didn’t hear the friendly rattling of the disk, I didn’t see the screen’s colours came back to life. Only the capslock key gave me an indication that Precious was still on.

After a little while I decided to sacrifice its 74-day uptime on the altar of pride (besides, it’s not really like I did have a choice) and pressed the power button. I pressed it again and after a little while I was greeted by the grey and black screen telling me in four languages I had to restart my computer. Uh oh… That was it. A kernel panic. But I didn’t know that. And it doesn’t matter, come to think of it.

So I fished out the Mac OS X 10.4 Tiger DVD and fed it to Precious. I looked for the Disk Utility in the Utilities menu and checked the disk. It needed repairing and was repaired pretty quickly. At which point I restarted and all was well. Whew. Good, because it was already time to leave the house to commute.

Nothing to report regarding the morning incident after my day at work. When it was go-home-o’clock, I closed the lid. I wasn’t done for the day and once home, I opened the lid. Guess what? Yeah, black screen again. I knew what to do, of course. Except there was nothing to repair on the disk, this time 🙁

I tried all the key combos on boot that I know of; Zap PRAM, Clear NV RAM, boot into Open Firmware. Then I tried these again *without* the battery. To no avail. Then, and since it was bed o’clock, I thought I would remove the battery and let Precious discharge all night, and see what the next morning had in store.

Nothing new. Today was Precious’ 2nd birthday. I don’t know if that’s ironic.

Anyway. I took my external HD with me and as soon as I was at the office, I called Apple Care and told them everything!. I learnt of a new key combo: “shift-ctrl-option-power”. It resets the power management unit. I also found out a little while later that it fucks up the clock. It was 31 Dec. 1969.

Where was I? Ah yes. Safe boot mode. I was instructed to trash the StartupItems dir from my Library, and then to visit the System Preferences, look for my account and remove the login items one by one.

Then I was instructed to remove the PCMCIA card reader. For good measure.

The next step was to boot again in safe mode and proceed to a backup and then to boot on the installation DVD and perform an “erase and install”.

I made an appointment at the CGASGB (Cambridgeside Galleria Apple Store Genius Bar) for 2:20 pm. At this stage, I didn’t mind at all to get a second opinion. A friendly genius did a pretty quick “archive and install” and tada! Precious was exactly how I like it! My genius sent me back home but before I left, I wanted to make sure I could close the lid and reopen it and still be happy. And I was. So I left.

The thing is that in the 20 minutes it took to be back at the office, Precious had spaced out. I called the genius and he said I needed to “erase and install”. He said also that if the problem still persisted, I would have to call Apple Care and have them set up a dispatch. All righty!

It was 4:30 pm and by 4:45, I knew my Tiger DVD was not OK 🙁 No idea why. Scratches, fingerprints? Yeah, sure. I ignored and installed anyway. That was not so smart. Precious was not fully installed. The installation stopped after 25 minutes. And I could no longer boot in safe mode.

It was so tempting to open the window and just drop Precious. Assuredly, I would get a new one.

The next two hours I spent trying to eject my Tiger DVD, and other various things. Then I ran a hardware test (the extended one). Naturellement, no hardware problems had been detected.

I called Apple Care for the 3rd time today, gave a status report and was given my new instructions: Use the retail installation disc that came with Precious when I got it. Lucky me, I have them both with me. I was advised to install Panther and then upgrade to Tiger. At this point I had lost hope that it would ever work.

It was nearly 8 pm, I think, and it was time to go home, that bit was certain, and I was wicked hungry.

[here is the dinner break that was a very enjoyable moment, and that I couldn’t possibly describe, for the sake of not spoiling this entry with happy facts.]

At 9:30 pm I booted on the Panther disc and by 10 pm, the installation was successful.
At 10:15 pm I inserted the Tiger DVD and attempted to upgrade. By 10:50 pm, it was upgraded to Tiger! By 11:25 pm I had the XCode Tools (and I’m not certain that was needed…).

Then, I wasn’t too sure whether to rsync from the external HD to the internal disk or to use the Migration Assistant. Turns out I started to rsync, then changed my mind. I cleaned up and fired the Migration Assistant. But the account I wanted to transfert was 43+ GB and the space remaining was “- 8.5 GB”. Grumble…

At 00:50 am I realised there was a huge .Trash in the account on the external HD. It freed a little less than 4 GB. Almost. I moved a bunch of big directories in the other partition of the external HD and freed enough space that the Migration Assistant eventually announced the after the transfer, the space remaining would be 855 MB. By then, it was 1:10 am, the Migration Assistant was ready to migrate, and it was done at 2:30 am.

The thing now is that the available space on my internal disk is only 1.67 GB and it’s far less than what I had before (around 9). So I suspect I didn’t do the right thing. Also, I’m not sure what happens when I restart. Will I find my settings? I hat to see such a large dock at the bottom of my screen. I prefer when it’s thin and when it appears only when I go fetch it. I don’t like the blue background so much, I prefer the image I had selected. I don’t like that the items on my desktop have icon and name and that the font is so big. I have no idea if my home-made scripts are worky. And I hate the white background in the Terminal. That kind of things.

I’ll find out tomorrow at work what was the right thing to do, and whether I can still do it 🙂

I still love this computer. Go figure.

Update: It turned out that Precious didn’t wake from sleep 🙁 The Apple Care people told me it looks like a hardware issue and that they will fix it. They’re sending a box for me to ship it to them. It will arrive Monday or Tuesday. They can’t say how long the repair will take.

I had been considering getting a personal MacBook Pro since last June (the last time Precious was being repaired –replacing the DVD drive). I made up my mind and purchased it yesterday. I’ll use it for work while Precious is borken.

Penguins

Sign cautioning against penguins
Sign cautioning against penguins

Today I learnt a few things about penguins.

My dad watched a documentary on them and here is what he said:

The male penguin looks for a rock to bring to every female penguins until one accepts it. This is the ‘go ahead’ and they make out. Then the male penguin goes to look for more rocks and builds a nest.

He said that female penguins live for about 12 years, that they start reproducing at the age of 6 and that they lay 2 eggs per year. Then he described the rock bringing little dance he saw:

He walked with his wings spread out, a penguin walk, really. And the rock was in beak. None of the female penguins accepted his rock. The little guy will have to wait till next year.

Then my dad laughed and explained:

He even brought a rock to the photographer!