It takes me about 20-30 minutes of shutting down and starting up my iMac before it finally boots up. I get blank screens forever, sometimes a folder with a question mark appears. After continued attempts, then finally the Apple icon appears, but the rotating gear will not appear. After minutes of starting and restarting, I finally get the Apple icon and then the rotating gear appears, and it boots up.
I checked the space available in the system, and I have plenty left.

In addition to all this, my wireless mouse is starting to react erratically...the cursor doesnt move very smoothly.

What's going on?

I have had this iMac a little over 3 years.