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

phl92

macrumors 6502
Original poster
Oct 28, 2020
301
47
Hey guys,
I bought my Macbook Air M1 (512GB; 8GB RAM) around 1,5 years ago, for a travelling device mainly used for browsing and Zoom/Skype meetings. Lately I need to use heavier load on it and even though he handles all very well (for the specs) I am a bit worried when I look from time to time in the Activity Monitor.
I use IntelliJ, Eclipe CLion (mostly 2 of them), 2-3 Browser windows with 10-15 tabs open each, and 2 VM's simultenously, sometimes 3! (Win 11, Kali Linux, Fedora) and he really gets only a bit slow when also using these VM's together.
But of course all these tasks need RAM, and he swaps a ton! Is swap general a bad thing for longevity of my SSD?

And I also wonder, that now my Activity manger shows a lot of Swap even though I have only Safari, and Activity Monitor open (nothing else), but Swap is not going really down?!
 

Attachments

  • activity_m.jpg
    activity_m.jpg
    202.6 KB · Views: 938

TSE

macrumors 601
Jun 25, 2007
4,031
3,545
St. Paul, Minnesota
I would stop focusing so heavily on activity monitor and just see if it's fast enough.

Your use case evolved. What can you really do? Swapping memory isn't all that bad - I have 16 GBs of RAM on my Air and I swap similarly to that when I'm rendering amongst other things and I'm still happy with the performance.
 

phl92

macrumors 6502
Original poster
Oct 28, 2020
301
47
As I said I am very happy with my Mac Air even with heavy tasks... I was just wondering if huge Swaps over time decrease the longevity of the SSDs?
 
  • Like
Reactions: Reggaenald

Fishrrman

macrumors Penryn
Feb 20, 2009
29,239
13,310
It's because of the RAM.
For the m series CPU's, 8gb is no longer "enough".

The reason is just what you have described:
excessive VM disk swapping, page ins/outs, because of the way the new "unified memory" CPU/RAM/drive seems to operate.

How I overcame this:
With the MacBook Pro 14" (which comes with 16gb of RAM), I used the terminal to DISABLE VM disk swapping.
Activity Monitor now ALWAYS reads thusly:
Activity Monitor.jpg

If I open terminal to check swap usage, I get:
vm.swapusage: total = 0.00M used = 0.00M free = 0.00M (encrypted)

Runs great.
NEVER crashes.
I DO take care as to not "overload" the RAM with programs that don't need to be running.
 

phl92

macrumors 6502
Original poster
Oct 28, 2020
301
47
It's because of the RAM.
For the m1 series, 8gb is no longer "enough".

The reason is just what you have described:
excessive VM disk swapping, page ins/outs, because of the way the new "unified memory" CPU/RAM/drive seems to operate.

How I overcame this:
With the MacBook Pro 14" (which comes with 16gb of RAM), I used the terminal to DISABLE VM disk swapping.
Activity Monitor now ALWAYS reads thusly:
View attachment 2107368
If I open terminal to check swap usage, I get:
vm.swapusage: total = 0.00M used = 0.00M free = 0.00M (encrypted)

Runs great.
NEVER crashes.
I DO take care as to not "overload" the RAM with programs that don't need to be running.
Not sure if I understand you correctly: you limit yourself by forbidding Swapping, right?
But yeah I guess 16GB is still enough for this power machine... I am in a different situation with only 8GB...
When I bought I never thought I will do this tasks on an Air... but its working so why not :D
 

chrfr

macrumors G5
Jul 11, 2009
13,707
7,277
Not sure if I understand you correctly: you limit yourself by forbidding Swapping, right?
But yeah I guess 16GB is still enough for this power machine... I am in a different situation with only 8GB...
When I bought I never thought I will do this tasks on an Air... but its working so why not :D
If it's working for you, and it seems that it is, just use the computer and don't worry about swap. The disk won't wear out in any likely timespan.
 

Basic75

