how can I diagnose the root of the problem when my mac starts freezing for 10 sec each time I switch to an app? At random points during the day (but not every day), when I've been working quite a bit, MacOs gives me continual freezes for 10-15 sec. This especially happens when I switch between apps and when I perform certain actions such as trying to reboot, switch a tab in chrome, etc. 

The freeze is not a typical rainbow-ball-freeze, but literally, the screen is frozen. The music does keep playing (buffer?) but does not respond to commands, nothing does. 

I run Mojave 10.14.6 and own a Macbook Pro 15" mid-2012 in which the primary drive is an SSD and I replaced the DVD-drive with a 7200 rpm Hitachi.

Most of my data, documents, videos, images, etc are on this second hard-drive. MacOS and apps all run on the primary SSD disk.

I'm not sure, but the freezes somehow feel faulty to the hard-drive. 

I tried running First-aid on the data-disk but it's unable to unmount. I will try a reboot later, but in the past, the first-aid was unable to find any faults.

How can I proceed to find the root cause of these freezes?



I did the etrescan and although beachballing is not the right description, I thought it most closely resembled the behaviour.
I removed something that might've been adware. 
I checked unsigned files, which are mainly developer tools I use.

I pretty much always run Activity monitor on the side to see if my CPU starts spinning up like crazy by some app. This is not the case when I have concurrent freezes.
I also did a safe-boot and ran disk-utility health-aid and it did so without reporting any problems.

I just had the freezes again. It was very clear that the freeze happens whenever I do an action (switch app, open run, delete a file, type admin pw, etc). If I stayed in the same application, it almost all run perfectly smooth... 



Etre rapport (1 week expiry date)
console report (1 week expiry date)
I provide three techniques for diagnosing the problem. Don't miss 2 &amp; 3 below. 


I'd run etrecheck. Etrecheck will analyze your machine and
software and generate a report. Post results here so others can
view.  Experienced users have found the reported information useful
when diagnosing problems. The proprietary stuff in the report gets
filtered.


Install and run


Download etrecheck.  Goto the  EtreCheck.com download page.  The download link is at the bottom of the screen
Install etrecheck. Goto your download folder. Double click on EtreCheckPro.zip
drag the app to the application folder if you wish.
Double click on etrecheck to run.   The first five runs are free.


An alternative explanation how to install, run and report output for the EtreCheck Application by the author.
    https://discussions.apple.com/docs/DOC-11591

How to report etrecheck data.

When the report is done, click on the export icon.


click on "Copy report" to copy to the clipboard

Get back in your web browser and access your discussion. Create a new reply. Click on the &lt;> code icon. Paste you etrecheck output into the code block.

which results in...

 You may find Old Toad's write up helpful.
https://discussions.apple.com/docs/DOC-250000211


run /Applications/Utilties/Activity Monitor.  Leave it in a visible window if you can.  Maybe you can see some reason for the problem.
Try a safe boot.
Shutdown your machine.  Hold down the shift key.  Poweron.  The boot up will take longer than normal because the filesystem on the startup drive is being checked and repaired as needed.   All about safe mode including what features and apps safe boot leaves out.  Safe boot uses a software driver instead of using your machines video hardware.
  http://support.apple.com/kb/ht1455