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

inc0gnito

macrumors member
Original poster
Nov 20, 2020
42
12
This is because the computer is swapping a lot. And this is the exact reason I keep telling people to get the 16 GB model.
Out of 8 GB of ram, aproximately 6-6.5 GB is available - The rest goes to the GPU cores. With Mac Os easily using 3-4 GB after it's been running for a few hours, that basically leaves you with 2 GB for everything else, which is absolutely nothing. This then forces the computer to swap like crazy.
Even if your memory pressure is green, that is NOT an indication that everything is good memory wise. It will usually be green even when the computer is swapping like mad. My computer currently is using 30 gb of swap and memory pressure is green. But the computer is substantially slower compared to when it's barely using any swap at all. The memory pressure metric is useless for everything but showing when it spikes high temporaily
If your computer is using 30gb of swap - can you check what's your kernel_task disk figure? Out of curiosity!

Thanks!
 

inc0gnito

macrumors member
Original poster
Nov 20, 2020
42
12
A single Amazon tab in Safari uses around 400MB on my MBA. If you keep a lot of tabs open, then that's a lot of swapping.

@inc0gnito Can you try running https://binaryfruit.com/drivedx and post a screenshot of Health Indicators?

The TBW specification for retail SSDs are for warranty purposes and is more of worst case with write amplification.

If we look at raw NAND writes at 3,000 P/E cycles (typical for 3D TLC NAND), that's 256GB: 768TBW; 512GB: 1.5PBW; 1TB: 3PBW; 2TB: 6PBW. I'm interested in estimating the TBW or P/E cycle rating for the Apple SSDs.

Here's another thread discussing the seemingly unusually high writes.

Here we are! Thanks
 

Attachments

  • Screenshot 2021-01-14 at 18.05.25.png
    Screenshot 2021-01-14 at 18.05.25.png
    2.2 MB · Views: 504

mlykke

macrumors regular
Aug 16, 2020
168
168
If your computer is using 30gb of swap - can you check what's your kernel_task disk figure? Out of curiosity!

Thanks!
Sure - Atm. 172 TB written and 171 TB read. As you can see the memory pressure is green, but I can assure you that performance with this amount of swap is not identical to a the same computer running a lower workload with very limited swap. thats why it's useless advice when somebody asks you to check your memory pressure - It doesn't really show how heavy the load on the system is.
 

Attachments

  • Screen Shot 2021-01-14 at 19.17.14.png
    Screen Shot 2021-01-14 at 19.17.14.png
    20.1 KB · Views: 328
  • Screen Shot 2021-01-14 at 19.18.12.png
    Screen Shot 2021-01-14 at 19.18.12.png
    20.3 KB · Views: 332
  • Like
Reactions: AAPLGeek

Leon1das

macrumors 6502
Dec 26, 2020
285
214
read it , hehe node module. Dam annoyance last time react native. Me going native way..
This might explain my low activity of kernel_task....

My Spotlight indexing is disabled in almost all locations on HDD....I just use it for apps..

Something I inherited from Windows times is to disable indexing immediately.

I just dont EVER need fast search results... Instead when I do search - its always thorough folder tree search in Finder...
 
  • Like
Reactions: alien3dx

Zazoh

macrumors 68000
Jan 4, 2009
1,516
1,121
San Antonio, Texas
Sure - Atm. 172 TB written and 171 TB read. As you can see the memory pressure is green, but I can assure you that performance with this amount of swap is not identical to a the same computer running a lower workload with very limited swap. thats why it's useless advice when somebody asks you to check your memory pressure - It doesn't really show how heavy the load on the system is.
Since buying MBA1 8Gb, I haven’t used swap yet. Whatcha doing? Video compiling?
 

inc0gnito

macrumors member
Original poster
Nov 20, 2020
42
12
Sure - Atm. 172 TB written and 171 TB read. As you can see the memory pressure is green, but I can assure you that performance with this amount of swap is not identical to a the same computer running a lower workload with very limited swap. thats why it's useless advice when somebody asks you to check your memory pressure - It doesn't really show how heavy the load on the system is.
I think I will have to disagree when it comes to swap.

I have done an experiment in which I run my computer for 10 hours and only used Safari (5 apps tops) - it clocked over 20gb of kernel_task within that period.
However though - is it possible I have issue with swap itself? Despite only running one application (!) I was still using at least a 1gb of swap? Shouldn't 8gb of RAM be enough for this sort of operation?

