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

theMotoMan

macrumors member
Original poster
Mar 20, 2020
57
4
I bought my wife and I 8GB MBAs back when they first hit the market. I watched a crap-ton of YouTube videos and they compared the 8GB and 16GB machines and came to the conclusion that 8GB was adequate. They ran multiple copies of FCP, tons of browser tabs open, concurrent benchmarks running, etc. I got mine and it did not disappoint. I could run just about any amount of browser instances and tabs with no noticeable slowdown. Then people began to see MBAs were experiencing excessive wear on the SSDs due to the excessive swap partition writes. Somewhere along the way Apple fixed this and I am guessing this is why my MBA is slowing down so easily.

When I notice a slowdown with 6 browser tabs or so, I take a look at the Activity Monitor and I see the graph showing yellow, meaning that I am low on RAM. I see there is over 2GB of compressed RAM, but the swap usage is only around 250MB. What the heck? This is why it is slowing down, Apple is limiting the size of the swap file to something minuscule and performance is suffering for it. I feel like this has been a big bait and switch from Apple and my 8GB machine is no longer adequate. My wife is no power user by any means, but she is continually running out of RAM with only 6 browser tabs open. I sold her previous 8GB Intel MBA for precisely this same reason, now I am in the same boat again.

Anyone else having this issue and have any solutions to enlarging the swap file?
 

alien3dx

macrumors 68020
Feb 12, 2017
2,193
524
Weird , why swap is a must ? In my work , i wouldn't want any swap at all . More swap slower the computer it self. Check your proc usage 100% where and it's the worst slow down reason in macos .
 

theMotoMan

macrumors member
Original poster
Mar 20, 2020
57
4
Under ideal conditions, yes, we want no swap to occur, but since we only have 8GB of RAM, we definitely need swap. The new M1 Macs have such insanely fast SSDs and therefore fast swap, it almost swaps as fast as normal RAM. If we don’t have as much swap, you will be limited to running fewer concurrent programs and browser tabs.
 

jav6454

macrumors Core
Nov 14, 2007
22,303
6,264
1 Geostationary Tower Plaza
When it comes to web browsing on several tabs, I never assume the minimum RAM offered is ever enough, specially considering YouTube.

I have looked at the Activity Monitor app, and usually a tab in YouTube runs into the 1.2GB RAM range. Also, I always tend to upgrade RAM to the highest level I can afford.

That said, M1 Macs have really fast SSDs which means it behaves as RAM.
 

leman

macrumors Core
Oct 14, 2008
19,521
19,677
It uses as much swap as it needs. I very much doubt your slowdowns have anything to do with not using enough swap. How do you imagine that working anyway? If the machine is rubbing out of RAM and is not swapping the apps would start crashing. It’s not what you experience, right?
 

Toutou

macrumors 65816
Jan 6, 2015
1,082
1,575
Prague, Czech Republic
Then people began to see MBAs were experiencing excessive wear on the SSDs due to the excessive swap partition writes.
FYI: Macs don't have swap partitions, macOS uses swapfiles.
This is why it is slowing down, Apple is limiting the size of the swap file to something minuscule and performance is suffering for it.
In an OOM (out-of-memory) situation a system with little or no swap will either start killing processes left and right, or grind to a crawl "thrashing" the few file-backed pages it has back and forth between the main memory (RAM) and the storage device the pages are backed by (SSD).

