Disable Bonjour by Turning Off mDNSResponder
Bonjour is a great service that runs in the background of your Mac to auto-discover network resources, that is, it’s great until mDNSResponder goes haywire. I was recently in a very creatively crafted network environment that made Bonjour absolutely freak out and tax my CPU with a million processes, so I opted to just disable the service temporarily.
Generally speaking you should leave Bonjour enabled since it’s functionality is ubiquitously used throughout Mac OS X, but if you DO want to disable mDNSResponder, here’s how to do it:
How to Turn Off mDNSResponder by Disabling Bonjour in Mac OS X
Launch the terminal and type:
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.mDNSResponder.plist
This unloads the mdnsresponder launchdaemon from launchctl, of course that can be reversed with another command, if need be.
Turn on Bonjour aka mDNSResponder in Mac OS
To reenable Bonjour simply type the following to reload the mDNSResponder daemon:
sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.mDNSResponder.plist
Both of these commands to enable or disable Bonjour will require your administrator password to execute as root, hence the use of sudo.
This is obviously for advanced Mac users who know enough about mDNSResponder and Bonjour to want to adjust the functionality, but most Mac users should never mess with this stuff.