I have a feeling that you and me have an unaccounted for memory issue.
 

inc0gnito

macrumors member
Original poster
Nov 20, 2020
42
12
Cool. Thanks!

What drive capacity do you have? I think it's interesting that the "Life Percentage Used" still hasn't budged even a little with almost 16 TB of writes.
It's 512GB. I did find it quite interesting that there was no use. Maybe those SSD's have much higher life-span?
 

alien3dx

macrumors 68020
Feb 12, 2017
2,193
524
I think I will have to disagree when it comes to swap.

I have done an experiment in which I run my computer for 10 hours and only used Safari (5 apps tops) - it clocked over 20gb of kernel_task within that period.
However though - is it possible I have issue with swap itself? Despite only running one application (!) I was still using at least a 1gb of swap? Shouldn't 8gb of RAM be enough for this sort of operation?

I have a feeling that you and me have an unaccounted for memory issue.
kernel
my imac - heavy usage (14.03 gb)
my m1 macbook air - low usage (1.1gb)

swap
my imac 3.22 gb
my m1 macbook 25 mb
 

sila

macrumors newbie
Mar 10, 2021
1
1
I had the issue with kernel_ task eating using 23gb then after I try to research and disabled some services (not sure which service I try to enabled it back but the kernel still low usage) and I surprise that kernel_ task 33MB. also swap memory become 0byte from 9000MB.
 

Attachments

  • Screen Shot 2021-03-11 at 2.35.47 AM.png
    Screen Shot 2021-03-11 at 2.35.47 AM.png
    745.1 KB · Views: 226
  • Screen Shot 2021-03-11 at 2.39.06 AM.png
    Screen Shot 2021-03-11 at 2.39.06 AM.png
    565.6 KB · Views: 218
  • Like
Reactions: onelove4everu

TheSynchronizer

macrumors 6502
Dec 2, 2014
443
729
I had the issue with kernel_ task eating using 23gb then after I try to research and disabled some services (not sure which service I try to enabled it back but the kernel still low usage) and I surprise that kernel_ task 33MB. also swap memory become 0byte from 9000MB.
would it be possible to know what services you disabled, or where you did this research?
 

Ladas

macrumors newbie
Jan 20, 2013
3
2
Athens, Greece
I booted the M1 Air 8GB 24 hours ago, used Safari with 100 tabs, screenshot just before going to sleep, leaving the laptop to sleep as well :)
Screenshot 2021-04-05 at 21.48.10.png



Screenshot 8 hours later, when I woke the laptop from sleep

Screenshot 2021-04-06 at 07.53.35.png


I don't think that there is any good reason for me to leave the laptop in sleep mode ever again and definitely I need to figure what is going on ... 4TB in 24 hours, half of that when the laptop was in sleep mode seems a lot and probably confirms that something is not right...

Safari & Mail is 99% of my usage.
 
  • Like
Reactions: mi7chy

TheSynchronizer

macrumors 6502
Dec 2, 2014
443
729
I booted the M1 Air 8GB 24 hours ago, used Safari with 100 tabs, screenshot just before going to sleep, leaving the laptop to sleep as well :)
View attachment 1754273


Screenshot 8 hours later, when I woke the laptop from sleep

View attachment 1754274

I don't think that there is any good reason for me to leave the laptop in sleep mode ever again and definitely I need to figure what is going on ... 4TB in 24 hours, half of that when the laptop was in sleep mode seems a lot and probably confirms that something is not right...

Safari & Mail is 99% of my usage.
Welcome to the club, i’m afraid to say the issue is safari like it has been for many other people on different threads. Try the following:

1) Until Apple fixes safari, try to use a browser such as Edge or Firefox. On either of these, install the extension 'Auto Tab Discard' and set it up so that only the number of tabs you require at once is kept in memory - the rest stay open but get unloaded so that you do not see such excessive writing as you can see here.

If using firefox, open a new tab and go to about:config, accept the warning message, and type 'cache' in the search that comes up. Then proceed to disable (false) browser.cache.disk.enable, browser.cache.memory.enable, browser.cache.offline.enable.

If using Edge, go to ~/Library/Caches/Microsoft Edge/Default/ , click on the Cache folder and Get Info, and set the Sharing & Permissions of it to Read Only, and tick the Locked checkbox.

2) Go into terminal, and type ' pmset -g ' to get your current pmset values. These manage things such as activity during sleep which is believed to be bugged in Big Sur. Try doing the following: ' sudo pmset -a ttyskeepawake 0 ' ,then type in your password, and ' sudo pmset -a tcpkeepalive 0 '. Note that Find my Mac remote locking will not work during sleep with these disabled, however this is a viable thing to try until Apple fixes Big Sur and, in any case, these settings are easily reversible in that same way and do not have any risk of causing any harm. Everything else will function as normal.


I know it's annoying to switch browser but this may be what you have to do temporarily until Apple actually fixes safari. Some other good extensions to try on either browser to help you switch are ' Bitwarden ' - password manager, ' uBlock Origin ' ad-blocker, and ' Dark Reader ' - sets all websites to dark mode, can be set to match the system dark mode/ turn on/off at specified times.

Try these steps and report back. Good luck!
 
  • Like
Reactions: Ladas

Ladas

macrumors newbie
Jan 20, 2013
3
2
Athens, Greece
Welcome to the club, i’m afraid to say the issue is safari like it has been for many other people on different threads. Try the following:

1) Until Apple fixes safari, try to use a browser such as Edge or Firefox. On either of these, install the extension 'Auto Tab Discard' and set it up so that only the number of tabs you require at once is kept in memory - the rest stay open but get unloaded so that you do not see such excessive writing as you can see here.

If using firefox, open a new tab and go to about:config, accept the warning message, and type 'cache' in the search that comes up. Then proceed to disable (false) browser.cache.disk.enable, browser.cache.memory.enable, browser.cache.offline.enable.

If using Edge, go to ~/Library/Caches/Microsoft Edge/Default/ , click on the Cache folder and Get Info, and set the Sharing & Permissions of it to Read Only, and tick the Locked checkbox.

2) Go into terminal, and type ' pmset -g ' to get your current pmset values. These manage things such as activity during sleep which is believed to be bugged in Big Sur. Try doing the following: ' sudo pmset -a ttyskeepawake 0 ' ,then type in your password, and ' sudo pmset -a tcpkeepalive 0 '. Note that Find my Mac remote locking will not work during sleep with these disabled, however this is a viable thing to try until Apple fixes Big Sur and, in any case, these settings are easily reversible in that same way and do not have any risk of causing any harm. Everything else will function as normal.


I know it's annoying to switch browser but this may be what you have to do temporarily until Apple actually fixes safari. Some other good extensions to try on either browser to help you switch are ' Bitwarden ' - password manager, ' uBlock Origin ' ad-blocker, and ' Dark Reader ' - sets all websites to dark mode, can be set to match the system dark mode/ turn on/off at specified times.

Try these steps and report back. Good luck!
Thanks for the excellent contribution first of all.

I didn't go for extensions as i) safari extensions feel a bit weird to me ii) I'm a bit scared with extensions that put tabs to sleep because I've seen them crashing and losing my tabs so I wasn't going to take the risk.

I went for edge, initially Cache in read only: It was a bit slow. I changed it back to the original setting and edge is fast again, not as fast as Safari though (but good enough for me to do my work).

In the worst of days I didn't reach 10 GB written, attached is the screenshot from today, a heavy day at work.

Screenshot 2021-04-28 at 17.35.34.png


This is the screenshot a few minutes later, after I used Safari to open just one tab: forums.macrumors.com

Screenshot 2021-04-28 at 17.52.40.png


I can't really imagine what's wrong with Safari but it seems that something is there...

Thanks again!
 
  • Like
Reactions: TheSynchronizer

0MrAnderson0

macrumors newbie
Dec 17, 2021
1
0
hello, I am facing a similar issue. My kernel task has a disk usage of 11TBs in about a week. I think the issue might be related to swap writes. My swap usage is around 10GB. I run large amounts of Google Chrome tabs and 1 to 2 Intellij Idea instances with them running my application. I understand that 8GB ram might be small for this type of usage. Is there any way to improve the performance of my system? the system acts jagged and lags at high loads. Should I switch from chrome to safari as I read that safari has very small disk write here - https://createdtech.com/is-your-browser-killing-your-macs-ssd/
 

Attachments

  • Screenshot 2021-12-18 at 12.05.16 PM.png
    Screenshot 2021-12-18 at 12.05.16 PM.png
    629.8 KB · Views: 115

Erahgon

