Please read the update at the end of this post.
Hi,
I have Mac mini m1 256/16 for almost 8 days. After those 8 days I can see 0.9 TB written.
From what I found on the web this ssd should last for ~~150 TBW. After 8 days I have 0.9 TBW
I checked on my MacBook Pro 13" from 2018, 256/16 as well. I used both machines for the same task (99% of time it's coding, swift, javascript etc).
Macbook 2018 - 47.5 TBW (after over 2years and 3-4 months)
Mac mini m1 - 0.9 TBW (after 8 days).
On both machines I used the DriveDx tool to check it.
To be honest I'm a bit surprised and scared at the same time. With this I should be near the 150TBW limit in next ~~2 years. Normally I would be like "ee ok, I will just replace it" - but here, with Mac mini I can't
Any thoughts on this?
My addition:
Mac Pro Big Sur 10 months - ~ 67TB
MacBook Pro M1 5 months - ~ 51.4TB
Something's not right. But last few days the GB/day seem to have dropped on 11.3b7
-HaraldS
How to install smartmontools
Open Terminal. You may do this by searching for
terminal
with Spotlight, or by navigating to
/Applications/Utilities/
and double clicking the Terminal app.
Download Homebrew. See the instructions at
https://brew.sh. You may also enter the following command in Terminal:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
.
Then, run this command:
brew install smartmontools
.
You may run the following command after it installs:
smartctl -a disk0
.
The appropriate tool for Apple Silicon (M1) is at
/opt/homebrew/bin/smartctl
, while the Intel analogue will be at
/usr/local/bin/smartctl
.
If all that is too complicated, you can download and install my simplified version that just displays relevant data from your internal NVMe SSD. It is equivalent to the final pane of
smartctl -a disk0
.
An
installer package is available on GitHub that will install into
/usr/local/bin
after you supply your admin password. Once installation is complete, you can run the command with:
/usr/local/bin/smartTBW
.
See the code.
A list of tweaks/fixes to try to fix excessively high writes on M1
by @TheSynchronizer
These are ordered by most effective in reducing writes, so it's a good order to try them in. For relevant screenshots, go to
this thread.
- Using a browser with tab discarding - As of Big Sur 11.2.3 this is the most effective step to try to reduce writes. Do note that you're only going to notice improvements if you browse with more than 5 tabs, or if you often close and open new tabs.
Currently, Safari is unfortunately often a major culprit in writing excessive data to the SSD, especially due to it's excessive website data caching. Safari will often cache any tab you close to 'Safari Web Content (Cached)', which is kept in your memory, and if any other app requires your RAM the cached website data gets written as swap to the SSD. Secondly, Safari has no tab discarding/sleeping features which means that the more tabs you open, the more memory used, which leads to excessive SSD swap writing.
Solution: Switching to one of the many alternative M1 native browsers available, and installing a tab discarding extension such as Auto Tab Discard. Many viable options exist, but in terms of memory efficiency the best options include Brave, Firefox, and Vivaldi. Alternatively you can also use Chrome, or Microsoft Edge but Edge lacks the cache disabling flags and it requires setting the Edge cache folder to Read Only. All of these browsers support Auto Tab Discard (Firefox has it in it's native extension store), with Brave, and Vivaldi both being Chromium browsers which allows them to access the large Chrome Extension Web Store.
Once you choose one of these browsers (feel free to try them all), the next step is to download and configure Auto Tab Discard. This extension releases the memory of tabs that do not need to be actively taking it, but your scroll position on the page is preserved so that when you click back on the tab it appears as if nothing happened. Once you've installed ATD to your browser, click on the extension icon and go into options, and here you can configure how you want ATD to behave.
I recommend discarding inactive tabs after 1 minute, when the number of inactive tabs reaches 2. Set maximum number of tabs to check for discarding per automatic discarding request to 500, and the number of allowed simultaneous discarding jobs to 1000. The rest of the options are up to you.
The last optimisation step to take is to turn off browser caching.
For Brave / Vivaldi: open a new tab and type chrome://flags .Once in here, search 'caching' and enable'Turn off caching of streaming media to disk while on battery power' and 'Turn off caching of streaming media to disk', and disable 'Back-forward cache'. Restart the browser and you're done.
For Firefox: open a new tab and type about:config .Accept the warning message, and search 'cache'. Turn all the browser.cache settings to false by clicking on the 'true' value.
- Adjusting pmset settings- pmset on M1 is responsible for how the mac acts during sleep. On the M1 it is very limited compared to Intel macs, and essentially all the options that are available are safe to toggle on and off. If switching from Safari as above is not enough to fix your writes, then this is the next best step to try.
Open Terminal and type "pmset -g" - this will give you your current pmset settings.
I've set all of the following options to 0:
- powernap - SleepServices - womp - networkoversleep - ttyskeepawake - tcpkeepalive
and have noticed no difference to the function of my M1 mac or any services such as iCloud / Messages syncs etc.
To set them to 0, simply type "sudo pmset -a powernap 0", then enter your password, and press enter. Replace 'powernap' with each of the other setting names to toggle them all to 0. After you do them all, you can check the settings again using "pmset -g".
With all of these options set to 0, my mac writes significantly less data during sleep. Note that the only function that is disabled AFAIK is Remote Locking the Mac from Find My when it's sleeping and connected to Wi-Fi, so if you need this function you will be unable to disable some of these. And if you do notice any other functional difference, simply set them back to 1 with "sudo pmset -a powernap 1".
- Limit spotlight indexing - Spotlight is a great macOS feature, but chances are you do not need to search for everything that it indexes by default. Spotlight indexing writes to the SSD, so limiting this will reduce writes.
Go to System Preferences and then to Spotlight. In here, under the 'Search Results' tab look through all the available categories, and untick any categories that you never need to search for. In 'Privacy' you can directly add any folders you never need to search in. Personally, here I've added all the folders in 'Library' (in Finder click 'Go' in the menu bar, hold option and 'Library' will show up) other than Application Support. You can add most of the folders in here to Privacy because they're generally not of interest to searching, and doing so helps limit unnecessary spotlight indexing.
- Prevent Time Machine Local Snapshots - Time Machine is a great way to backup your system to an external drive, but local snapshots are likely not useful / unnecessary for most people and just a waste of SSD writes.
Go to System Preferences and then to Time Machine. Click 'Options' and press the +, and proceed to add Macintosh HD (your whole system drive) to be excluded, then click Save.
When time comes to make a backup, simply go back into these Options and remove 'Macintosh HD' from the exclusion list to proceed with backing up as normal!
- Limit unneeded startup apps / Intel apps - Rosetta 2 is an amazing technological accomplishment allowing the M1 chip to run x86 software, however running apps through Rosetta 2 is known to take a more memory than M1 native options.
To check which apps are started up with your Mac, go to System Preferences then search Login Items - this shows which apps launch when you boot your Mac. Remove any apps from this list that you do not need / do not use.
To check how many Intel apps you're running, go to Activity Monitor -> CPU, and click the 'Architecture' tab which sorts the app by Intel apps first. Consider finding M1 Native versions of any Intel apps, or closing them when you don't need to use them.
Conclusion:
With all of these steps to try, it's very likely you can reduce your excessive writes to levels that are healthy for the lifetime of the Mac.
To check how healthy your writes are, go to Activity Monitor, then to Disk, and note down the number of 'Data Written'. Next, go to Terminal and type 'uptime', and note down the result. Days are '24 hours'. Take into account that Data Written will count external disk writes, so if you've written to an external drive since booting this value will be innacurate.
Simply divide the number of GB written by the amount of hours your mac has been 'uptime' since last boot. If you're getting under 5GB written per hour, you will have no issues with your SSD during the lifetime of your M1 mac (e.g. if you're writing 5GB / hour, that accounts to 14 yearsminimum of SSD life on a 256GB SSD).
Hope this helps anyone who is experiencing high writes on M1!
I am additionally suggesting an update to 11.3. I have just recently updated to 11.3, currently have 65 Tabs open, and my Swap Used is at 0 for the first time since purchasing this machine. ---
leons
Edit: 23/05/2021
The person who first reported the M1 SSD issues says it's been fixed in 11.4. Says it could have been a kernel bug.
Edit: 2/06/2021
We were confirmed it was indeed a XNU/kernel bug.
Update to 11.4 to fix the issue.