Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Isamilis

macrumors 68020
Apr 3, 2012
2,187
1,073
Here's another way to "take care of swap" (once and for all):

First, you need enough RAM.
Secondly, you need to be that kind of user who is aware of how much RAM is being used.

What I did:
I DISABLED VM disk swapping using the terminal.
Easy to do.

Now, NO swapping at all.
The OS can't do it.

I've been running [first] my 2012 Mini like this, and [secondly] my 2018 Mini like this, and now my 2021 MacBook Pro 14" like this, too.

All work great and they have no RAM-related crashes.
But I close apps that don't need to be running, and I use NO Safari "tabs" at all -- not a single one.
But again, NO disk swapping -- at all, ever again!
Why do you make your life so difficult? There are lots of good used Mac where their owners didn’t do what you did. Just use the machine as normal user does. The machine is intended to simplify life of its user.
 

ArkSingularity

macrumors 6502a
Mar 5, 2022
928
1,130
Disabling swap might actually worsen performance in certain circumstances. Swap allows very inactive data to be kept out of the way on the SSD instead of being forced to share space with everything else in the compressor (where it would otherwise be). If MacOS is forced to compress everything to free up space and is unable to swap data out, more RAM will be occupied by the compressor, leaving less available memory for uncompressed ready-to-use-data.

Realistically, this probably doesn't have a huge effect, it's just something to think about.
 

Feek

macrumors 65816
Nov 9, 2009
1,379
2,042
JO01
But I close apps that don't need to be running, and I use NO Safari "tabs" at all -- not a single one.

Just use the machine as normal user does. The machine is intended to simplify life of its user.
As @Isamilis says, this sounds like you're going out of the way to make things awkward for yourself. Making sure all apps are closed, not using any safari tabs and probably other things.

With modern SSDs being mind blowingly quick, what does it matter if the computer swaps to it? The OS and the hardware are designed to work together to give a good user experience. There is zero reason to disable the swap file and then have to keep an eye on what you're doing to keep within the physical memory of the system. It's a ridiculous 'solution' to a non-existent problem.
 

Fishrrman

macrumors Penryn
Feb 20, 2009
29,175
13,223
isamills complains (and feek, too):
"Why do you make your life so difficult?"

There was nothing "difficult". In any way.
All I did was type in a single command (to disable VM), reboot, and get on with Mac life.

Anything else I mentioned above... I've ALWAYS done.

I'm morally opposed to using tabbed browsing (haha).
If a tab opens by mistake, I immediately CLOSE it and open a link "in a new window".
No tabs here. None at all. Never had 'em. Never will (I'm old, I can say that with assurance)

My opinion only.
Others will disagree.
Some will disagree vehemently.
 
  • Like
Reactions: ArkSingularity

SjoukeW

macrumors member
Jun 8, 2020
66
62
Netherlands
There is no problem with having a lot of data in the swap memory. The amount of GB's is of no consequence.
What is of consequence is how often the data in the swap is needed. If it is almost never needed and almost never accessed it sits there doing nothing.
What will be a problem is if the data in the swap is often needed. That would indicate that you have not enough RAM or too many open programs.
The memory pressure graph shows exactly this. Green -> swap is almost never accessed. Orange -> swap data is sometimes used, your system is coping well. Red -> your system is struggling and slowing down.

As a software developer I pushed my system quite often. I have seen my system running happy with 32gb of swap, when it was inactive. I have also seen my system coming to a halt with 1gb of swap, when it was heavily accessed. This was clearly seen in the memory pressure graph.

Yours is as green as it can be. be happy and don't worry.
Also almost nobody has worn out the internal ssd of a Mac yet. you would be (one of) the first.
 

Fishrrman

macrumors Penryn
Feb 20, 2009
29,175
13,223
sjouke wrote:
"Also almost nobody has worn out the internal ssd of a Mac yet. you would be (one of) the first"

Seems to me there have been a number of reports of failures of the SSD portion of fusion drives lately. These may be the smaller (24gb and 32gb) SSDs Apple installed into more recent iMacs.

The failures might have nothing at all related to a "wearing out" of the drive media itself.
Then again, they might, due to large amounts of data constantly being "pushed through" them.

I sense we're going to see more such reports in the future...
 

Feek

macrumors 65816
Nov 9, 2009
1,379
2,042
JO01
Fusion drives are a hugely different matter because I believe that every single byte that's written to the mechanical part goes through that small SSD segment first.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.