2

I'm running a couple of projects which consume a lot of MySQL power (10'000 qps in peaktimes)...now I'm wondering what would be the best setup in order to keep it fast and smooth even if the user numbers grow.

Currently I'm using 1 server with nginx, php-fpm and mysql (dual xeon, 24 GB ram, SSD's) and connecting to MySQL through a local socket.

Would I experience a "performance drop" if i had a remote MySQL server of the same specification in order to split up webserver / db load?

Scott Pack
  • 14,717
  • 10
  • 51
  • 83

2 Answers2

4

There will be a performance hit, but rather in the latency part. So if you run a lot of parallel connections, you probably won't notice. If you're doing 10kqps serially in one (or just a few) connection, you'll definately see a difference.

The query processing itself will not take longer, just the data roundtrip time from and to the client will increase (even 10Gbit ethernet would play a role here) by around a milisecond or so (for 1Gbit line). So if the query itself took another milisecond, you're limited to about 500qps per connection.

With local socket, the roundtrip time is pretty much in tens-of-microseconds range ...

Fox
  • 3,887
  • 16
  • 23
  • thanks alot. the server has a 10gbit/s ethernet. individual connections won't hit the 500qps mark. if i have 3200 users using the application, will each of them need an own connection to the mysql...or will it be per php-fpm worker? I'm confused because the mysql status says "Highest usage of available connections: 27% (137/500)" – Kilian Schefer Dec 21 '11 at 08:19
  • no problem. its per fpm worker. (well one worker can make more connections, but that's usually not the case) – Fox Dec 21 '11 at 08:42
0

Would i experience a "performance drop" if i had a remote mySQL server of the same specification in order to split up webserver / db load?

Nope, if you have Gigabit or faster link to db server.

Rika
  • 1
  • From practical experience, latency will indeed be worse. How much that impacts the application depends a lot on application design (complex queries or program controlled simple queries ...) – rackandboneman May 21 '12 at 19:48