Optimal use of SSD


I’m running Roon on a Qnap TVS882T with 6 x HDD and 2 x 500Gb SSD.
Currently one SSD to store the Roon database and the other one used as cache.

Is my setup optimally using my SSD’s?

I would say it is. While nothing beats a dedicated Roon Server especially for a large library, this particular model supports a fairly powerful CPU by NAS standards and should be fine, even for a medium sized library - just keep your DSP related use in check.
Actually on closer inspection that would make a pretty Kick A$$ NAS/CORE combo. I wish Synology had such CPU options on a smaller NAS

From what size of library would you recommend to have a dedicated server?
Is the actual storage location for the flac files in anyway critical for the performance?

It matters how much other stuff you ask Roon to do, and how much you do on the non-dedicated server.
I’d say if your library is getting to 100,000 tracks you’re better off with a dedicated server. If you use DSP a lot, or do upsampling frequently, it will put heavier demands on the system. While it may still be functional for Roon, the user may notice performance slow downs on the computer hosting Roon.
Some NAS systems have pretty low-performing CPUs for Roon demands, so this is often more a consideration for people using a NAS to run Roon. Most PCs these days have fairly well powered Intel CPUs and are perfectly fine for running Roon, but might not be able to run Roon with a big library, DSP, and something like PhotoShop all at the same time.
For the most part, where a FLAC file is stored is not critical. Roon’s ability to fetch that relatively small file and stream it is not impaired by it being local or on a NAS. There can be other advantages to be on a local drive, but sound performance isn’t one of them.