Update: I cannot remember the last time my disks ejected. In addition I have never disabled spotlight.
With my OWC Thunderbolt dock I have connected a huge number of peripherals. See bottom of post.
I cannot remember the last time my disks ejected which suggests that the issue may not be software but hardware. The external OWC Thunderbolt dock has its own power supply and as a consequence does not falter when a load is played upon the iMac.
Which brings me to the next observation. When I bought my iMac 5K since I do not do any gaming, I figured the standard spec graphics card was sufficient.
But to be honest, I think the 5K display requires a turbocharged 1,000+ HP engine to drive it. Working on images on my old laptop is faster at generating full resolution images.
I also have a DELL 2408WFP monitor connected as a second display.
Specs below:
Model Name: iMac
Model Name: iMac
Processor Name: Intel Core i7
Processor Speed: 4 GHz
Number of Processors: 1
Memory: 24 GB
Graphics: AMD Radeon R9 M290X 2048 MB
Connected the following:
Firewire 800
16TB G Speed Q
12TB G Speed Q
8TB OWC Guardina Maximus
Lacie 600gb Extreme
Lacie 500TB portable
USB 3.0
WD Essential 2TB Time machine
Mobius 5-Bay raid system as JBOD into which I drop disks as I need them