Post

Replies

Boosts

Views

Activity

Compressed memory algorithms lock up my mac occasionally
This is largely a bug/feature request based upon my observed behavior of memory management on mac os x. Since covid-19 started, I've been working from home on my macbook pro with 16G of memory. I basically use chrome all day and have a ton of tabs and windows open. When my mac starts to slow down, I'll often just close a whole window which I have not been using for a long time. This leads to my memory pressure on activity monitor going red for a good 20 seconds to a minute where I can not do anything. At the moment, my memory usage is: Physical Memory: 16 G Memory Used: 13.57G Cached Files: 1.37G Swap Used 7.22G App Memory: 7.07G Wired Memory: 4.45G Compressed: 2.89G (It's often in the 4G+ range) So, what I've noticed is the following: app memory went down to about 4G swap used goes down to 4.5G compressed goes up to 6.5G memory pressure spiked to yellow (in this instance which is fine) Then, swap goes back up to 7.7G, compressed goes down to 1.3G My understanding of the implementation here is that an unused page of ram will be compressed in memory. That will also be swapped out to disk in compressed form if need be. Now, when I exit my program, it can't just free up the pages used on swap, it instead needs to read it into compressed memory, and then from there return it back to normal memory which can then be freed. I'm not 100% sure on this but this is the behavior I observed and read about online. Since I basically use my work machine as a glorified web browser, I'd like to be able to turn off compression (which apparently isn't possible anymore on catalina) so that traditional swapping to my SSD will be used. This would on average allow me to actually use 3-4G more of ram for active applications at the cost of having to swap, which is generally fine for me. I have some windows which stay minimized most of the time and I'm willing to wait for them if I need to go use them. I'd love to hear more about how compression actually works, assuming that I'm wrong somewhere, and what next steps I'd want to take to try to get in an official feature request for changing the behavior. Thanks, Mike (former Solaris VM expert)
4
0
878
Aug ’20