Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

We currently have 1 master db on its own server and slave db on app server.

App executes very frequent but light updates (like increasing counters), and occasional (once in a few minutes) heavy selects (which is the most important part of the app). When app was connected only to master db there were no performance issues. With slave db introduction CPU load avg on app server increased to about 6-10 during that heavy select period (from 3-4 as before).

When server doesn't run those frequent updates it seems like performance for selects stays within the limits. So I have a feeling that those updates is what is causing the performance drop (also these frequent updates are not critical so if slave db doesn't have them in sync with master for some time it would be ok).

What would be a good db replication setup for such kind of app? What are the replication parameters we could tweak?

Thanks.

share|improve this question

2 Answers 2

Run the heavy selects on the master server and use the slave as a backup of the data only. If your master goes down then you can use the slave temporarily until you get the master running again.

share|improve this answer

A slave (for redundancy) will generally have lower load than its master (no selects, single execution thread), but still has nearly all of the disk write capacity requirements. If your app also needs disk resources, then it will be competing with the slave for it, and that's when your load average goes up.

I'd say get another box for your slave.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.