1

I am not even 100% sure if this is an issue, because htop on macOS is known to show very high virtual memory usage. However, I never noticed VIRT values that were so consistently high before, and I was recently experimenting with taskpolicy usage, so I want to verify that things aren't broken.

When I run htop, every process shows 0 for virtual memory usage, or at least 32.1G: htop screenshot showing high virt usage for all processes

And every Safari process has >100G: htop screenshot showing >100G virt usage for all Safari processes

I stumbled onto the htop issue above, and I'm concerned about the behavior of my machine because every process has an excessively high VIRT value, and even top shows a total virtual memory size of 22T: top screenshot showing 22T of virtual memory size

In comparison, the htop issue above only shows a handful of processes with high virt values. Likewise, Activity Monitor isn't showing any abnormal memory usage: screenshot of low memory pressure in the Activity Monitor of macOS

Is this a bug in htop (or elsewhere)? A configuration mistake on my end? Or is it just the result of a change in how macOS calculates virtual memory?

For reference, I am currently running macOS Monterey 12.0.1 on a 2017 13" MacBook Pro.

1
  • tbh, I'd just quit htop & stop worrying. You don't seem to have any practical issue to solve. Activity Monitor (which is of course the official view on all of this) says you have absolutely nothing to worry about. I'd believe it.
    – Tetsujin
    Dec 7, 2021 at 18:06

1 Answer 1

0

The reason that many processes show 0 in the VIRT column, and the rest show a very value is simply that you're running htop as an ordinary user. Ordinary users are not allowed to inquire this information about processes owned by other users, so you'll see a 0 for those processes - and those started under your own user account have their actual values.

You can solve this issue simply by running htop with sudo like this:

sudo htop

Also note: The values you're seeing are actually not excessive. These values do not indicate any kind of problem, error, bug, performance issue, or the like with your system.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .