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

heima

macrumors newbie
Original poster
Jul 9, 2017
10
1
I have a 2017 macbook pro running 10.14. I realized recently that kernal-task is writing terabytes into my hardrive every week. I just found out from htop (see screenshot) that the culprit seems to be safari, which is taking 100G of virtual memory per window. It's terrible and has been killing my hardrive silently for, probably, almost a year since I installed Mojave, which I suppose amount to 50-100Tb total writes. This cannot actually be normal, right? The fact that terabytes of VM is possible for the OS to allow without any warning is just outrageous. If it is there fault, is there any way to hold Apple accountable for it since it might have siginificantly shortened the lifespan of my harddrive (btw there is a bit of AppleCare+ left)? Thanks!
 

Attachments

  • Screen Shot 2020-04-10 at 10.12.11 PM.png
    Screen Shot 2020-04-10 at 10.12.11 PM.png
    1.6 MB · Views: 485
Last edited:
If I understand right, VIRT is memory accessible, etc. RES is what you want to check to see what's actually being used.
 
  • Like
Reactions: mick2
VIRT shows everything that is memory mapped by the process in question. That's the app, its referenced libs, its data, the process heap etc etc. It's not actual memory consumed. And its definitely not swap space used, which seems to be what you're concerned about.

According to your screengrab, you were using 13.1Gb of swap space when it was taken.

Running top with the -m switch will display USED instead of VIRT memory, which may be closer to what you're looking for.
 
So the VIRT used by Safari is indeed normal? I don't see any other process using that much.

In any case, I calculated now that the computer is writing on average 200G a day over the past month. I opened say around 30 total safari tabs and is otherwise not doing much myself to the disk, is that really normal? If so I might need to stop opening so many tabs...
 
No idea what's 'normal' for Safari - guess it depends on what you're running in those 30 tabs!

If you're trying to track down what's using the swap, in 'top':
- press the 'f' key to get the field list
- add the SWAP field.
- when selected, press the 's' key to sort by the swap column.
- 'q' returns to the main window
- press 'e' to toggle between units of measurement (ie choose MB or GBs)

Now you can see what process(es) are using swap.

- 'W' will save these amendments to the top conf file.

Don't know if these instructions will work in 'htop'. These do work in plain old top (Linux but guessing also still works on MacOS).
 
  • Like
Reactions: mw360
MacOS likes to allocate memory it isn't using, and Safari is a Mac program with a reputation for hogging memory, so I'm not too surprised.

What's you daily write calculation based on?
 
MacOS likes to allocate memory it isn't using, and Safari is a Mac program with a reputation for hogging memory, so I'm not too surprised.

What's you daily write calculation based on?

I see in activity monitor, disk usage, of around 5Tb write, and according to htop it has been on for 27 days. I am not exactly a power user, other than keeping quite a few tabs open (but they are mostly just rather mainstream everyday website, nothing crazy). Maybe the usage is normal considering I am using 13G swap (which still sounds like a lot but okay)
 
i also am seeing HUGE amount of virtual memory being used by safari. this does not happen when i use chrome, which i have to for work [we're a 'google company' and some internal apps work better on chrome] 4 of top 5 real and virtual apps are safari. 11gb used safari web content 105 virtual. 88gb virtual. i have a 128gb real ram
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.