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.

Mc0

macrumors regular
Nov 6, 2017
188
369
I Installed 11.4 RC and so far things look good. I decided to open up 22 apps over 2 desktops at the same time to see how the Mini coped and I was impressed. Everything ran nicely and the memory optimisation hadn’t instantly started to use swap. Photoshop, Lightroom CC and Lightroom Classic all open. Data written over a 4 hour period only 6gb.

View attachment 1778462
View attachment 1778465 View attachment 1778466
That's great news. I opened my 2017 MBP to check emails for 10 minutes and put it to sleep for 3hrs with no running apps and it had 4.91 GB written. I'm on Big Sur 11.3.
 

TheSynchronizer

macrumors 6502
Dec 2, 2014
443
729
Screenshot 2021-05-21 at 21.55.00.png

Big Sur 11.3.1 on M1, launchd seems to have some issue that's causing it to write a lot of data when the system is idle/auto-sleeps. Anyone else experiencing this issue?

I'm still writing only around 1.3GB/hour so it's not critical, but its clearly an issue.

EDIT: Seems that this issue only happens / is a lot worse when the system is idle for more than 15 minutes / auto sleeps when I have my peripheral hub connected which I'm using to connect my external HDMI monitor. Using the macbook standalone and letting it idle doesn't seem to make launchd write anywhere near as much data..
 
Last edited:
  • Like
Reactions: sneeks

sneeks

macrumors 65816
Oct 21, 2007
1,017
390
Glasgow, UK
That's great news. I opened my 2017 MBP to check emails for 10 minutes and put it to sleep for 3hrs with no running apps and it had 4.91 GB written. I'm on Big Sur 11.3.
I used the Mini tonight for a little over a hour, mainly web browsing and watching YouTube. Closed all apps and put it to sleep. After 4:46 hours total uptime I have 3.99gb written, none of this from swap memory use. This includes the first 70-80 minutes of use.

85A78B1B-FECA-4A64-B681-85D42142A0CB.jpeg

A14FCA72-C9EE-4F1F-A17A-47FD0BF37DF3.jpeg
 
Last edited:

TheSynchronizer

macrumors 6502
Dec 2, 2014
443
729
I used the Mini tonight for a little over a hour, mainly web browsing and watching YouTube. Closed all apps and put it to sleep. After 4.45 hours total uptime I have 3.99gb written, none of this from swap memory use. This includes the first 70-80 minutes of use.

View attachment 1778879

View attachment 1778878
As crazy as it sounds, it seems my macbook actually writes more data when it's idle / sleeps / not being used than when I use it when it's hooked up to my external monitor (the way I usually use it for work).

My writes are still way below anything I'd worry about but obviously a correctly functioning system shouldn't be writing more data when it's not being used, than when it is. Very strange.
 

sneeks

macrumors 65816
Oct 21, 2007
1,017
390
Glasgow, UK
As crazy as it sounds, it seems my macbook actually writes more data when it's idle / sleeps / not being used than when I use it when it's hooked up to my external monitor (the way I usually use it for work).

My writes are still way below anything I'd worry about but obviously a correctly functioning system shouldn't be writing more data when it's not being used, than when it is. Very strange.
No backup running while idle? It is strange if not that so much data would be written while idle.
 

TheSynchronizer

macrumors 6502
Dec 2, 2014
443
729
No backup running while idle? It is strange if not that so much data would be written while idle.
No backup, no network drives/devices.
Screenshot 2021-05-21 at 22.46.34.png

Uptime of 58 hours and as you see the writes from swap are very minimal. Definitely some bug because there is simply no reason for launchd to write this much - all it does is launches all the system daemons. Seems like something gets stuck in a loop specifically when I let the system idle 15+ minutes, sleeping or not, with my external monitor plugged in through my USB hub. Using the macbook by itself and launchd will only write around 1GB a day at max.

Very strange. I've filed a bug report so hopefully this gets noticed.
 

sneeks

