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.

ManicMarc

macrumors 6502
Jul 1, 2012
487
149
I mean it has come out that Windows 10 freaking defrags the SSD it boots from. Say what?! I know the Windows file structure is old but that is insane. As Macworld stated "If you have an SSD defragging will have no benefits and will damage your drive". Were is the outrage from the much larger windows community about this piece of stupid?

This from 2014:
No, Windows is not foolishly or blindly running a defrag on your SSD every night, and no, Windows defrag isn't shortening the life of your SSD unnecessarily. Modern SSDs don't work the same way that we are used to with traditional hard drives.

Yes, your SSD's file system sometimes needs a kind of defragmentation and that's handled by Windows, monthly by default, when appropriate. The intent is to maximize performance and a long life. If you disable defragmentation completely, you are taking a risk that your filesystem metadata could reach maximum fragmentation and get you potentially in trouble.
 

ambient_light

macrumors member
Feb 23, 2021
59
65
This doesnt work on M1.
After SIP disabling, reboot, Terminal & launching commands, reboot - I launched memory demanding app (Witcher 3 in CrossOver) and my swap is used (Activity Monitor shows use around 1Gb swap after 1min of play)

Shared my experience with turning the swap off on M1, earlier here, the command is slightly different on M1. Was able to turn it off and, system worked OK under the normal load, and created a small swap (up to 200Mb) under stress, before reporting the memory limit. Didn't hit any kernel panics, or similar issues.

However, it involves downgrade of the OS security due to turning off SIP in the Restore mode, due to the security hardening, new to M1. Basically Apple no longer allows to modify boot parameters without downgrading security. The side-effect of it is that some secured system functions will not work as expected, e.g. Apple Pay failed for me.

It turned out that there's a finer grained alternative to turning off SIP completely, that is the new M1 "bputil -a" command, still causing the security downgrade:
-a, --disable-boot-args-restriction

Because this option automatically downgrades to Reduced Security mode if not already true, selecting this option will make your system easier to
compromise!

In a nutshell, to turn swap off, you need to boot to Restore mode, fire on Terminal, and type:

Bash:
nvram 40A0DDD2-77F8-4392-B4A3-1E7304206516:boot-args=vm_compressor=2
bputil -a

After the normal reboot the swap will be disabled, can be checked by sysctl vm.compressor_mode returning 2 instead of 4. In order to turn it back on, you have to run bputil -f in the Restore mode.

I've decided to keep the swap on for now for my MBA after seeing the improvements in the 11.3b4 - can live with moderate writes for now without meddling with the implications of the security downgrade.
 
Last edited:
  • Like
Reactions: Leon1das and tCC_

ambient_light

macrumors member
Feb 23, 2021
59
65
Can someone confirm if this terminal command works on the m1 series:
sysctl vm.swapusage

Using this command changes nothing and will hurt nothing.
All it does is render a report on VM swap.

If VM is off, report should be:
vm.swapusage: total = 0.00M used = 0.00M free = 0.00M

That's what I see on my INTEL-based 2018 Mini with VM disk swapping disabled.

I was wondering if this reporting command works on the m1 side of things...
It works accurately, but provides current swap usage, that is different from the swap mode. In order to see the mode, you need to run

Bash:
sysctl -a vm.compressor_mode

The result 4 means swap is enabled, 2 - swap is off.
 

Silvestru Hosszu

macrumors 6502
Oct 2, 2016
357
234
Europe
I've been following this thread from the beginning, and posted a few pages before.
Right now, my Intel MBP 16 writes more to the ssd the my M1 MBP.
Both machine have 16 gb of ram and are on the latest BS.
Both machines are used for office tasks (office 365 and Adobe Acrobat) and light photo editing (Luminar 4 and Pixelmator).
Indexing is on but I do not use time machine and icloud backup but one drive.
The average writes are around 25 GB/day on the Intel MBP and 10-15 GB/day on the M1 MBP. The average was calculated based on the usage from last 10 days.
My conclusion is that the issue is BS related not M1.
 

AndyMacAndMic

macrumors 65816
May 25, 2017
1,112
1,676
Western Europe
I mean it has come out that Windows 10 freaking defrags the SSD it boots from. Say what?! I know the Windows file structure is old but that is insane.

No it does not. If you look in the windows 10 settings you will notice it will recognize the SSD as an actual SSD. If you optimize this SSD Windows will send a 'trim' command to the controller of the SSD. Trimming is not a defrag at all.

I don't know where you get your information from, but you should re-evaluate your sources.

Some links to the subject:

