Published Nov 18, 2026, 7:01 AM EST Shivansh began his tech journey as an avid reader of tech publications, which inspired him to launch his career in video media at Sillycorns. He has led content across multiple tech YouTube channels and Instagram accounts, crafted go-to-market (GTM) strategies for Vivo, and consulted on digital growth. Coming full circle to his roots in written media, he now delivers deep-dive tech journalism. Outside of his professional work, Shivansh loves watching movies, riding bikes, and playing cricket. Two numbers don't fit the panic around memory prices. My MacBook Air M2 wrote 8.32GB to swap in just over a week, while a 256GB SSD is typically rated for around 150TB of writes. Put those two numbers side by side, and swap wear is centuries away. Considering this, with the cheapest 32GB DDR5 kits crossing the price of $400 in the US, letting your SSD pick up some of RAM's slack can actually be sensible. The only cost you'd feel is the pause when you switch back to an app, because swap runs on small, one-at-a-time reads. RAM's first move is a squeeze, not a swap Check the compressor before you blame the drive macOS does not send idle memory straight to storage. Its memory compressor squeezes those pages inside the RAM first, and only segments that still don't fit get written out. The vm_stat command in Terminal shows how much work that layer does. On my laptop, the compressor held 9.6GB of app memory in 4.9GB of RAM, a ratio of about 2:1. Over the week, it ran 138.1 million compressions, roughly 250 for every 16KB chunk that went to the SSD. Swap only gets the overflow Read Swapouts, not Pageouts The overflow lives in /System/Volumes/VM, where my laptop had two 1GB swap files. Running sysctl vm.swapusage reported 2,048MB of swap with 566MB in use, plus the word encrypted, since macOS encrypts what it writes there. Four lines from vm_stat tell the rest. Pageins 32626006 Pageouts 78287 Swapins 333037 Swapouts 545355 In this, Pageins and Pageouts get misread the most. They count ordinary files, like app code and documents, moving between storage and RAM, so 32 million page-ins say nothing about a memory shortage. Swapouts is the line that matters. InApple's open-source XNU kernel, it grows by the size of each compressed segment written to swap, in 16KB pages, so 545,355 means 8.32GB hit the drive. At the compressor's ratio, that 8.32GB held around 16.5GB of app memory. If swap were grinding the drive down, you'd expect gigabytes an hour. The counter works out to about 1.1GB a day. And yes, every prompt in these screenshots says MacBook-Air-M4.I renamed it to show off to my cousin.It's actually an Air M2 (16/256GB) that I got on sale. Your SSD has a wear budget, and swap barely touches it Reading Data Units Written and Percentage Used Apple doesn't publish an endurance rating for its internal SSDs, but the drive still keeps the health log that the NVMe standard requires. Install smartmontools with brew install smartmontools, run smartctl -a disk0, and find Data Units Written and Percentage Used. Both come with fine print. The NVMe spec defines one data unit as 1,000 blocks of 512 bytes, counted as the computer sends them, so the extra writes a drive makes while shuffling its own data never appear. Percentage Used is the maker's estimate of life spent, updated once per power-on hour. Samsung rates the 990 PRO at 600TB written for the 1TB model and 1,200TB for the 2TB, so endurance grows with capacity. At that ratio, a 256GB drive gets about 150TB. My swap comes to roughly 0.4TB a year, or more than 350 years of that budget. Ten times the swapping still leaves more than 35 years. Swap isn't the drive's main writer, though. Activity Monitor's Disk tab showed 294.40GB written since the restart, so swap was about 3% of it, and Chrome alone wrote 63.62GB. At that total pace, the whole 150TB lasts about 11 years. On Windows 11, the paging file does this job, and Get-PhysicalDisk | Get-StorageReliabilityCounter | Select-Object Wear in an elevated PowerShell window reads a wear figure, though some drives leave it blank. Why swap feels slower than RAM, even on a fast SSD The pause has a number: 45 microseconds Apple rates the M2's unified memory at 100GB/s. Samsung's 990 PRO, a fast consumer drive, lists 7,450MB/s for sequential reads, 13 times slower, and swap never gets that number. When an app touches a swapped-out page, the kernel fetches it with a small read, and the app waits until it lands. Samsung's datasheet rates the same drive at 22,000 random reads a second at a queue depth of one, meaning one request in flight at a time. That's about 45 microseconds per read. Reading 500MB back from RAM at 100GB/s takes five milliseconds. Reading the same 500MB as 16KB pages, one at a time at 45 microseconds each, takes about 1.4 seconds, which is the hitch you get returning to a browser window you left an hour ago. Now, if you are aware of the whole single vs. double NAND thing with Air M2, you certainly understand that my drive is slower than Samsung's 990 PRO. So the 990 PRO's numbers flatter my drive. What matters more than swap file size is how often pages come back, and that's what Swapins counts. My laptop read 333,037 pages back this week, about 5.1GB. Even at the 990 PRO's 45 microseconds per read, which is optimistic for my single-NAND drive, that's at least 15 seconds of waiting in total, delivered in lumps at the moments I switched apps. When swap stops being a good deal The compressor already saved $70 of RAM Swap works well when you only need extra memory now and then, like during a big export. It works badly when you need that memory all day, because every time you switch apps, your laptop has to fetch data from storage. Memory compression shows how much this matters. On my laptop, it freed up about 4.7GB of RAM. At $15 per gigabyte, or about $240 for a 16GB DDR5 kit, that's about $70 of memory I didn't have to buy. Many laptops have memory soldered to the board, and every Apple Silicon MacBook goes further, with memory built into the chip package. You can’t upgrade those, so the only way to get more memory is to buy a new machine. Measure your swap before you spend $240 As I said at the beginning: with RAM this expensive, letting the SSD handle some of the load makes sense, and swap adds only a small amount to what the drive already writes. The cost is the occasional pause. However, to be sure about your specific case: Run vm_stat and write down the Swapouts and Swapins numbers. Run it again at the same time tomorrow without restarting. Multiply each difference by the page size shown in the first line. This number shows how much your Mac really swaps in a day. It tells you whether your next upgrade needs more memory or, like mine, just a new name.
RAM costs a fortune right now, so what if you let your SSD cover for it
Full Article
Original Source
Read the full article at Xda-developers →KhanList aggregates and links to publicly available news content. We do not host full articles from third-party sources. Always verify important information with original sources.