Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
Status
The first post of this thread is a WikiPost and can be edited by anyone with the appropiate permissions. Your edits will be public.

MrGunnyPT

macrumors 65816
Mar 23, 2017
1,313
804
This is why when this first came to light I was saying it many not be Apple's fault using the logic if it was due to Apple then the majority who checked rather than a very small minority would have had the write problem. More over the percentages and TB values didn't make much sense as the only real world example we had (2014) shows a linear degradation.
Honestly the problem right now seems regardless of using a 32GB/64GB swap will always happen with this type of apps especially MS Teams.

Let's just hope these apps get updated asap, I noticed Electron 10 always does a lot of improvements if we can take a look at Discord Canary.
 

t2jd1967

macrumors regular
Oct 19, 2021
100
54
For anyone out there, I have found that Safari with lots of tabs using tab groups is a real disk killer. I usually monitor temps on my Macs, in this case the M1 Mac Mini (16GB/1TB) was showing high (36 degrees) temps yesterday and this morning and I also noticed continuous disk activity. Yesterday I was already looking at a process called Safari Web Content using up between 45% and 50% of CPU and things morning inspecting things further, also kernel_task was taking up a lot of CPU. Then I looked at the disk usage and in 3 hours starting with a cold boot it had already written 2.76TB to the disk! I then did the following:

1. Killed all but one tab in each tab group (I have 7 groups), leaving the last tab on something inconspicuous as a Wikipedia page.
> No change.

2. Cleared all the website caching.
> No change.

3. Quit Safari.
> This took at least a few minutes, some cleaning up going on perhaps?
> Disk writes stopped and kernel_task returned to low CPU use.

4. Started Safari.
> No apparent heave disk writes, temps down to 26 degrees with 4K and FHD monitors attached.

Checked the SMART information just over 1 year on.

SMART/Health Information (NVMe Log 0x02) Critical Warning: 0x00 Temperature: 32 Celsius Available Spare: 100% Available Spare Threshold: 99% Percentage Used: 1% Data Units Read: 92,843,635 [47.5 TB] Data Units Written: 71,810,602 [36.7 TB] Host Read Commands: 1,231,807,466 Host Write Commands: 574,950,112 Controller Busy Time: 0 Power Cycles: 198 Power On Hours: 993 Unsafe Shutdowns: 13 Media and Data Integrity Errors: 0 Error Information Log Entries: 0

This is the disk usage on Activity Monitor before I killed it.

Screen Shot 2022-01-22 at 11.02.57 .png


Not very nice reading and not at all happy about Safari's poor showing here. I have a new 14" M1 Max coming in and whilst I am not too worried about the Mini, I want to keep the 14" for a very long time and am weary of these kind of issues.

(Edited for formatting.)
 

CMMChris

macrumors 6502a
Oct 28, 2019
850
794
Germany (Bavaria)
I stopped using Safari long ago for its various issues, one of them being RAM usage which got even worse on Apple Silicon Macs. I recommend using a Chromium based browser of your choice. I went for Vivaldi and haven't looked back since. Never was affected by the SSD trashing issue on any on my M1 Macs and staying away from Safari probably is one of the reasons why.
 

Maximara

macrumors 68000
Jun 16, 2008
1,707
908
For anyone out there, I have found that Safari with lots of tabs using tab groups is a real disk killer. I usually monitor temps on my Macs, in this case the M1 Mac Mini (16GB/1TB) was showing high (36 degrees) temps yesterday and this morning and I also noticed continuous disk activity. Yesterday I was already looking at a process called Safari Web Content using up between 45% and 50% of CPU and things morning inspecting things further, also kernel_task was taking up a lot of CPU. Then I looked at the disk usage and in 3 hours starting with a cold boot it had already written 2.76TB to the disk! I then did the following:

1. Killed all but one tab in each tab group (I have 7 groups), leaving the last tab on something inconspicuous as a Wikipedia page.
> No change.

2. Cleared all the website caching.
> No change.

3. Quit Safari.
> This took at least a few minutes, some cleaning up going on perhaps?
> Disk writes stopped and kernel_task returned to low CPU use.

4. Started Safari.
> No apparent heave disk writes, temps down to 26 degrees with 4K and FHD monitors attached.

Checked the SMART information just over 1 year on.

