Should I install multiple mysql servers in my dedicated server?
I have a dedicated server that hosts about 70 domains... some are just plain php static websites, others ar开发者_C百科e wordpress websites and a few others are on ruby on rails.
In the past few days I have experienced very slow queries on mysql server...
Queries like:
SELECT * FROM users WHERE id = 5 takes 1.8 secs...I enabled the slow queries log and found that all the wordpress sites dont have their databases indexed... i dont know if this is the cause of my problem.....
So the question is should i install different mysql servers for wordpress websites and ruby based websites? Or just a little tunning to the my.cnf file will do?
Well considering that you are not augmenting the hardware. I belive installing instance servers or even installing Virtual servers would not help you. You should really try tuning the databases and adding valuable indicies where necessary.
Use a second server for your DB. That way your 70 sites' ruby & php scripts aren't fighting mysql for disk io and mysql can take better advantage of caching.
精彩评论