2

I was shocked to just find that the Wi-Fi process on my brand new macbook pro is sucking up 3.4 GB of memory. Why is that and how do I reclaim it? I reviewed a few other questions here about this but they don't have helpful answers.

Running Mojave 10.14.5 (18F203)

Activity Monitor screenshot

Statistics screenshot

That 11282 ports looks suspicious. I'd like my memory back, appreciate your suggestions.

Edit: here is the memory pressure graph:

enter image description here

Uptime 3 days and have been using wifi hotspot a lot (while I wait here for AT&T home internet install...)

  • Most highly upvoted version of this question: 340286. – Jess Riedel Sep 3 at 15:34
3

First thing first - memory is virtual, so Wi-Fi could take 100 GB and you might only have a low grade leak that seems bad, but in practice has no effect whatsoever over a two week period or longer.

Here how I’d evaluate this measurement in context :

  • What is the overall memory pressure graph like on the machine?
  • How long after you started did it take to get to that status?

Now that you have some data points and can agree that the numbers mean less without context, here’s how to reclaim that memory.

Once you get the data above, log out (Apple Menu - log out Michael, then log back in). The ports and memory should start very small.

I haven’t seen this cause issues across our production fleet and there is speculation that IPv6 networking or iPhone tethering can cause this higher than expected, but not impacting performance level of allocations. Also, people that tend to have dozens or a score of tabs open in multiple browsers would likely have a lot of memory to track that. Lastly, not logging out regularly would allow this to grow if it’s a leak / usage situation.

As to the ultimate question of why, you have nailed the ports being the reason for this process. In the Mach kernel architecture, ports are how processes communicate, so every program that needs any network access or to send a communication to another process, needs ports to queue and deliver and secure those network data chunks.

The Wi-Fi program is doing its sole function which is to connect your programs in your user space to the system/kernel that then runs the network drivers and does the communication with the hardware layer.

I see nothing shocking here, but here's the low down on using vmmap and heap to pick apart why yours is using less memory when you log in (and almost none if you start no apps at log in) and then when you run your programs that assign work to Wi-Fi - it allocates memory to do that work you asked of the wireless networking system.

  • 1
    "memory is virtual, so Wi-Fi could take 100 GB and you might only have a low grade leak that seems bad, but in practice has no effect whatsoever over a two week period or longer." My activity monitor reports that memory pressure is low, but I still got multiple warnings that I was running out of disk space when the process "Wi-Fi" sucked up 24GB (!) of memory. In the past, running out of disk space has led to serious problems with the system not being able to allocate memory for basic functionality and me being unable to save open documents before restarting the system. – Jess Riedel Aug 15 at 21:55
  • Follow-up comment: I have now been experiencing this issue for 3 weeks, and I can say confidently that the memory usage by the process "Wi-Fi" leads to noticeable performance issues even though memory pressure is low, and even before getting disk space warnings. I'll be browsing the web and noticing that programs like Chrome are slowing down (pages are very slow to re-render when switching tabs, etc.). I check the Activity Monitor, see that the process Wi-Fi is using 16 GB, and force quit it. The performance issues immediately stop. This has happened 10+ time. – Jess Riedel Sep 3 at 15:19
  • My wifi bloat problems disappeared when I got a new Macbook Pro. Exact same apps/patterns in use. Must be an OS corruption type of bug. – mowliv Sep 7 at 16:19

You must log in to answer this question.

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