https://www.digitalcitizen.life/simple-questions-what-trim-ssds-why-it-useful/
https://www.hanselman.com/blog/the-real-and-complete-story-does-windows-defragment-your-ssd
https://lifehacker.com/windows-does-defragment-ssds-but-its-okay-1666753409
https://www.reddit.com/r/Windows10/comments/76ngdn
 
Last edited:

Maximara

macrumors 68000
Jun 16, 2008
1,707
909
No it does not. If you look in the windows 10 settings you will notice it will recognize the SSD as an actual SSD. If you optimize this SSD Windows will send a 'trim' command to the controller of the SSD. Trimming is not a defrag at all.

I don't know where you get your information from, but you should re-evaluate your sources.

Some links to the subject:

https://www.digitalcitizen.life/simple-questions-what-trim-ssds-why-it-useful/
https://www.hanselman.com/blog/the-real-and-complete-story-does-windows-defragment-your-ssd
https://lifehacker.com/windows-does-defragment-ssds-but-its-okay-1666753409
https://www.reddit.com/r/Windows10/comments/76ngdn
You missed the "Yes, your SSD's file system sometimes needs a kind of defragmentation and that's handled by Windows, monthly by default, when appropriate." nonsense. If the file system wasn't an antiquated mess the SSD wouldn't "need" defragging.
 

pistonpilot

macrumors regular
Dec 22, 2019
137
110
Bangkok, Thailand
Can someone confirm if this terminal command works on the m1 series:
sysctl vm.swapusage

Using this command changes nothing and will hurt nothing.
All it does is render a report on VM swap.

If VM is off, report should be:
vm.swapusage: total = 0.00M used = 0.00M free = 0.00M

That's what I see on my INTEL-based 2018 Mini with VM disk swapping disabled.

I was wondering if this reporting command works on the m1 side of things...
I can confirm that it gives a result on Silicon.
 

Fishrrman

macrumors Penryn
Feb 20, 2009
29,248
13,323
ambient wrote in 1,504 above:
"sysctl -a vm.compressor_mode
The result 4 means swap is enabled, 2 - swap is off."

When I run that (on my 2018 Mini with VM disabled), I get:
vm.compressor_mode: 1
 

ambient_light

macrumors member
Feb 23, 2021
59
65
ambient wrote in 1,504 above:
"sysctl -a vm.compressor_mode
The result 4 means swap is enabled, 2 - swap is off."

When I run that (on my 2018 Mini with VM disabled), I get:
vm.compressor_mode: 1
Right, this mode is another option, and it means that both memory compression and swap are disabled. In theory it should be less efficient than mode 2 (only swap is off, compression is on), and not sure what gonna be an effect on stability.
 

DeanL

macrumors 65816
May 29, 2014
1,357
1,290
London
No it does not. If you look in the windows 10 settings you will notice it will recognize the SSD as an actual SSD. If you optimize this SSD Windows will send a 'trim' command to the controller of the SSD. Trimming is not a defrag at all.

I don't know where you get your information from, but you should re-evaluate your sources.

Some links to the subject:

https://www.digitalcitizen.life/simple-questions-what-trim-ssds-why-it-useful/
https://www.hanselman.com/blog/the-real-and-complete-story-does-windows-defragment-your-ssd
https://lifehacker.com/windows-does-defragment-ssds-but-its-okay-1666753409
https://www.reddit.com/r/Windows10/comments/76ngdn
And see, Microsoft didn't actually come out to correct all of the non-sense that went around (and still does). People figured out themselves that they were wrong.

See point a) and b) (yes it wasn't this specific forum but you get the principle)
Or because
a) Apple doesn't issue press releases or support documents about every single thing MacRumors Forum users are concerned with.
b) This forum is an echo room.
c) No one here actually has proof that the data being reported using the third party apps they have used is actually accurate/that the data is being interpreted correctly, or that the SSDs in Apple computers wouldn't be able to withstand the amount of data written if the data reported turned out to actually be accurate.
 
  • Love
Reactions: Maximara

AndyMacAndMic

macrumors 65816
May 25, 2017
1,112
1,676
Western Europe
You missed the "Yes, your SSD's file system sometimes needs a kind of defragmentation and that's handled by Windows, monthly by default, when appropriate." nonsense. If the file system wasn't an antiquated mess the SSD wouldn't "need" defragging.
No I did not miss that. That what you call 'a kind of defragmentation' is actually 'trimming' (2 completely different things). This trimming also happens in MacOS periodically by default (when the Mac comes with an SSD installed):

1616350159841.png


https://www.cnet.com/how-to/installing-ssd-on-mac-trim-mistake/#:~:text=By default, Mac OS, unlike,and can be wiped internally.