SMART/Health Information (NVMe Log 0x02) Critical Warning: 0x00 Temperature: 32 Celsius Available Spare: 100% Available Spare Threshold: 99% Percentage Used: 1% Data Units Read: 92,843,635 [47.5 TB] Data Units Written: 71,810,602 [36.7 TB] Host Read Commands: 1,231,807,466 Host Write Commands: 574,950,112 Controller Busy Time: 0 Power Cycles: 198 Power On Hours: 993 Unsafe Shutdowns: 13 Media and Data Integrity Errors: 0 Error Information Log Entries: 0

This is the disk usage on Activity Monitor before I killed it.

View attachment 1947742

Not very nice reading and not at all happy about Safari's poor showing here. I have a new 14" M1 Max coming in and whilst I am not too worried about the Mini, I want to keep the 14" for a very long time and am weary of these kind of issues.

(Edited for formatting.)
Even though I use an Intel Mac I turned off Safari's automatic web cache and only when it runs out of Ram does it send things to the disk.

1) Activate the Developer Menu
2) Select "Show Web Inspector"
3) Go to Network
4) Next to "Export" there is an icon with a "/" through it. It's tool tip says "Ignore the resource cache when loading resources". (see first picture)
5) Click on it (it will turn blue as shown in second picture)
6) Quit and restart Safari
This should cut down Safari going crazy. I also play my Youtube videos at only 240 to keep any video cache to a minimum.
Cache.png

Cache off.jpg


On a side note using the quick and dirty calculation that 36.7 TB for 1% produces 7,340 TB (0.5%) to 2,446.6 TB (1.49...%). Based on the results of ~250 TB drives in 2014 this is a reasonable range for the lifespan. Also if you only used 1% in a year then based on the linear calculation everybody and his brother uses it will take 100 years to reach 100%
 
  • Like
Reactions: osplo

exoticSpice

Suspended
Jan 9, 2022
1,242
1,952
For anyone out there, I have found that Safari with lots of tabs using tab groups is a real disk killer. I usually monitor temps on my Macs, in this case the M1 Mac Mini (16GB/1TB) was showing high (36 degrees) temps yesterday and this morning and I also noticed continuous disk activity. Yesterday I was already looking at a process called Safari Web Content using up between 45% and 50% of CPU and things morning inspecting things further, also kernel_task was taking up a lot of CPU. Then I looked at the disk usage and in 3 hours starting with a cold boot it had already written 2.76TB to the disk! I then did the following:

1. Killed all but one tab in each tab group (I have 7 groups), leaving the last tab on something inconspicuous as a Wikipedia page.
> No change.

2. Cleared all the website caching.
> No change.

3. Quit Safari.
> This took at least a few minutes, some cleaning up going on perhaps?
> Disk writes stopped and kernel_task returned to low CPU use.

4. Started Safari.
> No apparent heave disk writes, temps down to 26 degrees with 4K and FHD monitors attached.

Checked the SMART information just over 1 year on.

SMART/Health Information (NVMe Log 0x02) Critical Warning: 0x00 Temperature: 32 Celsius Available Spare: 100% Available Spare Threshold: 99% Percentage Used: 1% Data Units Read: 92,843,635 [47.5 TB] Data Units Written: 71,810,602 [36.7 TB] Host Read Commands: 1,231,807,466 Host Write Commands: 574,950,112 Controller Busy Time: 0 Power Cycles: 198 Power On Hours: 993 Unsafe Shutdowns: 13 Media and Data Integrity Errors: 0 Error Information Log Entries: 0

This is the disk usage on Activity Monitor before I killed it.

View attachment 1947742

Not very nice reading and not at all happy about Safari's poor showing here. I have a new 14" M1 Max coming in and whilst I am not too worried about the Mini, I want to keep the 14" for a very long time and am weary of these kind of issues.

(Edited for formatting.)
Don't use Safari. Use Firefox or a good Chromium browser
 

Maximara

