Solutions Log by Dan Reiland

1Oct/090

Disable Spotlight in Mac OS X 10.6 Snow Leopard

On occasion I need to process large volumes of text locally. Spotlight dutifully attempts to index this data, bringing my system to a crawl.

Proactively disabling Spotlight is a sure way to avoid such issues and here is how to do it:

Disabling Spotlight in Snow Leopard is pretty easy, launch the Terminal and type the following command:

sudo mdutil -a -i off

This tells the Spotlight manager to disable all indexing on all volumes, the command will require your administrative password to execute.

Re-enabling Spotlight in Mac OS X 10.6 Snow Leopard is just as easy, just reverse the command to:

sudo mdutil -a -i on

Now Spotlight indexing will be back on and work as usual.

NOTE: mds and mdsworker will persist in the process table; this is normal.

8Jul/090

Enable opportunistic locking with Sun SMB service on Solaris Nevada

The primary reason for implementing this is performance.

From Microsoft:

Opportunistic locking (oplock) is a mechanism that allows a server to tell a client process that a requested file is only being used by that process. The client can safely do read-ahead and write-behind as well as local caching, knowing that the file will not be accessed or changed in any way by another process while the opportunistic lock is in effect. The server notifies the client when a second process attempts to open or modify the locked file.
Reference: http://msdn.microsoft.com/en-us/library/dd327670.aspx

The snippet:

svccfg -s smb/server setprop smbd/oplock_enable=boolean: true