This has nothing to do with an 'antiquated' file system You simply confuse defragging and trimming. Maybe some of the information on the web is confusing, because some people call it 'a kind of defragging'.

In a nutshell: MacOS and Windows behave exactly the same when it comes to optimizing SSD's. It is called trimming. Again: re-read your sources. It seems you are mis-interpreting some information. Your claim that Windows defrags SSD's is simply not true.
 
Last edited:

majormike

macrumors regular
May 15, 2012
113
42
No I did not miss that. That what you call 'a kind of defragmentation' is actually 'trimming' (2 completely different things). This trimming also happens in MacOS periodically by default (when the Mac comes with an SSD installed):

View attachment 1747149

https://www.cnet.com/how-to/installing-ssd-on-mac-trim-mistake/#:~:text=By default, Mac OS, unlike,and can be wiped internally.

This has nothing to do with an 'antiquated' file system You simply confuse defragging and trimming. Maybe some of the information on the web is confusing, because some people call it 'a kind of defragging'.

In a nutshell: MacOS and Windows behave exactly the same when it comes to optimizing SSD's. It is called trimming. Again: re-read your sources. It seems you are mis-interpreting some information. Your claim that Windows defrags SSD's is simply not true.
My Windows drives, given the things I've put them through, have such a crazy low TBW.
 

Maximara

macrumors 68000
Jun 16, 2008
1,707
909
Thank you for this, and I stand corrected as I must admit I couldn’t find the tweet myself and I was just referring to it from my memory. Clearly that case is completely invalid then, and can be disregarded, as that is not something the system was designed to do at all. So we’re currently at 0? reasonable known SSD M1 failures, which is lovely, and hopefully this stays that way for a very long time.
Don't feel too bad. I was only able to find it because it had been posted in one of these threads and I had replied to it. Without those pointers I wouldn't have found the thing and my search skills with google are really good.
With the percentage I was just referring to the fact that it is really based on some unknown preset number by the manufacturer, for warranty purposes. For example I have a working SSD pulled from a machine that has 125% wear last time I checked. I’ve only replaced it to not have to worry about the inevitable, but it does indeed still function completely normally in every sense, and shows no errors in SMART or any other sense. It was used 24/7 and constantly had many reads and writes for a very long time. The percentages are nothing other than for warranty purposes.
Exactly my point. If 15.7 TB is only 1% then it logically follows that 100% is 1570 TB. This is what Is There A Problem? SSDs Affected By Swap Memory on M1 Macs points about Longhorn's post which is what seemed to have triggered off all this.

Truly no one knows when their SSD will fail, however it’s very reasonable to think it will at least last for it’s 100% wear as that is the manufacturers claim.
Exactly and since these third party tools are telling us what amount of the wear number has been used it is middle school math easy to figure out what the "warranted" TBW should be. Problem is when I have done this is have gotten some really insane numbers.

For example Fomalhaut said "My MBP16 (32GB/1TB) has 1550 power-up hours and 170TB written (in about 15 months of work-usage). That works out at 110GB/hour. smartctl reports 2% used. I'm going to start to be more rigorous about closing apps and keeping swap memory usage down."

As I previously pointed out, the TB*100/percentage = TBW crosscheck produces at worst 6827 (170*100/2.49) TBW for the drive. More over If 170TB written is 2% then 170TB x 50 would be 100% which is 8500 TBW,

Ok that is nuts, there is no way there are 6827 TBW, much less 8500 TBW, SSDs that are sanely priced (assuming they exist at all).

Since the formula derived from the one everyone and his brother has been using to predict how long the SSDs last per "Eliminate the impossible and whatever remands no mater how improbable is the truth" smartctl must be generating untrustful numbers and is therefore useless.
It’s very possible that all of these M1 Macs will last for even 2PB of writes to the SSD as that is completely possible, and then none of this is really an issue at all as even with a TB+ written every week you are looking at many years of use. Maybe the problem lies in the uncertainty of the future?
This is assuming the tool being used actually works correctly which given some of the totally impossible numbers a simple middle school crosscheck produces doesn't seem to be the case. And before someone brings up Activity Monitor Apple M1 SSD Lifespan Ageing. Do YOU have the problem? shows that Activity Monitor is only useful if you have no other drives connected either physically or via wifi.

This is because Activity Monitor shows all data written to all drives. If you have time machine active (which should be to an external drive because IMHO not doing so defeats the whole purpose of the feature) than Activity Monitor will show the writes to the SSD AND to the external Time Machine drive. I assume the same is true of iCloud and Time Capsule.