macrumors newbie
Nov 3, 2013
2
1
India
Hi everyone! Apologies for resurrecting a fairly old thread, and the following (quite probably superfluous) detailed addition (truncated within a "Spoiler"); but I thought that my experience with a similar issue might help someone in the future.

System details: MacBook Pro - Mid 2015 with a 15 inch retina display; an Intel i7-4870HQ CPU rated at 2.5 GHz; an AMD Radeon R9 M370X dedicated GPU; with 16 GB of DDR3L RAM, with an upgraded 2 TB NVMe PCIe 3.1 x4 M.2 SSD. [Identifiers: Retina Mid-2015 15" - MJLT2LL/A - MacBookPro11,5 - A1398 - 2910]. I'm running MacOS Monterey 12.6 on this machine in a non-standard configuration: I use 3rd party kexts by the way of a 3rd party bootloader called "Open Core Legacy Patcher" (OCLP) [currently running version 0.4.10 set at a "Moderate" SMBIOS Spoof Level (to spoof a "MacBookPro 13,1" to enable software-locked features)]. I also use the "Kryptonite" patcher/kernel module to facilitate the use of an external GPU [a Sapphire NITRO+ (AMD) Radeon RX 580 with 8 GB of VRAM, in a Razer Core X eGPU Enclosure (connected through a Thunderbolt 2 to Thunderbolt 3 adapter to my MBP)]. Over the course of the past ~3 years, I have been running these unofficial and unsupported configurations on this device, with few major issues. As a general disclaimer: I'm not recommending the modification of an older Apple computer, and I am not trying to convince that owners of older Apple computers try out any of the above mentioned customizations, unless they understand the risks involved, and the fact that they aren't entitled to any form of support (either from the community or from Apple) upon the implementation of any of the aforementioned customizations.

I usually leave my MBP on and running at home in order to accomodate my workflow. During my downtime, I run background tasks: I have a mirrored data sync to Google Drive (for a crude backup, and file sharing); synchronisation of the various network drives pertaining to my remote/hybrid work; regular local Time Machine backups; and a daily offsite cloud backup service (BackBlaze).

I logged into my computer earlier tonight to work on a project, and was instantly greeted with a substantial degradation in performance (and inconsistent behaviour overall). I subsequently launched Activity Monitor to investigate. The CPU usage display (where I had initially expected to find the problematic process) raised no obvious red flags at the time. Consequently, I pivoted to other theories. The nature of the performance regression made me suspect an issue with my internal SSD. Upon visiting the "Disk" tab in Activity monitor, and sorting by "Bytes Written" in descending order, I was taken aback by the top result: a system process called "kernel_task" had written ~31 TB of data over the course of ~36 hours (and had read about ~1.5 TB of data)!

A subsequent search for answers online, brought me to this thread.

I've been using Google Drive to backup and share my media production files with my clients. Apparently, this application was the root cause of all my issue, having written about 66 GB to volatile memory over the past ~36 hours! Apparently, the "Google Drive" or "BackUp and Sync" Google application had bugged out and crashed in a way that caused a memory leak. This emeory leak took over my RAM overnight, and MacOS extended an invitation for it to take advantage of the flexible SWAP memory available. Looks like this process took over the available RAM, compressed SWAP RAM, and storage based SWAP memory as well. Additionally, it caused kernel_task to write ~31 TB to the disk and read ~1 TB from the disk.

I'm not sure how the math really works out, but upon forcefully closing the "Google Drive" process, my system's performance reverted back to normal, and the "Memory Pressure" was alleviated. My system subsequent returned to its prior state of responsiveness and performance.
 

Attachments

  • Screenshot 2022-10-11 at 02.22.39.png
    Screenshot 2022-10-11 at 02.22.39.png
    110.8 KB · Views: 77
  • Wow
Reactions: BigMcGuire

BigMcGuire

Cancelled
Jan 10, 2012
9,832
14,032
Adding in a point of reference for usage... M1 Max 16' MBP - 64GB Ram, 4TB SSD. Laptop purchased in April 2022.

Uptime: 5 days

I use 3 browsers regularly for work, Parallels with a 20-30GB Windows 11 Dev environment, and lots of teams/webex calls. Due to it being Saturday, most of my stuff is closed.

My kernel_task is 109.36GB.

1667677671014.jpeg


1667677697316.jpeg


Out of all the laptops I've owned, this one has used the most data written by a MASSIVE factor.

1667677833611.jpeg
Mac OS always seems to cache aggressively.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.