Sample Header Ad - 728x90

Why is my system running out of application memory when there is plenty of free disk space to swap?

1 vote
1 answer
460 views
I am running some extremely memory intensive calculations that can balloon to use a great deal of memory for a process (a java program). I have increased the maximum java heap size to 64 GB to allow for this. Java memory usage gets to approximately 66 GB, and then my system comes to a halt and I begin to get "out of application memory" errors. Similarly, when one of my python processes expands to beyond 96 GB of memory usage, it is forcibly killed by the OS. I have 16 GB of physical ram and >1.5TB of free SSD space for swap; why would I be running out of memory? Why doesn't swap expand further? I am running Monterey 12.3.1 on an M1 system. Here are the first 20 lines of my activity monitor Memory tab
Process Name                   Memory    Threads Ports
 Icy (Not Responding)           66.68 GB  61      431
 Firefox                        957.9 MB  82      3,916
 WindowServer                   802.4 MB  22      2,270
 FirefoxCP WebExtensions        340.2 MB  30      473
 Dropbox                        286.7 MB  137     866
 syncthing                      190.2 MB  19      94
 FirefoxCP Isolated Web Content 162.4 MB  30      161
 FirefoxCP Isolated Web Content 124.6 MB  30      171
 Quicksilver                    122.3 MB  11      444
 Preview                        108.9 MB  3       267
 Activity Monitor               108.1 MB  7       651
 TextEdit                       102.6 MB  3       288
 FirefoxCP Isolated Web Content 99.7 MB   30      172
 Finder                         97.2 MB   6       590
 loginwindow                    95.8 MB   4       484
 1Password 7                    92.3 MB   5       601
 mds                            67.6 MB   8       300
 Dropbox Helper (GPU)           58.2 MB   8       163
 FirefoxCP Privileged Content   55.4 MB   30      200
And here is the output from vm_stat:
Mach Virtual Memory Statistics: (page size of 16384 bytes)
 Pages free:                                4581.
 Pages active:                            173948.
 Pages inactive:                          168906.
 Pages speculative:                         5133.
 Pages throttled:                              0.
 Pages wired down:                        119918.
 Pages purgeable:                             89.
 "Translation faults":                 726424696.
 Pages copy-on-write:                    2352123.
 Pages zero filled:                     75215138.
 Pages reactivated:                    119697667.
 Pages purged:                           1363563.
 File-backed pages:                        40710.
 Anonymous pages:                         307277.
 Pages stored in compressor:             4404306.
 Pages occupied by compressor:            527236.
 Decompressions:                       553185303.
 Compressions:                         578504830.
 Pageins:                                4814101.
 Pageouts:                                135825.
 Swapins:                              302428830.
 Swapouts:                             314732554.
Asked by Yashka Oreza (31 rep)
Apr 29, 2022, 09:28 PM
Last activity: Nov 29, 2023, 04:58 PM