Reputation: 21
I've recently re-deployed an existing PHP app to the bluemix cloud and the "default" (as in I've done nothing to optimise other than increase the memory on the CF instance) performance is terrible - as in 30s to 1m to perform a simple DB query that previously was instantaneous.
I don't believe that it is an app problem (its too simple) so I'm trying to see if there are any performance / tweaking parameters in bluemix that might be responsable.
Its a simple PHP 5 application with a Clearbase Mysql DB service.
Anybody got any ideas?
Upvotes: 1
Views: 73
Reputation: 1562
I would start from analysing the request management, how long it takes from connection to "time to first byte" using a browser tool for developer. Then when you will be sure that the request reaches fine your app, I would bypass the query to isolate the eventual problem and to be sure your app hasn't any other bottleneck. Once you isolates the problem, let debug the query, try running it directly on the database to check how long it takes. I see you are using mysql, so you could also run the explain command in front the query to check how the db engine fetches the results.
You could also put some logs on your app with a timing to understand where it takes so long and then read it through cf logs (appname) --recent
Upvotes: 2