Skip to content

Checking your reading list…

Retry

Stay curious. Build better.

Appearance

Choose how BestHub looks on this device.

Changes apply immediately.

Search articles

Open Discover with these filters

Suggested searches

Operations 8 min read

macOS Optimization Guide: Disabling Time Machine, Hibernation, Enabling noatime, RAM Disk for Temp Files, and Other Performance Tweaks

This article provides a comprehensive set of macOS performance optimizations—including disabling local Time Machine backups, turning off hibernation, adding the noatime mount option, configuring RAM‑based temporary and cache directories, and disabling unnecessary SSD features—to improve system responsiveness and battery life.

After upgrading to macOS 10.8 Mountain Lion, the author sought to apply optimization techniques similar to those used on Linux and Windows, focusing on SSD trim, disabling file access timestamps, and turning off hibernation.

The following specific measures are described:

2.1 Disable Local Time Machine Backups

Run the command: sudo tmutil disablelocal To re‑enable later, use:

sudo tmutil enablelocal

2.2 Disable Hibernation

Execute: sudo pmset -a hibernatemode 0 Then remove the sleep image (for older systems):

sudo rm /var/vm/sleepimage

2.3 Add noatime Mount Option

Create a launch daemon plist (com.nullvision.noatime) with the following content and place it in /Library/LaunchDaemons/com.noatime.plist:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
    <dict>
        <key>Label</key>
        <string>com.nullvision.noatime</string>
        <key>ProgramArguments</key>
        <array>
            <string>mount</string>
            <string>-vuwo</string>
            <string>noatime</string>
            <string>/</string>
        </array>
        <key>RunAtLoad</key>
        <true/>
    </dict>
</plist>

Set proper ownership and reboot, then verify with mount that the root partition shows the noatime option.

2.4 Move Temporary and Cache Directories to RAM Disk

Use the following script (saved as MoveTempFoldersToRamDisk.sh) to create RAM‑based filesystems for /private/tmp and /private/var/run:

#!/bin/bash
# ... (script content omitted for brevity) ...
RAMDisk /private/tmp 64
RAMDisk /private/var/run 32
# Additional RAMDisk commands can be added as needed

Make it executable ( chmod 755 ~/MoveTempFoldersToRamDisk.sh) and run with sudo ~/MoveTempFoldersToRamDisk.sh, then reboot. After reboot, mount will show entries such as:

/dev/disk1 64Mi 3.9Mi 60Mi 7% 989 15393 6% /private/tmp
/dev/disk2 32Mi 796Ki 31Mi 3% 197 7993 2% /private/var/run

2.5 Disable Sudden Motion Sensor (SSD only)

Run:

sudo pmset -a sms 0

2.6 Disable Hard‑Disk Sleep (SSD only)

Uncheck “Put hard disks to sleep when possible” in System Preferences → Energy Saver.

2.7 Disable VirtualBox Dock Effects

In Activity Monitor, the Dock process may consume high CPU due to VirtualBox. To reduce this, right‑click the VirtualBox icon in the Dock, select “Options”, disable “Show monitor preview”, and enable “Show application icon”, which can lower CPU usage by about 20% and improve battery life.

The author, He Weiping, is a search technology and database researcher at Qunar, with extensive experience in search, distributed systems, and database technologies.

About this article

For questions about attribution, corrections or content rights, please contactadmin@besthub.devand we will review it promptly.

performance optimizationmacOSShell CommandsRAM Disk

Discussion 0

Questions, practical examples and thoughtful responses.

Open full discussion