Why are "spindump" and "sandboxd" eating up all my CPU? I am using MacOS Big Sur 11.3 on a 2019 MacBook Pro. Recently, I started noticing that some programs (specifically MATLAB) have been running really slow, the cursor and mouse are lagging, etc. Programs other than MATLAB (e.g. Safari, Music, Photos, etc.) all work fine. This happens even when MATLAB is idle (i.e. I am not running any sort of computationally-intensive simulation).
When I look at the Activity Monitor, MATLAB is consuming less than 10% CPU and &lt;2 GB of memory. However, there are two other root processes called &quot;spindump&quot; and &quot;sandboxd&quot; which are eating up a ton of CPU. In particular, &quot;sandboxd&quot; is consuming &gt;98% of CPU and is almost always at the top of CPU usage when running MATLAB (although occasionally disappears). The &quot;spindump&quot; process is a bit rarer but occasionally shows up eating up &gt;40% of CPU.
Can anyone explain why this is happening so I can decide if this might be a Mac / Apple support issue or something I should take up with MATLAB?
I would say these are expected processes and they are designed to capture logs for analysis in the case of spin dump. I would focus on what apps are non-responsive and open a support case with each app owner.
The sandbox is odd, so unless MATLAB has configuration to minimize that, I would start with Apple support to see about what is driving that CPU usage. Both of those processes are needed and just like kernel_task, they respond to what is happening on the computer so you don’t “fix” them as much as understand why your workload is causing them to consume resources.  Once you nail that, you can have your battery life, heat generation and performance back. They are valuable clues as to what is happening on the system.