OS X 10.11.5 hangs occasionally for 30 seconds for multitasking, gestures and the Dock Since a few weeks (maybe since updating from 11.3) my system (MacBook Pro Retina 13" 16 GB RAM) hangs for about 30 seconds every now and then. I am able to use the app where the focus is on, e.g. browser but I can not use the Dock or multitask or use any gestures.

I have already tried to reinstall OS X from Recovery HD. Surprisingly the system downloaded OS X and installed it, but it is not a "clean" install. All my apps and settings are still here ... and the problem as well.

What could be the reason for it and how could I track it down to fix it?
Don't worry, it's not just you. Many Mac users are experiencing this same issue, including me. It is thought to be a bug in 10.11.4 and I suggest you upgrade to 10.11.5 or downgrade (if you have a backup) to 10.11.3.

In my case, I haven't had an issue or a freeze since I upgraded to 10.11.5. It works great.

See: http://www.macrumors.com/2016/05/13/macbook-pro-system-freezes-os-x-10-11-4/