A system with generous swap, on the other hand, will experience a slowdown and that's it. In a system with available swap, even anonymous (your application's "working memory") pages can be evicted from RAM (and stored in a swapfile, because they don't represent an actual file in the filesystem).

This is why what you're saying doesn't make much sense. If Apple was limiting the size of the swapfile or the "willingness" of macOS to evict anonymous pages instead of file-backed pages, what you'd see would be much more brutal slowdowns (to the point of the mouse cursor not moving), maybe even OOM process-killing.
Under ideal conditions, yes, we want no swap to occur
This was the easy answer in 2005, but it's not anymore. For example, I often have a Puma server and a MySQL database running on my machine, because I usually forget to shut them down when I'm done working.
Then there are dozens of other housekeeping processes in macOS that only do something once every few hours, there are daemons, agents and whatnot, and you'd actually want your OS to recognize this situation and move this kind of pages to swap preemptively, in order to lessen the impact of possible future memory starvation.

it almost swaps as fast as normal RAM
Careful with this. The latency of SSD access is still orders of magnitude greater than the latency of RAM access.
 

mr_roboto

macrumors 6502a
Sep 30, 2020
856
1,866
I bought my wife and I 8GB MBAs back when they first hit the market. I watched a crap-ton of YouTube videos and they compared the 8GB and 16GB machines and came to the conclusion that 8GB was adequate.
Well, there's part of your problem. You shouldn't trust everything you see on Youtube, there's lots of clickbait.

I see there is over 2GB of compressed RAM, but the swap usage is only around 250MB. What the heck? This is why it is slowing down, Apple is limiting the size of the swap file to something minuscule and performance is suffering for it. I feel like this has been a big bait and switch from Apple and my 8GB machine is no longer adequate. My wife is no power user by any means, but she is continually running out of RAM with only 6 browser tabs open. I sold her previous 8GB Intel MBA for precisely this same reason, now I am in the same boat again.
1. Apple isn't limiting the swapfile to 250MB. There is no target size. It's always however much it needs to be at that moment in time.

The fundamental event which leads to swapfile growth is that one of your apps asks the OS for more memory. Whenever that happens, the OS looks around for free RAM to give out. If it can't find enough, it has to create some free memory. It prefers to do things like finding allocated memory whose contents aren't important and just throwing those away, but ultimately it may be forced to swap: grow the swapfile, evict some pages to it (ideally ones which haven't been used in a while and won't be needed for a long time), and reallocate those pages to the program which needs them right now.

This is called "demand paged virtual memory". Demand is key: for the most part, macOS doesn't grow the swapfile or page memory in and out without a reason to do so.


2. You're leaping to conclusions. Even if we assume the system was artificially limiting swapfile size to 250 MB, why would we expect the result to be a slowdown?

If you're macOS, a program asks for more memory, you need to grow the swapfile to satisfy the request, and that conflicts with some policy saying YOU CAN'T GROW THE SWAPFILE, there's two realistic options for making forward progress. One is to terminate the program which asked for more, the other is to terminate a different program to make more room for the one which asked.

Most operating systems which implement demand-paged VM have an OOM (out-of-memory) killer in their back pocket. Without one there will be scenarios where the only thing the OS can do is panic and reboot.


3. Have you even objectively tested whether there's a slowdown? How do you know it's not something like a website which recoded its javascript and got a lot slower? Etc.


4. If your swap is only at 250 MB and there's 6 browser tabs and that many tabs is all you need, you don't have a real problem. Just use the computer and be happy.


5. Final note: yes, the M1 SSD is fast, but compressed memory is still dramatically faster than swapping to the SSD. As a rough rule of thumb, the flash memory in SSDs has about 20 microsecond random access latency and DRAM about 50ns: flash is about 400x slower! Things look better for bandwidth, but it's still close to 10x better for DRAM, even with M1.

And M1 systems have been using compressed memory before growing the swapfile from day 1. That has not changed at all. In fact, on the Mac, it's a behavior much older than M1; Apple first shipped compressed memory way back in Mac OS X 10.9 Mavericks over 8 years ago.
 

leman

macrumors Core
Oct 14, 2008
19,521
19,677
To add to the excellent information provided by the previous posts: M1 features a hardware memory compressor which makes compressing memory instead of just swapping it particularly efficient. It will almost always compress before swapping, as it’s faster and uses less power.
 

Paradoxally

macrumors 68000
Feb 4, 2011
1,987
2,898
I bought my wife and I 8GB MBAs back when they first hit the market. I watched a crap-ton of YouTube videos and they compared the 8GB and 16GB machines and came to the conclusion that 8GB was adequate.

This was your mistake. Never skimp on RAM despite what YouTubers say. They run synthetic benchmarks which aren't indicative of real-world usage.

Once you buy the Mac you can't upgrade RAM. You can forego SSD storage because there are cheaper external options available.

I would argue RAM is the most important component of these M1 machines. 8 GB is not enough unless your tasks are web browsing and Word/Excel/Powerpoint. More than that and 16 GB is the standard. It gives you more leeway for the future while providing immediate benefits as soon as you unbox it.
 
  • Like
Reactions: JPack

eyetic

macrumors member
Mar 22, 2020
39
25
This was your mistake. Never skimp on RAM despite what YouTubers say. They run synthetic benchmarks which aren't indicative of real-world usage.

Once you buy the Mac you can't upgrade RAM. You can forego SSD storage because there are cheaper external options available.

I would argue RAM is the most important component of these M1 machines. 8 GB is not enough unless your tasks are web browsing and Word/Excel/Powerpoint. More than that and 16 GB is the standard. It gives you more leeway for the future while providing immediate benefits as soon as you unbox it.
You are absolutely right, even If I didn't have major problems with the 8gb when I started trying games/emulation I noticed straight away its limitations...but the basic MBA 8gb was absordly cheap :rolleyes:

I'll jump into the 16gb in the next generation I guess
 

Paradoxally

macrumors 68000
Feb 4, 2011
1,987
2,898
The 16 GB MBA is still a "cheap" machine at $1,199 (well, cheap is naturally subjective but compared to a Macbook Pro it is way more affordable).

If you just need a computer and not going to take it with you, an $899 Mac mini is a cheaper solution. But that requires a screen, keyboard, mouse, etc...

You could also get a refurbished Mac, those are cheaper and you're still getting warranty and can add AppleCare.

Hopefully with M2 the base RAM will be 16 GB, with Pros getting 32, Max 64 and Ultra 128.
 

StudioMacs

macrumors 65816
Apr 7, 2022
1,133
2,270
I bought my wife and I 8GB MBAs back when they first hit the market. I watched a crap-ton of YouTube videos and they compared the 8GB and 16GB machines and came to the conclusion that 8GB was adequate.

That was a mistake. If I look at Activity Monitor right now, just Safari and 1 tab (this page) is consuming 1 GB of RAM.

Screen Shot 2022-05-17 at 8.21.47 AM.png


As others have stated, YouTube isn't a good source of information.
 

Nick_P

macrumors regular
Feb 3, 2020
150
163
I too have an 8GB M1 Air and an 8GB M1 Mini. I am super happy with both machines. I routinely have many Safari and Firefox browsers open on both machines. The machine is super fast. It was super fast when I bought it in 2020, and the exact same speed today in 2022.

The only time I've had issues with slowdown is when I run a mechanical CAD program that is browser based. But that's a professional app, and it hogs tons of memory when I'm working on a large assembly for my dayjob. If I try to open multiple tabs of that, it consumes all the memory and the computer slows down, until I close a few tabs. For that reason, I bought an M1 Ultra with 64GB for my dayjob work. But all my personal work (and most dayjob work) has been super good on the 8GB M1.
 
  • Like
Reactions: Leon1das

Toutou

macrumors 65816
Jan 6, 2015
1,082
1,575
Prague, Czech Republic
8 GB is not enough unless your tasks are web browsing and Word/Excel/Powerpoint
This statement is a bit problematic, because web browsing has slowly become the no. 1 most RAM-heavy workload.

I did an experiment a couple of hours ago, trying to memory starve my 16 GB Air. I launched literally every single app I have on the MacBook, including a game (Disco Elysium), a small VM with NixOS, my heavyweight IDE (RubyMine) and one of my web apps, some 3D modeling SW (Blender), a game dev engine + IDE (Godot). I opened a couple of DSLR photos in Affinity Photo, started Spotify, started playing a movie in VLC, opened every app bundled with macOS, and my memory pressure was still in green.

Then I added Safari with 10 tabs and Firefox with a bunch of JS-heavy sites and boom, 6 gigabytes of swapped memory.

The web sucks.
 

theMotoMan

macrumors member
Original poster
Mar 20, 2020
57
4
It seems like I’m not being clear with my problem statement and question.

Our machines are not crashing or shutting down, they are just very noticeably slowing down much more than they did 6-9 months ago. I know the basics of virtual memory and swap, and when the Activity Monitor memory graph is yellow and the machine is running slowly and only 250MB of swap is being used, I think something is not working properly.

I think Apple has changed the memory management algorithm to avoid excessive SSD wear and performance seems to be suffering as a result.

No one else is experiencing this?
 

Andropov

macrumors 6502a
May 3, 2012
746
990
Spain
I see there is over 2GB of compressed RAM, but the swap usage is only around 250MB. What the heck? This is why it is slowing down, Apple is limiting the size of the swap file to something minuscule and performance is suffering for it.
Using compressed RAM is much faster than swapping to the SSD. Working as intended.
 

jav6454

macrumors Core
Nov 14, 2007
22,303
6,264
1 Geostationary Tower Plaza
It seems like I’m not being clear with my problem statement and question.

Our machines are not crashing or shutting down, they are just very noticeably slowing down much more than they did 6-9 months ago. I know the basics of virtual memory and swap, and when the Activity Monitor memory graph is yellow and the machine is running slowly and only 250MB of swap is being used, I think something is not working properly.

I think Apple has changed the memory management algorithm to avoid excessive SSD wear and performance seems to be suffering as a result.

No one else is experiencing this?
It is likely an issue, but it would extend to all users who bought machines with lower RAM. That so far, isn't the case, or this forum would be flooded with a "mega-thread" with several posters complaining on the subject.

That said, and as others have continuously stated, Swap will use as much memory as required and needed. The slowdowns are likely cause you are continuously using Swap for active apps. Even if the Swap has moved to an SSD, there is still a delay.

Given your relative low RAM, I would advise keeping only those required tabs in Safari open (or apps) and close the rest.
 
  • Like
Reactions: yitwail

mr_roboto

macrumors 6502a
Sep 30, 2020
856
1,866
It seems like I’m not being clear with my problem statement and question.

Our machines are not crashing or shutting down, they are just very noticeably slowing down much more than they did 6-9 months ago. I know the basics of virtual memory and swap, and when the Activity Monitor memory graph is yellow and the machine is running slowly and only 250MB of swap is being used, I think something is not working properly.
A much more concise version of my initial post is this: if you think having a small swapfile is a performance problem, you probably don't understand as much about VM and swap as you think you do.

Serious question: how often do you reboot these computers? Regrettably, Macs do get slower over time as you use the computer over days and weeks (I think it's probably progressive memory fragmentation). Rebooting clears it up. (This, also, is not a new thing with M1.)
 
  • Like
Reactions: yitwail

Nick_P

macrumors regular
Feb 3, 2020
150
163
It seems like I’m not being clear with my problem statement and question.

Our machines are not crashing or shutting down, they are just very noticeably slowing down much more than they did 6-9 months ago. I know the basics of virtual memory and swap, and when the Activity Monitor memory graph is yellow and the machine is running slowly and only 250MB of swap is being used, I think something is not working properly.

I think Apple has changed the memory management algorithm to avoid excessive SSD wear and performance seems to be suffering as a result.

No one else is experiencing this?
No, not at all. Zero “over time slowdowns” on both of my 8GB M1 macs. Maybe you are using different apps or workflow than one year ago?
 

StudioMacs

macrumors 65816
Apr 7, 2022
1,133
2,270
A much more concise version of my initial post is this: if you think having a small swapfile is a performance problem, you probably don't understand as much about VM and swap as you think you do.

Serious question: how often do you reboot these computers? Regrettably, Macs do get slower over time as you use the computer over days and weeks (I think it's probably progressive memory fragmentation). Rebooting clears it up. (This, also, is not a new thing with M1.)
I have a very basic understanding of computers, but based on my extensive YouTube research I have uncovered a sinister plot Apple has launched against me.
 

SjoukeW

macrumors member
Jun 8, 2020
68
63
Netherlands
The biggest misconception is that the size of the swap-file or the amount of data in the swap file matters in determining if you have enough ram.
What matters is how often the data stored in the swap-file is needed. If you have a lot of programs open which you don't use and they are just 'parked' in the swap-file and never used, no problem. Then the size of the swap doesn't matter, it is never used. The memory indicator stays green.
When you need the data in the swap file very often, the system needs to read and write often to te swap file. This is really slow (in comparison to having enough memory) and a problem. If you have 3 programs open and active all the time, and they don't fit into memory, then the system continuously swap. Even if it is only 250mb, this will be not enough and the memory indicator turns orange or red.
So the question if 8gb ram is enough, is answered by the amount of active programs which do constantly need memory access.
 
  • Like
Reactions: Nick_P

leman

macrumors Core
Oct 14, 2008
19,521
19,677
The biggest misconception is that the size of the swap-file or the amount of data in the swap file matters in determining if you have enough ram.
What matters is how often the data stored in the swap-file is needed. If you have a lot of programs open which you don't use and they are just 'parked' in the swap-file and never used, no problem. Then the size of the swap doesn't matter, it is never used. The memory indicator stays green.
When you need the data in the swap file very often, the system needs to read and write often to te swap file. This is really slow (in comparison to having enough memory) and a problem. If you have 3 programs open and active all the time, and they don't fit into memory, then the system continuously swap. Even if it is only 250mb, this will be not enough and the memory indicator turns orange or red.
So the question if 8gb ram is enough, is answered by the amount of active programs which do constantly need memory access.

Pretty much this. Size of the swap file is irrelevant. Memory pressure is the metric one wants to look at. Is it green most of the time? Then all is fine. Constantly yellow or occasionally red? Then you have a RAM problem.
 
  • Like
Reactions: yitwail

MajorFubar

macrumors 68020
Oct 27, 2021
2,174
3,825
Lancashire UK
This might be viewed as nonconstructive criticism but it seems the obvious answer is only open what you need. I see all these punishing tests online with YouTubers opening a truckload of processor-intensive apps concurrently and interactive browser tabs to see at what point the test machine gives up and waves its white flag, and I always just see it as nothing more than a repeatable benchmark with which they can compare machine A's performance against that of machine B. In real life literally how many apps and tabs do you need open when you can only do one thing at once? Maybe it's just that I'm old and I hail from a generation where we loaded the one program from disc or cassette and that was it.

I might have Apple Music app playing something in the background while I'm writing, or while editing photos, but that's probably it in terms of multitasking. I get it that everyone is an individual as are their uses so no way am I wanting to come across as superior/holier than thou in any way, but really you can only concentrate on one thing at once: what's it with the loads of tabs/apps open at once that people expect their poor computers to still be processing in the background when they're not even looking at them?
 

biffuz

macrumors 6502
Feb 23, 2016
347
349
The web sucks.

I have been saying this for 15 years. More than "the web" itself, it's the technologies behind it that are horrible (html, css, js, http). And today, more and more traditional apps are being rewritten with that garbage.

Another thing I've been saying for maybe 7 or 8 years, is that 8 GB aren't adequate anymore for any work. Even my gaming PC has 32 gigs, and it's 10 (ok, that was probably an overkill).
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.