PHP/MySQL: Can 12 CPU cores make app faster than 6 CPU cores although CPU usage always below 40%? -
PHP/MySQL: Can 12 CPU cores make app faster than 6 CPU cores although CPU usage always below 40%? -
our problem mysql delaying our app after reduced cpu cores, although cpu usage , has been below 40%. question is: cpu reduction triggered mysql slow now? or should looking somewhere else?
more details: team running mobile app couple of one thousand users beingness online @ same time. fire 100 requests/second backend. using php/mysql , had 12 cpu cores , 8 gb ram. tool phpmyadmin showed cpu usage 15-25% , ram usage @ 1 gb.
then reduced cpu cores 6. cpu usage went 40% max. however, faced higher load (but not higher load had while running 12 cores) mysql not able process queries , queries lining delaying our whole app. did not happen when had 12 cores.
i grateful hints or tips. conducting full-review of server(variable) configuration. using innodb-tables.
thanks lot, fman
it sounds me mysql reaching it's i/o limits. did stress test on our db server , that's critical understanding db choke points when add together or alter records, have disk write (select can cached). when reading our website handled quite load, when simulated checkout (multiple records created) bogged downwards quickly.
back then, didn't have options. ssds expensive provision vs magnetic (and our choke number way beyond we've ever hit). best raid 10. but, clouds, can (and cheaply) have powerful db server handle i/o loads much improve (especially ssd prices dropping rapidly). you'll note amazon sells middle instances on provisioned iops feature
for production application requires fast , consistent i/o performance, recommend provisioned iops (input/output operations per second) storage. provisioned iops storage storage type delivers fast, predictable, , consistent throughput performance. when create db instance, specify iops rate , storage space allocation. amazon rds provisions iops rate , storage lifetime of db instance or until alter it. provisioned iops storage optimized i/o intensive, online transaction processing (oltp) workloads have consistent performance requirements.
it sounds much have simple setup (and maybe host db on same server). aws isn't game in town might want consider moving sort of cloud, or @ to the lowest degree step can handle higher i/o demands you're putting on server. forget number of cores. if hdd choking running 72 cores , not have difference whatsoever.
one other tip: check out mysql tuner. when run it, checks database stats (the longer it's been running, better) , can recommend lots of helpful tweaks can improve performance.
php mysql database performance innodb
Comments
Post a Comment