This makes Activity Monitor very limited as a check tool and given nobody I know of pointed out this fact before the Apple M1 SSD Lifespan Ageing. Do YOU have the problem? video came out means people would misread any data Apple gave out and freak out over 10TB even if the 10TB they see is actual 1 TB to the SSD and the rest (9 TB) is to the external Time Machine drive.

For example I did a clean install of my OS followed by file restore and full Time Machine back up. Activity Monitor showed 1.87 TB written which given the drive was 930 GB was made sense as 930x2 is 1.86 which given how much spotlight uses is within reason. It does NOT mean 1.87 TB written was written to the main HD the system booted from but that disk AND time Machine. :mad:
 
Last edited:

IceStormNG

macrumors 6502a
Sep 23, 2020
517
676
What is crazy is Chrome is a fork of what is under the hood of Safari.
Well... the difference is pretty big by now. Chromium is based on Blink which is based on WebKit (which is used by Safari). Chromium and WebKit are pretty different by now. And Google Chrome adds even more changes to that.
 

Maximara

macrumors 68000
Jun 16, 2008
1,707
909
Well... the difference is pretty big by now. Chromium is based on Blink which is based on WebKit (which is used by Safari). Chromium and WebKit are pretty different by now. And Google Chrome adds even more changes to that.
Chrome's use of RAM reminds me of the plant in the original (1960) Little Shop of Horrors - "Feed Me." If Chrome is doing the same thing on Windows with their SSD then the nickname one of the characters has for the plant, "Dumbbell Jr.", comes to mind. It seams only Firefox with everything turned off is on par with Safari but what Chrome is doing is just off the wall nuts.
 
Last edited:

Spudlicious

macrumors 6502a
Nov 21, 2015
936
818
Bedfordshire, England
Can someone confirm if this terminal command works on the m1 series:
sysctl vm.swapusage

Using this command changes nothing and will hurt nothing.
All it does is render a report on VM swap.

If VM is off, report should be:
vm.swapusage: total = 0.00M used = 0.00M free = 0.00M

That's what I see on my INTEL-based 2018 Mini with VM disk swapping disabled.

I was wondering if this reporting command works on the m1 side of things...
This is what I get:

Swap.png


I have done nothing to turn off VM disk swapping.

To contribute my tuppence worth to this topic, I just now ran the SmartMon and obtained the following:

Screenshot 2021-03-21 at 22.25.39.png


When I first ran the utility on March 10th the write figure was 959GB. I received this machine on January 5th, and I proceeded to download a bunch of bulky stuff such as Steam and a few games, and Xcode, all of that stuff soon deleted. It very much looks like my write activity was concentrated in those early days, and as of now I have no concerns at all with how the computer is running. True, I am a light user and never have more than half a dozen Safari tabs, but I do have Spotlight enabled - it's great! - and do nothing to minimise my demands of the machine. I just use it and am still hugely impressed.

A person can spend a fair slice of time following this thread.....
 

Spudlicious

macrumors 6502a
Nov 21, 2015
936
818
Bedfordshire, England
Perhaps more usefully for Fishrrman I now have 22 Safari tabs (just for research purposes - why would I have that many in normal use?) and the Terrminal command sysctl vm.swapusage gives me:

Swap2.png


So what does this mean for the price of fish? Swap files have been common for a long time, I certainly remember being able to adjust the swapfile size in early versions of Windows in the nineties. You fill your RAM and some of it gets written to disk, it's a neat idea, nothing to see here.

When I was learning to drive in the sixties the instructors told me to use the gearbox to lose speed when approaching a halt such as traffic lights, the idea was to minimise brake wear. Nowadays such notions have been consigned to history, of course you use the brakes to slow down, that's what they're for. Similarly, I'm not going to worry about writing to the SSD, that's what it's there for.
 

pistonpilot

macrumors regular
Dec 22, 2019
137
110
Bangkok, Thailand
At this point, we don't know if Apple is to blame. If facts come forth that show Apple is to blame, I would have no problem adding my voice to those blaming Apple. However, I am not going to blindly blame Apple for something I don't know to be true. Doing that would be illogical and stupid, in my opinion.
Are you serious? Who is responsible for the equipment sold to us? IBM or Apple? It's ridiculous to run defense for Apple as if they are not ultimately responsible for the merchantability of their product. Stop it.
 

majormike

macrumors regular
May 15, 2012
113
42
Are you serious? Who is responsible for the equipment sold to us? IBM or Apple? It's ridiculous to run defense for Apple as if they are not ultimately responsible for the merchantability of their product. Stop it.
Why should it be Apple's fault when something wasn't tested?

Next time he buys a chair from Ikea that breaks after half a year of usage, he'll blame the supplier right? 🤷🏼‍♂️
 
Last edited:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.