1. Add -dbcache=N (N is total of RAM used in MB) if you run Bitcoin Core from Terminal.
2. Open bitcoin.conf (located on folder where you store blockchain) and add dbcache=N on new line. If bitcoin.conf isn't exist, all you need to do is create new .txt file and rename it as bitcoin.conf.
You can also do it via the GUI if you are running it. It's under settings --> options
Once it's fully synced you can change it back if you need to free the RAM for something else if you keep it running.
If you shut it down and have to catch back up regularly then you might as well leave it.
-Dave