Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Why does my Apple Sillicon Mac with 32gb of RAM use (or even create?!) a swapfile, when 20gb is still unused/"free"?

Why can I not just enter a simple command to entirely-disable swapfile, like with Linux's:

>>>>swapoff -a

Seems kind of silly, unless the point is intentionally to wear-down the SSD's lifespan.

Having a GUI swapfile-disable system preference would be awesome. It would also be awesome if Apple finally abandoned this system settings/layout "phase" – it's still word-salad (compared to decades of preference panes).

#Apple #Feedback #swapfile

 help



The principle of a paging system is that main memory is just a cache for secondary memory, and the concept of "free memory" ideally rather means something like "memory that can be quickly reclaimed for another purpose". Sometimes anonymous memory will be of less us occupying main memory at some given time than would be letting cached file contents take their place.

You've described what the purpose of a swapfile is – thanks? My argument is simply that you don't need a swapfile with enough real memory; that swapfiles can unnecessarily shorten the lives of SSDs, entirely unnecessarily.

----

>I have 20GB of RAM free (me)

>>~need to have quick access to main memory

>I have 20GB of RAM free (still me)

>>~yeah but "quickly reclaimed for another purpose"

>I have 20GB of RAM free (!m!e!)

//of//32GB//ttl//

----

In linuxland, I'd just type `sudo swapoff -a` and be done with it. That machine has 96GB of RAM, so it would have ~84GB of RAM free (if, hypothetically, the same hardare/configuration were operating that system).

Does. not. need. a swapfile.

The operating system, during bootup, should think "hey I have dozens of gigabytes of RAM, won't be needing any swapfiles" – behind the scenes and without input.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: