when holding down Command-Option-P-R you should hold it down until you hear the chime 3 times
another thing you should try is resetting the SMC controller. clearing the PRAM does not clear the SMC. if your computer is having issues like acting like its busy when the cpu is idling. then the smc could be responsible
http://support.apple.com/en-us/HT201295
if your running yosemite, consider upgrading to 8 gigs.
Yosemite likes to use all available memory in one big buffer to keep your system snappy
and during the first few days or weeks of using Yosemite it might seem slower then it used to be
but it gets better as os x learns what your doing
please go to activity montor and post screen captures of the CPU and MEMORY screens.
if MEMORY is green and LOW your memory is fine and you don't need to upgrade
if your activity monitor shows 4 gigs and 3 gigs used, thats just yosemite optimizing the memory to make your system operate better
what u need to see is if its using a lot of virtual memory , swap space used / a lot of comrpessed ram.
it seems to me that yosemite resets the application caches. and this can be the cause of the slow down. I've noticed after I've used my mac mini 2014, its gotten better. i think this because of the application caches being built
another thing could be file vault 2. yosemite likes to turn it on by default. and ti could be encrypting in the background. or slowing down your mac, because it has to decrypt on the fly.
when you see it stalling and beach balling, stick your mac to your ear, do you hear any clicking noises of the hard disk??? or grinding noises??
consider running apple hardware test in extended mode to rule out bad ram
check umm system prefernces, user & groups, login items for anything that shouldn't be there
reset safari
----------
before erasing your hard disk and reinstalling the operating system, try applejack. you can get applejack from source forge.
http://applejack.sourceforge.net/man.html
i don't know how apple jack runs on filevault 2.
once you install it, you hold down command and S keys during boot and then type
applejack AUTO this will force applejack to do a deep cleaning
this will get rid of all your application caches, check the disk, check permissions. check preference files.. this hasn't been updated since 2006, but its still works good
I'm thinking if you have file vault on, you can go to terminal and type
sudo fdsetup authrestart
this will copy the decryption key in ram and allow you to boot in command - s mode.
oh yeah that's called single user mode! and that should allow you to run applejack