macrumors 68000
Jun 16, 2008
1,707
908
Don't use Safari. Use Firefox or a good Chromium browser
Actually other browsers can be worst (if you don't set them up right) as shown by the chart (see below) in M1 Mac Swap Memory Issue - Is Your Browser KILLING Your Mac's SSD? and How To SAVE Your Mac's SSD! (M1 Swap Memory Issue/Browser Disk Caching). That is why I went through all the steps to turn off Safari's disco cache - even before you do that it is the best of the browsers in how little it writes to the disk (barring sites that cause browsers to go write happy)
browser.png
 
Last edited:
  • Like
Reactions: vs40 and osplo

harshw

macrumors regular
Feb 19, 2009
202
54
It's been four days since I got this 16" M1 Max/64GB/1TB

Code:
SMART/Health Information (NVMe Log 0x02)
Critical Warning:                   0x00
Temperature:                        28 Celsius
Available Spare:                    100%
Available Spare Threshold:     99%
Percentage Used:                  0%
Data Units Read:                   982,987 [503 GB]
Data Units Written:                1,265,018 [647 GB]
Host Read Commands:           17,081,576
Host Write Commands:          11,231,224
Controller Busy Time:             0
Power Cycles:                        132
Power On Hours:                    7
Unsafe Shutdowns:                    10
Media and Data Integrity Errors:  0
Error Information Log Entries:     0

How can a four day old machine have 132 power cycles ????? Anyways, it has ~ 647GB written with roughly 20GB - 30GB per day (didnt remember to take smartctl stats when I first got the machine). Migration Assistant transferred around 300GB over so I can believe that ~600GB in 4 days isnt very large. But will keep an eye on this, will probably start recording stats every week. Wondering if someone has written a script or program for the new Macs - to do this automatically ...
 

mi7chy

macrumors G4
Oct 24, 2014
10,622
11,294
Power Cycles: 132
Power On Hours: 7

How can a four day old machine have 132 power cycles ?????

Has it kernel panic during sleep? You can tell since it'll prompt for password when woken instead of taking fingerprint login. One of my NVMe SSDs has 10,068 power on hours and 102 power cycles.
 

harshw

macrumors regular
Feb 19, 2009
202
54
Has it kernel panic during sleep? You can tell since it'll prompt for password when woken instead of taking fingerprint login. One of my NVMe SSDs has 10,068 power on hours and 102 power cycles.
No kernel panics. It’s been only 4-5 days but zero panics (knock on wood) and no trouble waking the machine up from sleep …
 

CMMChris

macrumors 6502a
Oct 28, 2019
850
794
Germany (Bavaria)
SSD collecting power cycles is normal. It will be shut down when not needed to save power. Especially after a longer time in sleep you will see the count increase a lot because the SSD is constantly powering down and up again when Power Nap kicks in.
 
  • Like
Reactions: jdb8167

ctjack

macrumors 68000
Mar 8, 2020
1,554
1,571
On a side note using the quick and dirty calculation that 36.7 TB for 1% produces 7,340 TB (0.5%) to 2,446.6 TB (1.49...%). Based on the results of ~250 TB drives in 2014 this is a reasonable range for the lifespan. Also if you only used 1% in a year then based on the linear calculation everybody and his brother uses it will take 100 years to reach 100%
This is a quote from samsung' website regarding the latest 980 pro drives with 7GB/s speeds on ssd:
*TBW : Terabytes written
* Warrantied TBW for 980: 150 TBW for 250GB model, 300 TBW for 500GB model, 600 TBW for 1TB model.
* 5 years or TBW, whichever comes first. For more information on the warranty, please find the enclosed warranty statement in the package.

And here is my stats for 512gb m1 Air:

SMART/Health Information (NVMe Log 0x02)
Critical Warning: 0x00
Temperature: 36 Celsius
Available Spare: 100%
Available Spare Threshold: 99%
Percentage Used: 3%
Data Units Read: 271,318,427 [138 TB]
Data Units Written: 233,424,996 [119 TB]
Host Read Commands: 1,388,925,515
Host Write Commands: 712,346,757
Controller Busy Time: 0
Power Cycles: 219
Power On Hours: 753
Unsafe Shutdowns: 11
Media and Data Integrity Errors: 0
Error Information Log Entries: 0

Smartctl is having error when reporting "Percentage Used: 3%" because then it would mean that TBW for M1 Air 512gb is 4000 TBW which is obviously incorrect as Apple doesn't have secret UFO technologies apparently.

Clearly Apple nowhere and never presented TBW for its' ssd drives, that is why smartctl is making up some number for that. But if I go with the Samsung numbers, then it would mean that i used 119TB(out of 300TBW) in exactly 1 year for my 512gb, meaning that it could last me 2.5-3 years only.

It gets even worse if you have 256 gb ssd with 150 TBW...
 

harshw

macrumors regular
Feb 19, 2009
202
54
that is why smartctl is making up some number for that.
smartctl doesn't "make up" anything - it simply reports SMART attributes for the drive. Sure with older (especially SATA) SSDs you could even test and calculate it yourself. Here's a paper by Samsung itself on how to estimate write amplification and SSD lifetime from attributes from an actual test: https://image-us.samsung.com/SamsungUS/b2b/resource/2016/05/31/WHP-SSD-SSDSMARTATTRIBUTES-APR16J.pdf

Note that this is NOT what smartctl does, it is simply reporting what it sees in the attribute fields. Since we're talking about NVMe drives, the older definition for some of the attributes no longer apply. Here's a newer NVME spec from JEDEC: https://www.nvmexpress.org/wp-content/uploads/NVM_Express_1_2b_Gold_20160603.pdf - attribute 05h returns "percentage used" with an internal vendor calculation and this is what smartctl is reporting i.e. it isn't doing any calculations itself.

1642996669081.png
 

Maximara

macrumors 68000
Jun 16, 2008
1,707
908
This is a quote from samsung' website regarding the latest 980 pro drives with 7GB/s speeds on ssd:


And here is my stats for 512gb m1 Air:



Smartctl is having error when reporting "Percentage Used: 3%" because then it would mean that TBW for M1 Air 512gb is 4000 TBW which is obviously incorrect as Apple doesn't have secret UFO technologies apparently.

Clearly Apple nowhere and never presented TBW for its' ssd drives, that is why smartctl is making up some number for that. But if I go with the Samsung numbers, then it would mean that i used 119TB(out of 300TBW) in exactly 1 year for my 512gb, meaning that it could last me 2.5-3 years only.

It gets even worse if you have 256 gb ssd with 150 TBW...
That is what the drive is warranted for not how long it will actually last - that is why I linked to the results of ~250 TB drives in 2014 test article. In fact one of those was Samsung 840 Series (regular and pro) and while regular had a few hiccups at 300 TB it sailed on to 800 TB where it started having issues again and effectively died at 900TB.

The Samsung 840 pro is warranted 73 TB TBW and "Reallocated sectors started appearing in volume after 600TB of writes. Through 2.4PB, the Pro racked up over 7000 reallocated sectors totaling 10.7GB of flash. Samsung’s Magician utility gave a clean bill of health, though, and the used-block counter showed ample reserves to push past 2.5PB" But after leaving the drive off for a week it would not read but the noted this:

"Before moving on to the performance analysis on the next page, I should note that the 840 Pro exhibited a curious inflation of writes associated with the power outage after 2.1PB. The SMART attributes indicate an extra 38TB of host writes during that period, yet Anvil’s logs contain no evidence of the additional writes. Weird. Maybe the SMART counter tripped up when the power cut out unexpectedly."

The rule of thumb is the bigger the SSD and the less you keep on it the longer it will live. Using Samsung's own figures everything else being equal going from 128GB/256GB to 512GB/1TB doubles the TBW. Using the worst values we get 1200 TBW until problems set in.

Since the tests show a linear progression using 119TB/year gives us 10.1 years. As I said before you have to look at all the data.

smartctl doesn't "make up" anything - it simply reports SMART attributes for the drive. Sure with older (especially SATA) SSDs you could even test and calculate it yourself. Here's a paper by Samsung itself on how to estimate write amplification and SSD lifetime from attributes from an actual test: https://image-us.samsung.com/SamsungUS/b2b/resource/2016/05/31/WHP-SSD-SSDSMARTATTRIBUTES-APR16J.pdf

Note that this is NOT what smartctl does, it is simply reporting what it sees in the attribute fields. Since we're talking about NVMe drives, the older definition for some of the attributes no longer apply. Here's a newer NVME spec from JEDEC: https://www.nvmexpress.org/wp-content/uploads/NVM_Express_1_2b_Gold_20160603.pdf - attribute 05h returns "percentage used" with an internal vendor calculation and this is what smartctl is reporting i.e. it isn't doing any calculations itself.

View attachment 1948593
I was pointing out nearly from the get go the "smartmontools must be reading the wrong value" ( Apr 7, 2021)

According to a 2021 Micron Technology page Smart isn't the "standard" everyone thinks it is and these number are showing that what is in that article is effectively correct as no one would guarantee a 1 TB SSD for 6880 TBW.

"Percentage Used: Contains a vendor specific estimate of the percentage of NVM subsystem life used based on the actual usage and the manufacturer’s prediction of NVM life. A value of 100 indicates that the estimated endurance of the NVM in the NVM subsystem has been consumed, but may not indicate an NVM subsystem failure. The value is allowed to exceed 100. Percentages greater than 254 shall be represented as 255. This value shall be updated once per power-on hour (when the controller is not in a sleep state)." - SMART Attribute Details

In fact, though I can't find it right now there was a report that the smartmontools tool everybody was using early on was using out of date pointers resulting in incorrect values for both TBW and percentage used. GIGO.

"Eliminate the impossible, and what ever remains, no matter how improbable, is the truth."
 
Last edited:

jdb8167

macrumors 601
Nov 17, 2008
4,859
4,599
In fact, though I can't find it right now there was a report that the smartmontools tool everybody was using early on was using out of date pointers resulting in incorrect values for both TBW and percentage used. GIGO.

"Eliminate the impossible, and what ever remains, no matter how improbable, is the truth."
Why are you dredging up this nonsense again? I’ve conclusively proved that the information reported by smartmontools is the SMART data that Apple returns from their own NVME SMART API. If the data is wrong on smartmontools it is on Apple to fix it. The data isn’t wrong anyway.
 

ctjack

macrumors 68000
Mar 8, 2020
1,554
1,571
That is what the drive is warranted for not how long it will actually last - that is why I linked to the results of ~250 TB drives in 2014 test article.
Thanks for interesting reading. Here is the direct quotes from it:
Most PC users, myself included, write no more than a few terabytes per year. Even 100TB is far more endurance than the typical consumer needs.
Well this is true. But I highly doubt that we can tell that 119 TBW per year is considered as a "few terabytes per year".
It is all Apple generating extra unnecessary writes still on latest macos while swapping/caching.

Clear evidence of flash wear appeared after 200TB of writes, when the Samsung 840 Series started logging reallocated sectors. The 840 Series didn’t encounter actual problems until 300TB, when it failed a hash check during the setup for an unpowered data retention test. The drive went on to pass that test and continue writing, but it recorded a rash of uncorrectable errors around the same time. Uncorrectable errors can compromise data integrity and system stability, so we recommend taking drives out of service the moment they appear.
They recommend to replace the drive at 300TB.
That is what the drive is warranted for not how long it will actually last
Warranted means just some regular number, which fulfills optimistic ads of manufacturer versus his risk appetite to be liable for the damages. Usually as with any insurance, it is a borderline where it satisfies the underwriter and the insurer - so both parties are happy.

When you buy a new car, then you clearly expect it to last under warranty for 60K, 80K, 100K miles or 5 years whichever comes first. My annual mileage is 10K and it would be reasonable to be out of warranty at year 5 with 50K miles for me. Further, knowing that i am out of warranty, I could easily spare another 50K to hit total 100K before selling my car in 10 years. Here we clearly don't want to stretch out the meanings, saying that cars are good even after warranty expires and some cars can make 1 million miles (Toyota Tundra, Nissan pickup) and lots of car hitting 300K miles.
I am ok with the numbers of TBW. I am not ok with the fact that "my car is driving around without me, accumulating mileage even when i am sleeping or sitting in the office". That is it.

If the ssd drives are so durable and cars can last far more beyond warrantied period/mileage, then why I see so many people getting rid of their cars before 100K? Why I see lots of my elderly and not so friends actively seeking for at least CPO under 30K miles if not new?
If high-mileage is not a problem, then why everybody says "meh" when they see my car with 205K miles saying: aren't you afraid to be left stranded?
 
  • Like
Reactions: featherlessbird

harshw

macrumors regular
Feb 19, 2009
202
54
SSD collecting power cycles is normal. It will be shut down when not needed to save power. Especially after a longer time in sleep you will see the count increase a lot because the SSD is constantly powering down and up again when Power Nap kicks in.

If this were the case, we would expect to see the number of power cycles steadily increasing over time. Assuming that the behavior was the same, we would also expect the % or rate of increase to be somewhat constant since it would depend on the macbook sleeping / waking in a certain manner given the same set of apps and user interactions.

Except that it isn't happening now - I do not see ANY increase in the number of power cycles (see below) EXCEPT when I reboot the machine.

I don't think the power cycles refers to machine power on/off cycles.

I ran 'smartctl -a disk0' again today and power cycles is still 132. Rebooted and now power cycle is 133. It did not increase unless I rebooted the machine

Some folks have said the number of power cycles jumped significantly when installing an update or updating from Big Sur to Monterey. Anyone with this experience?

Another possibility is that the number of cycles is from automated testing. Again - one would expect the cycles for different machines to be very similar unless Apple was taking returns, disassembling parts, installing them in new chassis and shipping them back. I don't care as long as power cycles do not affect longetivity (an SSD has no moving parts) but really curious as to why the high number of power cycles for this machine
 

Maximara

macrumors 68000
Jun 16, 2008
1,707
908
Why are you dredging up this nonsense again? I’ve conclusively proved that the information reported by smartmontools is the SMART data that Apple returns from their own NVME SMART API. If the data is wrong on smartmontools it is on Apple to fix it. The data isn’t wrong anyway.
So the percentage is correct and the drive will last 100 years as I first stated. :p As I said before you can't pick and choose what part of the data you use and that is why I am "dredging up this nonsense again". Also if you are really that paranoid just boot up from an external or cut down on using a ridiculous number of tabs in the browser (as well as turn off the disk cache).
 

jdb8167

macrumors 601
Nov 17, 2008
4,859
4,599
As I said before you can't pick and choose what part of the data you use
Why would I pick and choose what data to believe? The data comes from 100% all Apple sources. It comes from the NVMe controller built into the M1 SoC. That data is retrieved by MacOS and is relayed to the 3rd party app via the NVMe SMART API that is part of MacOS. Every bit of that chain belongs to Apple.

Apple, as far as I know, doesn’t warranty the Mac or the SSD based on TBW so there is no reason to fudge the numbers. If they didn’t want the information available all they have to do is not supply the data through the API.

The data is not wrong and smartmontools works correctly. Anything else is pure FUD.
 

Airine

macrumors newbie
Aug 29, 2020
3
3
Hello everyone!

I have recently bought a base model of MBA, upgraded it to the latest Monterey version and it wrote 1.6 TB!!!!! in 3 days until I noticed that swap was as high as 400-500 megs. Then I started digging, turned off Spotlight indexing for everything but applications, turned off local copies for TM and eventually got it down to around 30-40 Gigs per day after restart

However, I noticed a few issues when Mac was sleeping

1) it was waking up every 10-15 min (I turned off "wake for network access but it did not help)
2) it was writing around 150 megs of from swap each of those wake up sessions

