An open API service indexing awesome lists of open source software.

https://github.com/pforret/m1_ssd_tbw

Measure SSD wear (Total Bytes Written) on MacOS M1 (ARM64) machines
https://github.com/pforret/m1_ssd_tbw

apple arm arm64 m1 macos ssd

Last synced: about 1 month ago
JSON representation

Measure SSD wear (Total Bytes Written) on MacOS M1 (ARM64) machines

Awesome Lists containing this project

README

          

![bash_unit CI](https://github.com/pforret/m1_ssd_tbw/workflows/bash_unit%20CI/badge.svg)
![Shellcheck CI](https://github.com/pforret/m1_ssd_tbw/workflows/Shellcheck%20CI/badge.svg)
![GH Language](https://img.shields.io/github/languages/top/pforret/m1_ssd_tbw)
![GH stars](https://img.shields.io/github/stars/pforret/m1_ssd_tbw)
![GH tag](https://img.shields.io/github/v/tag/pforret/m1_ssd_tbw)
![GH License](https://img.shields.io/github/license/pforret/m1_ssd_tbw)
[![basher install](https://img.shields.io/badge/basher-install-white?logo=gnu-bash&style=flat)](https://basher.gitparade.com/package/)

# m1_ssd_tbw

![](assets/m1ssd.jpg)

Measure SSD wear (TBW) on MacOS M1 (ARM64) machines

## Background

* [M1 Mac owners are experiencing extremely high SSD writes (Feb 17, 2021)](https://linustechtips.com/topic/1306757-m1-mac-owners-are-experiencing-extremely-high-ssd-writes-over-short-periods-of-time-likely-thanks-to-aggressive-swap/)

The most severe cases have "consumed" about 10-13% of the maximum warrantable TBW value of the SSDs

* [@marcan42 (Feb 16, 2021)](https://twitter.com/marcan42/status/1361722552238841860)

Update on M1 SSD wear issue:
Available data suggests that write endurance ratings are not proportional to drive size.

256GB model: ~2000TB [1700-2300]
2TB model: ~5000TB [4300-6000]

* [SSD Lifespan: How Long do SSDs Really Last? (July 30, 2020)](https://www.ontrack.com/en-us/blog/how-long-do-ssds-really-last)

A typical TBW figure for a 250 GB SSD lies between 60 and 150 terabytes written

## 🔥 Usage

```
Program: m1_ssd_tbw 1.0.0 by peter@forret.com
Updated: Feb 22 22:00:20 2021
Description: Measure SSD wear (TBW) on MacOS M1 (ARM64) machines
Usage: m1_ssd_tbw [-h] [-q] [-v] [-f] [-l ] [-t ] [-d ]
Flags, options and parameters:
-h|--help : [flag] show usage [default: off]
-q|--quiet : [flag] no output [default: off]
-v|--verbose : [flag] output more [default: off]
-f|--force : [flag] do not ask for confirmation (always yes) [default: off]
-l|--log_dir > : [option] folder for log files [default: /Users/pforret/log/m1_ssd_tbw]
-t|--tmp_dir > : [option] folder for temp files [default: .tmp]
-d|--disk > : [option] disk ID [default: /dev/disk0]
: [parameter] action to perform: info/check
```

Running it (needs sudo password because of smartctl:

```bash
> ./m1_ssd_tbw info
Password:
SSD disk size: 494 GB
SSD disk used: 146 GB
SSD bytes written: 50 TB
SSD current index: 101 x
SSD max index: 5800 x
SSD wear = 1.74 %
```

## 🚀 Installation

with [basher](https://github.com/basherpm/basher)

$ basher install pforret/m1_ssd_tbw

or with `git`

$ git clone https://github.com/pforret/m1_ssd_tbw.git
$ cd m1_ssd_tbw

## 📝 Acknowledgements

* script created with [bashew](https://github.com/pforret/bashew)

© 2021 Peter Forret