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

jdb8167

macrumors 601
Original poster
Nov 17, 2008
4,858
4,598
TL;DR I'm still seeing memory leaks in the Finder.

From the excellent Eclectic Light Co. blog: Memory Lane: Grokking memory problems in Activity Monitor.

This is pretty easy to see for yourself.

  1. Force quit the Finder. ⌥⌘⎋ (option-command-esc) and choose to force quit the Finder
  2. Open Activity Minder
  3. Move to the Memory category Tab
  4. Search for Finder in the process name search box
  5. It should be about 70 MB with no windows open.
    Screen Shot 2022-01-24 at 2.58.51 PM.png
  6. Open a Finder window then do a ⌘F and type a
  7. Open a new tab ⌘T and then do ⌘F and type e
  8. Continue doing this for a, e, i, o, u, y, s, t, r
  9. Wait a while since this is going to take some time.
  10. I reached 8 GB of memory used by the Finder pretty quickly.
    Screen Shot 2022-01-24 at 3.18.10 PM.png
  11. So far, this isn't a problem since I'm asking for the Finder to do a fair bit of work. The problem comes in when I close all of those tabs.
    Screen Shot 2022-01-24 at 3.21.37 PM.png
The Finder is now using 3.6 GB of RAM permanently until I force quit it again. This might be some sort of attempt to cache the search results or maybe the most recent results but holding on to almost a quarter of my memory (16 GB M1 MBA) seems excessive. Doing a search for the last typed letter, in my case r shows the Finder memory going back up to 4 GB and the search doesn't seem any faster so caching search results it isn't likely to be the cause.

Edit: This is Finder 12.1 on macOS Monterey 12.2 (21D48) release candidate.
 
Last edited:

svenmany

macrumors demi-god
Jun 19, 2011
2,278
1,519
I did the experiment and stopped at two tabs. Memory usage was way up. Unfortunately CPU usage was way up too.

It might not be a memory leak but processes which continue to run and use their allocated memory. But, whatever you call it, or your interpretation of "memory leak", YIKES.

Thanks for sharing this.
 

jdb8167

macrumors 601
Original poster
Nov 17, 2008
4,858
4,598
I did the experiment and stopped at two tabs. Memory usage was way up. Unfortunately CPU usage was way up too.

It might not be a memory leak but processes which continue to run and use their allocated memory. But, whatever you call it, or your interpretation of "memory leak", YIKES.

Thanks for sharing this.
If it was just processes running, they would eventually time out after the windows/tabs were closed. That isn't what happens. The CPU eventually settles back down to 1%-2% and the number of threads goes back down but once it reached 3.6 GB it stayed there. I left it for over 24 hours when I was originally testing this and it stayed at the same large memory allocation.
 

svenmany

macrumors demi-god
Jun 19, 2011
2,278
1,519
If it was just processes running, they would eventually time out after the windows/tabs were closed. That isn't what happens. The CPU eventually settles back down to 1%-2% and the number of threads goes back down but once it reached 3.6 GB it stayed there. I left it for over 24 hours when I was originally testing this and it stayed at the same large memory allocation.

Processes don't necessarily require a window to be open to continue running (ask me about my bugs!)

How long does it take for the CPU to settle down? I closed all my windows and the CPU stayed over %100 for a minute before I killed Finder.
 

jdb8167

macrumors 601
Original poster
Nov 17, 2008
4,858
4,598
Processes don't necessarily require a window to be open to continue running (ask me about my bugs!)

How long does it take for the CPU to settle down? I closed all my windows and the CPU stayed over %100 for a minute before I killed Finder.
But activity monitor definitely can show threads and I don't see any excess threads after searching stops. It always seems to drop down to 4 threads.
 

svenmany

macrumors demi-god
Jun 19, 2011
2,278
1,519
Going on 5 minutes now, with all windows closed. It's still over 100%.

I'm on 12.1
 

mat1696

macrumors member
Jun 30, 2021
82
86
Good question, yes, I'm on the 12.2 RC. I completely forgot to add that to the description. Thanks.
In fact I tested it out on 12.2 RC and can easily reproduce as well… Sent a feedback to Apple, but they seem to be less and less likely to fix bugs and issues in macOS unfortunately….
 

xgman

macrumors 603
Aug 6, 2007
5,697
1,425
Under normal work loads, is this slowing your workload down? maybe this is the way Apple is setting up memory management these days. they don't seem to be in any hurry to address it.
 

jdb8167

macrumors 601
Original poster
Nov 17, 2008
4,858
4,598
Under normal work loads, is this slowing your workload down? maybe this is the way Apple is setting up memory management these days. they don't seem to be in any hurry to address it.
It hasn’t affected me yet. Maybe it is intentional. Apple could be setting up pools of memory that when needed get reused or additional pools are added when the old ones remain in use. If they never clean up pools because they assume that the fast swap will be adequate for performance, they might just leave the memory allocated even once the windows are closed.

I can probably test for this case but it would take a lot of Finder searches. I might do it out of general curiosity.
 

Artiste212

macrumors regular
Aug 26, 2012
143
73
According to Howard Oakley on the Eclectici Light Company, this is NOT FIXED in 12.2 release version. I can confirm on my M1 Mini.

😥
 

Colstan

macrumors 6502
Jul 30, 2020
330
711
Interesting. I just upgraded my 2018 Mac mini from Mojave to Monterey 12.2 final. I followed your directions exactly. After killing Finder, it started with around 65MB used by the process. I then did the whole alphabet search as above and let it sit for a while. Finder usage peaked at 180MB. Once I closed out that solitary Finder window (and tabs), it settled back down to 100MB, close to where it started. I tried this twice, so unless I'm doing something drastically wrong during this very simple procedure, I'm unable to replicate it.

This may be more difficult to diagnose than the other memory issues, so perhaps it will take some time for Apple to isolate the problem, assuming they put resources into it.
 
  • Like
Reactions: Artiste212

Amigalander

macrumors regular
Jan 13, 2008
175
21
Interesting. I just upgraded my 2018 Mac mini from Mojave to Monterey 12.2 final. I followed your directions exactly. After killing Finder, it started with around 65MB used by the process. I then did the whole alphabet search as above and let it sit for a while. Finder usage peaked at 180MB. Once I closed out that solitary Finder window (and tabs), it settled back down to 100MB, close to where it started. I tried this twice, so unless I'm doing something drastically wrong during this very simple procedure, I'm unable to replicate it.

This may be more difficult to diagnose than the other memory issues, so perhaps it will take some time for Apple to isolate the problem, assuming they put resources into it.
this memory issue is affecting M1 Macs, not Intel ones
 

eicca

Suspended
Oct 23, 2014
1,773
3,604
Can definitely tell you this is not fixed in 12.4... I had one or two Finder windows open today and suddenly the memory usage spiked well over 1GB. Relaunched Finder and it's back to 40mb.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.