Disabling power nap in terminal helped

There is still a strange behaviour I'm seeing in IStat Menus

As soon as Mac wakes up, swap usage does not go down no matter what and only restart helps. Sometimes I see swap usage going as high as 300 megs and it does not decrease until I restart the Mac

It is highly upsetting that I have to constantly monitor for swap not to go overboard to restart when necessary. After a restart even though I use the same apps, swap holds up at 0 for some time

I am using a few non native apps, however, I never saw any of those apps put any strain on my RAM

Did any of you notice the same behaviour with Swap keeping steady use and not going down?

1643200209972.png
 
  • Like
Reactions: Thistle41

mr_roboto

macrumors 6502a
Sep 30, 2020
856
1,866
Hello everyone!

I have recently bought a base model of MBA, upgraded it to the latest Monterey version and it wrote 1.6 TB!!!!! in 3 days until I noticed that swap was as high as 400-500 megs. Then I started digging, turned off Spotlight indexing for everything but applications, turned off local copies for TM and eventually got it down to around 30-40 Gigs per day after restart

However, I noticed a few issues when Mac was sleeping

1) it was waking up every 10-15 min (I turned off "wake for network access but it did not help)
2) it was writing around 150 megs of from swap each of those wake up sessions

Disabling power nap in terminal helped