macrumors 65816
Oct 21, 2007
1,017
390
Glasgow, UK
That does seem very unusual that it’s so different depending on what you have connected or not. I didn’t want to wait so installed the beta profile then removed it again after I’d updated to the 11.4 RC, you may find it makes a difference for you too.
 

IceStormNG

macrumors 6502a
Sep 23, 2020
517
676
As crazy as it sounds, it seems my macbook actually writes more data when it's idle / sleeps / not being used than when I use it when it's hooked up to my external monitor (the way I usually use it for work).
That is normal. When the machine is in idle, macOS does all the housekeeping and background tasks. By default background tasks are scheduled with reduced priority which makes them not run at all when you use your machine. (there's a command that makes them run at regular priority. For example to speed up time machine backups).

This would make background tasks run without throttle.
Bash:
sudo sysctl debug.lowpri_throttle_enabled=0

A reboot or this reverts it back to default
Bash:
sudo sysctl debug.lowpri_throttle_enabled=1

In idle, macOS also preemptively swaps ram to disk or compresses memory if not disabled and "if necessary" (Apple's definition of "necessary" is a bit different from mine here, but ok).
 

TheSynchronizer

macrumors 6502
Dec 2, 2014
443
729
That is normal. When the machine is in idle, macOS does all the housekeeping and background tasks. By default background tasks are scheduled with reduced priority which makes them not run at all when you use your machine. (there's a command that makes them run at regular priority. For example to speed up time machine backups).

This would make background tasks run without throttle.
Bash:
sudo sysctl debug.lowpri_throttle_enabled=0

A reboot or this reverts it back to default
Bash:
sudo sysctl debug.lowpri_throttle_enabled=1

In idle, macOS also preemptively swaps ram to disk or compresses memory if not disabled and "if necessary" (Apple's definition of "necessary" is a bit different from mine here, but ok).
Interesting. I mean of course, if it ain’t broke don’t fix it, and my writes are more than low enough to not be a problem as of now anyway.

But i’m curious - how much does your launchd write?

As accurate as im sure your analogy is, it still doesn’t explain why when my macbook is sleeping on A/C with no usb hub and no monitor attached, launchd will write around 1GB for the whole day no matter if I sleep the macbook with the lid closed or it auto sleeps when I step away from it. But when i manually sleep it or it auto sleeps when it’s connected to my hub and my external monitor, it will write significantly more during the day while being connected to these (in clamshell mode).

That all being said, significantly more is the difference of 1GB and 13GB written during the day by launchd - 12GB is not problematic in any sense anyway. If this happened to scale up though it could definitely be an issue when unnoticed, and if its a bug of some sort then there’s no telling how it could behave.

Ill try running my macbook connected to my hub and monitor, but with the display open instead of clamshell, to see if that makes a difference for the day.
 

IceStormNG

macrumors 6502a
Sep 23, 2020
517
676
My launchd... urm it has written 21GB in 2,5 days. But I'm back on Catty. Not sure how that compares. And I always have the background priority tweak on. My Mac has enough power to process the background tasks, like time machine backups, immediately.

As accurate as im sure your analogy is, it still doesn’t explain why when my macbook is sleeping on A/C with no usb hub and no monitor attached, launchd will write around 1GB for the whole day no matter if I sleep the macbook with the lid closed or it auto sleeps when I step away from it. But when i manually sleep it or it auto sleeps when it’s connected to my hub and my external monitor, it will write significantly more during the day while being connected to these (in clamshell mode).

That all being said, significantly more is the difference of 1GB and 13GB written during the day by launchd - 12GB is not problematic in any sense anyway. If this happened to scale up though it could definitely be an issue when unnoticed, and if its a bug of some sort then there’s no telling how it could behave.
That's a good question. I haven't looked into that anymore. I just disabled swap on my machine and never looked back. I have better things to do than to observe my OS to not shred my SSD for no good reason. And my 32GB RAM are more than enough. I don't even need swap. Not even with multiple VMs running.

And as macOS has no way to set the "swapiness", I just disabled it. Problem solved.

launchd controls a ton of things.

Bash:
sudo iosnoop | grep launchd

This catches live I/O activity of launchd in your terminal. It lists the I/O activity and the file it writes to. Maybe you can find out what causes these large writes (5th column is I/O size for that access).
 
  • Like
Reactions: TheSynchronizer

Maximara

macrumors 68000
Jun 16, 2008
1,707
908
No backup, no network drives/devices. View attachment 1778896
Uptime of 58 hours and as you see the writes from swap are very minimal. Definitely some bug because there is simply no reason for launchd to write this much - all it does is launches all the system daemons. Seems like something gets stuck in a loop specifically when I let the system idle 15+ minutes, sleeping or not, with my external monitor plugged in through my USB hub. Using the macbook by itself and launchd will only write around 1GB a day at max.

Very strange. I've filed a bug report so hopefully this gets noticed.
I think I might have a partial explanation - the unified memory handles both RAM and video and for some insane having the monitor attached cause launchd to go off its nut. On a side note do you see this just with the monitor or when the hub is atached?
 

TheSynchronizer

macrumors 6502
Dec 2, 2014
443
729
I think I might have a partial explanation - the unified memory handles both RAM and video and for some insane having the monitor attached cause launchd to go off its nut. On a side note do you see this just with the monitor or when the hub is atached?
I’ll have to investigate this too - which combination specifically causes the issue and why it doesn’t appear to happen with other combinations.

And thanks to @IceStormNG ‘s great suggestion i’ll also see if I can specifically track which launchd thread causes the high I/O.

But seeing as their launchd has written similar amounts of data, this might just be intended performance which is completely fine and as I said, my system wrote in total 72GB over 56 hours which is nowhere near enough to be worried at all.

This thread has fallen much more silent because truthfully the issue of writes which could wear out SSD drives prematurely has been fixed for many of us with 11.3+ and/or with tweaks applied. The launchd writes i’m mentioning are purely curiosity on my behalf (whether they’re intended or not), and most likely some obsession over this whole situation which I need to let go of :p
 
  • Like
Reactions: sneeks

Kung gu

Suspended
Oct 20, 2018
1,379
2,434
The only thing that worries me now is that Apple has been awfully slow about actually releasing 11.4, its been RC for a week or so already?
11.4 RC was released on 17 may and 11.4 public release should be 24 May or sometime this week.
 

seadragon

macrumors 68000
Mar 10, 2009
1,872
3,151
I’m contemplating the purchase of a refurb M1 Mac Mini from Apple. I wonder if I should just wait and buy new once this is resolved? I have no idea how much “mileage“ would be on the refurb.
 

thingstoponder

macrumors 6502a
Oct 23, 2014
916
1,100
It’s fixed in 11.4. Swap usage will be much lower and same with disk writes.

For people with 8GB RAM, memory pressure will be higher because of less swap used than before.
16GB is very essential for heavy duty workflows.
So what was the issue? Was macOS using more swap than it did before? I thought it was something else.

Will this update make M1 Macs write the same amount as Intel Macs used to? I’ve been scared of buying an M1 Mac because of this.
 

Kung gu

Suspended
Oct 20, 2018
1,379
2,434
So what was the issue? Was macOS using more swap than it did before? I thought it was something else.

Will this update make M1 Macs write the same amount as Intel Macs used to? I’ve been scared of buying an M1 Mac because of this.
The issue was a bug in the macOS kernel. Yes look above there's a couple posts above that indicate the ssd writes are
lower in 11.4
 
  • Like
Reactions: helloapple1

thingstoponder

macrumors 6502a
Oct 23, 2014
916
1,100
The issue was a bug in the macOS kernel. Yes look above there's a couple posts above that indicate the ssd writes are
lower in 11.4
So performance will be worse or better on 8GB? I’m kind of confused with your comment on higher memory pressure.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.