Skip to main content

Your Mac slow? Disable Spotlight in Snow Leopard

·228 words·2 mins· ·
MacOSX Spotlight Diskio
Ariejan de Vroom
Author
Ariejan de Vroom
Jack of all Trades, Professional Software Craftsman
Table of Contents

For some time now I’ve experience my mac to be very slow. Opening Vim would take minutes. Creating a new Tab in iTerm would take more than 20 seconds. What the hell is going on - this is a brand new MacBook Pro! ~ After investigating, using Activity Monitor I discovered the following:

  • CPU’s idling at 3-5% usage
  • +500M free RAM
  • +200G free disk space
  • Negligible amount of network traffic
  • Very high amount of disk I/O writes (> 450w/s)

What’s causing disk I/O?
#

So, something is using my disk. But what? The solution is to use the iotop utility:

sudo iotop -C 5 12

A common entry here is the mds procoess, which has an insane amount of BYTES. So, this mds process is causing a lot of I/O, causing things to get slow.

What’s the mds process do?
#

A quick Google search reveals that the mds process is actually the Spotlight indexer service.

Disable Spotlight
#

I don’t use Spotlight at all, so let’s disable it - preventing the disk I/O.

sudo mdutil -a -i off

That’s all. Spotlight indexing disabled. After a few seconds the disk I/O dropped from ± 450w/s to 0w/s. Vim starts ups again within a seconds. I’m happy.

Enabling Spotlight
#

If, for some obscure reason, you want to re-enable Spotlight, use the following command:

sudo mdutil -a -i on

Related

Hide 'Last login:' on bash login
·82 words·1 min
Bash MacOSX
Run Internet Explorer 5, 5.5, 6 and 7 natively on Mac OS X Leopard or Tiger
·238 words·2 mins
Blog Features Apple Mac OS X MacOSX Osx Leopard Tiger Mac Windows Internetexplorer Explorer IE IE7 IE6 Parallels