views:

198

answers:

1

I've got a problem that's causing me some headaches and I could use some ideas on how to investigate/fix it.

Setup:

  • I'm running a Rails app (Apache2 w/ Passenger) on server A (Rails.A)
  • I'm running the master DB on a dedicated DB server B (DB.B)
  • I'm running a slave DB on server A (DB.A) with standard MySQL replication (just for backup purposes)
  • Rails.A is reading/writing to DB.B

Problem:

  • When running a mysqldump on DB.A, the load average on A skyrockets because Apache appears to spin off tonnes of processes. This really doesn't make sense to me as DB.A isn't even used by Rails.A. I can completely shutdown DB.A and Rails.A works just fine.

  • I've even tried running the mysqldump with "ionice -c2 -n6", with no change.

Thoughts?

+2  A: 

I misread your question the first time, and didn't realize that Apache and the slave were on the same server.

I think that even with the nice settings on the dump, Apache is becoming resource starved. Whether it's being starved on io, memory or cpu, I don't know, you'll have to do some benchmarking (io is my guess though).

In any case, if you're still having trouble, I'd reask this question on ServerFault or get a mod to move it for you.

Dana the Sane
But I'm doing the dump on a slave, which reads replication updates from the master. I've even stopped replication and the problem still persists. Moreover, if I stop the slave DB all together then Apache does NOT block; which demonstrates that Apache is relying solely on the master server.
D Carney
I re-read your question and changed my answer.
Dana the Sane