macrumors 68020
May 17, 2011
2,101
2,448
Europe
As I said I am very happy with my Mac Air even with heavy tasks... I was just wondering if huge Swaps over time decrease the longevity of the SSDs?
Every cell in a modern SSD can only do about 1000 erase-write cycles. You do the math.
 

phl92

macrumors 6502
Original poster
Oct 28, 2020
301
47
The 4,62 GB memory footprint of WindowServer looks a little too big, does this go down when you close everything else?
Hi,
I closed ALL apps (Tab + Q) except for the finder, and the Window server task went down from 4,62 GB to 4,43 GB.. so actually nothing changed. Also Swap was still more than 4GB.
Now I restarted my Mac and the Window server is around 200MB big. Also 0 Bytes swapped.

I did not know it is good to restart the Mac from time to time. I literally never turn the Mac off, I appreciate to just open the screen and start working.
 

pshufd

macrumors G4
Oct 24, 2013
10,146
14,572
New Hampshire
Most Apple users probably have a decent amount of swap as most buy the base models. I like to run with no swap but it's an expensive approach. What you could do is run DxDrive to see what the wear levels are and extrapolate the useful life of the SSD. I did this with my systems and it came out to around 100 years. I'm not too worried about SSD lifetime with that.
 

Basic75

macrumors 68020
May 17, 2011
2,101
2,448
Europe
That is fear mongering - SSD even with normal swap will outlast a typical user's use of their notebook.
How is citing tech specs fear mongering?

I explicitly didn't draw any conclusions and told him to do his own math so he can come to his own conclusion about whether it's a problem or not.
 
  • Like
Reactions: Populus

EugW

macrumors G5
Jun 18, 2017
14,897
12,866
If it's fast enough, I wouldn't worry too much about it. That said, I think your machine is underspec'd with regards to RAM, for your recent heavier usage.

Most Apple users probably have a decent amount of swap as most buy the base models. I like to run with no swap but it's an expensive approach. What you could do is run DxDrive to see what the wear levels are and extrapolate the useful life of the SSD. I did this with my systems and it came out to around 100 years. I'm not too worried about SSD lifetime with that.
What are the longevity specs of these MBA SSDs? I bought a used OEM SSD for a 2015 MacBook Pro and it had over 100 TB writes after about 5 years, with wear leveling health of 67%. I guess that translates to SSD longevity of 300 TB writes, with a useful life of about 15 years at that rate of usage. It's for my kid though, and her SSD writes will likely be a small fraction of what the drive saw before, so even with <200 TB of writes left, that probably could last her decades.

DriveDxReport_APPLE SSD SM0256G_2021-12-13_19-55-28-325 Noserial.png
 
  • Like
Reactions: theorist9

pshufd

macrumors G4
Oct 24, 2013
10,146
14,572
New Hampshire
If it's fast enough, I wouldn't worry too much about it. That said, I think your machine is underspec'd with regards to RAM, for your recent heavier usage.


What are the longevity specs of these MBA SSDs? I bought a used OEM SSD for a 2015 MacBook Pro and it had over 100 TB writes after about 5 years, with wear leveling health of 67%. I guess that translates to SSD longevity of 300 TB writes, with a useful life of about 15 years at that rate of usage. It's for my kid though, and her SSD writes will likely be a small fraction of what the drive saw before, so even with <200 TB of writes left, that probably could last her decades.

View attachment 2107426

It's a function of the number of chips for the Apple Silicon systems. It was posted the long SSD write thread and I just extrapolated out. If the SSD were a problem, then I would turn the MacBook into a desktop with an external SSD. I suspect that SSDs in general will outlast the useful life of the system unless you're using your MacBook as a Postgres server.
 

chrfr

