Sample Header Ad - 728x90

Forcing `kernel_task` to swap memory?

1 vote
2 answers
283 views
I have had a week-long compression process run on an MacBook. When it hit 95%, the speed suddenly dropped to just 5% CPU usage. Tracing the problem, I found that kernel_task is taking up 6.87GB, leaving roughly 1GB to the other processes. This leads to thrashing on the compression process. Tracing the issue further, I found that a bash process is using nearly 1TB (!) of kernel memory. This is slightly more than the free space on my hard drive! No clue what it's doing, no other process seems to have this as its parent. I closed all bash windows, but the process stayed. Ran kill on it, no difference. I finally killed it using kill -9. In https://apple.stackexchange.com/questions/205332/why-does-leaked-memory-appear-malloced-to-kernel-task-and-why-cant-os-x-theref , killing Preview resolved this issue, but in my case, the memory usage of kernel_task remained. Maybe due to how it was killed. Tried running sync and purge, no difference. Garbage collect does not apply to kernel_task. Any other things I could do to reclaim this memory? Theoretically, if I could get the inactive memory at least moved to swap, then the compression process would have enough to quickly complete what it's doing. No kernel extensions seem to be using an abnormal amount of memory, no third-party extensions are installed.
Asked by Alex (282 rep)
Dec 28, 2023, 01:06 PM
Last activity: Dec 28, 2023, 06:52 PM