There is still a strange behaviour I'm seeing in IStat Menus

As soon as Mac wakes up, swap usage does not go down no matter what and only restart helps. Sometimes I see swap usage going as high as 300 megs and it does not decrease until I restart the Mac

It is highly upsetting that I have to constantly monitor for swap not to go overboard to restart when necessary. After a restart even though I use the same apps, swap holds up at 0 for some time

I am using a few non native apps, however, I never saw any of those apps put any strain on my RAM

Did any of you notice the same behaviour with Swap keeping steady use and not going down?

View attachment 1949557
Do you see "Page Ins" and "Page Outs" in your screen shot there? Page Outs represents how many KB/s your computer is writing to swap. While that number is zero, your computer is not writing.

There is no reason to worry about "Swap Used" reaching some small figure like 300 MB and not going down. Swapfile use cannot always go down over time; pulling things in from the swapfile is demand based (the OS doesn't do it until a process asks for it) and thus when the OS swaps out stuff which is never touched again, it will stay in the swapfile until a reboot allows the whole swapfile to be deleted.

Speaking of reboots, every time you reboot just because you're afraid to see some stuff in the swap file, you are almost certainly causing a lot of writes to your SSD. So that's not a great idea.

As long as there's not lots of swapin/swapout all the time, and as long as your swap used stays at less than a quarter of your computer's RAM, there's really nothing to be concerned about. You're making yourself needlessly upset trying to make all these things be zero.
 

Airine

macrumors newbie
Aug 29, 2020
3
3
Do you see "Page Ins" and "Page Outs" in your screen shot there? Page Outs represents how many KB/s your computer is writing to swap. While that number is zero, your computer is not writing.

There is no reason to worry about "Swap Used" reaching some small figure like 300 MB and not going down. Swapfile use cannot always go down over time; pulling things in from the swapfile is demand based (the OS doesn't do it until a process asks for it) and thus when the OS swaps out stuff which is never touched again, it will stay in the swapfile until a reboot allows the whole swapfile to be deleted.

Speaking of reboots, every time you reboot just because you're afraid to see some stuff in the swap file, you are almost certainly causing a lot of writes to your SSD. So that's not a great idea.

As long as there's not lots of swapin/swapout all the time, and as long as your swap used stays at less than a quarter of your computer's RAM, there's really nothing to be concerned about. You're making yourself needlessly upset trying to make all these things be zero.

Whoa! I did not know that page outs show how much Mac is writing to swap.

I also did not know that reboot causes more harm than good....

Good thing I posted here before doing any more damage 👀

Thank you for the detailed response, one less thing to worry about now 😀
 

Thistle41

macrumors member
Mar 25, 2021
74
39
UK
Hello everyone!

I have recently bought a base model of MBA, upgraded it to the latest Monterey version and it wrote 1.6 TB!!!!! in 3 days until I noticed that swap was as high as 400-500 megs. Then I started digging, turned off Spotlight indexing for everything but applications, turned off local copies for TM and eventually got it down to around 30-40 Gigs per day after restart

However, I noticed a few issues when Mac was sleeping

1) it was waking up every 10-15 min (I turned off "wake for network access but it did not help)
2) it was writing around 150 megs of from swap each of those wake up sessions

Disabling power nap in terminal helped

There is still a strange behaviour I'm seeing in IStat Menus

As soon as Mac wakes up, swap usage does not go down no matter what and only restart helps. Sometimes I see swap usage going as high as 300 megs and it does not decrease until I restart the Mac

It is highly upsetting that I have to constantly monitor for swap not to go overboard to restart when necessary. After a restart even though I use the same apps, swap holds up at 0 for some time

I am using a few non native apps, however, I never saw any of those apps put any strain on my RAM

Did any of you notice the same behaviour with Swap keeping steady use and not going down?

View attachment 1949557
Useful info, thanks for posting.

In my case having done all those things you have tried, I have still had massive TBW events (see my posts passim). However, what does give a workable solution, (only 200gb over 5 days), is to do this:

  1. Don't just close the lid with a browser (FF in my case) active. Quit the browser first.
  2. Keeping power connected seems to remove the restriction above - strange but true.
  3. You can simply log off instead of rebooting that will clear any cache and swap
  4. I have found using 'Lock Screen' does a lot more shutting down of activity than 'Sleep'
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.