macrumors G5
Jul 11, 2009
13,707
7,277
If the SSD were a problem, then I would turn the MacBook into a desktop with an external SSD. I suspect that SSDs in general will outlast the useful life of the system unless you're using your MacBook as a Postgres server.
While I don't think SSD longevity is enough of a concern to worry about, it is worth mentioning that all Apple Silicon Macs use the internal storage to boot, even if set to boot off an external drive. As such, a failed SSD means that the Mac is useless.
From this Apple document:
If a user chooses to boot from external media, that operating system version must first be personalized using an authenticated reboot from recoveryOS. This reboot creates a LocalPolicy file on the internal drive that’s used to perform a trusted boot from the operating system stored on the external media.
 
  • Like
Reactions: Populus

pshufd

macrumors G4
Oct 24, 2013
10,146
14,572
New Hampshire
While I don't think SSD longevity is enough of a concern to worry about, it is worth mentioning that all Apple Silicon Macs use the internal storage to boot, even if set to boot off an external drive. As such, a failed SSD means that the Mac is useless.
From this Apple document:

SSDs fail gracefully though. So you'd lose space over time as sectors are remapped and later lost. Plenty of time to take action if that happens.
 

belvdr

macrumors 603
Aug 15, 2005
5,945
1,372
SSDs fail gracefully though. So you'd lose space over time as sectors are remapped and later lost. Plenty of time to take action if that happens.
I've had a few die quickly, likely from board failure. It's rare, though.
 

pshufd

macrumors G4
Oct 24, 2013
10,146
14,572
New Hampshire
I've had a few die quickly, likely from board failure. It's rare, though.

We're talking about dying from use though. Not board failure.

I just added a spare T-3 to my Studio. It's going to get the 2 TB Crucial SSD and I'm undecided about getting a 4 TB SSD. I like to get as much RAM as I can reasonably use but most people are fine with 8 GB. I have a friend that bought a base mini and he was running a YouTube channel creating video and running live streams and he used it for other purposes and it was all good. He recently upgraded to an M2 Air 16/512 and is very happy with that too.
 

colinsky

macrumors regular
Apr 3, 2009
185
192
Hi,
I closed ALL apps (Tab + Q) except for the finder, and the Window server task went down from 4,62 GB to 4,43 GB.. so actually nothing changed. Also Swap was still more than 4GB.
Now I restarted my Mac and the Window server is around 200MB big. Also 0 Bytes swapped.

I did not know it is good to restart the Mac from time to time. I literally never turn the Mac off, I appreciate to just open the screen and start working.
I reboot a lot more with my 16/512 m1 Mini. WindowServer gets huge, and kernel_task, and Finder, and normal operations put memory pressure into the yellow. Luckily with the m1 the reboot takes only 30 seconds.
 

TheSl0th

macrumors newbie
Nov 15, 2020
28
59
Hi,
I closed ALL apps (Tab + Q) except for the finder, and the Window server task went down from 4,62 GB to 4,43 GB.. so actually nothing changed. Also Swap was still more than 4GB.
Now I restarted my Mac and the Window server is around 200MB big. Also 0 Bytes swapped.

I did not know it is good to restart the Mac from time to time. I literally never turn the Mac off, I appreciate to just open the screen and start working.
I’ve seen this widow manager memory usage on an identical model - M1 8/512. The machine kept beachballing for no obvious reason - running the available software updates at that time fixed the huge window server usage, but I suspect that might just have been a result of a restart. IMO that window server usage is an anomaly and likely a bug.
 
  • Like
Reactions: Populus

Geohord

macrumors member
Nov 15, 2016
56
12
Virtual machines require lots of RAM because of the overhead. Unless each VM has 1GB of RAM or so.
 
  • Like
Reactions: Basic75

Toutou

macrumors 65816
Jan 6, 2015
1,082
1,575
Prague, Czech Republic
I did not know it is good to restart the Mac from time to time. I literally never turn the Mac off, I appreciate to just open the screen and start working.
It shouldn’t be. I don’t turn mine off either, my uptime is usually since the last update, and WindowServer doesn’t do this to me.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.