I have a web application written in php (5.6.10) and using Postgresql (9.4) we have about 4k users per day and about 20k page views per days, my main issue that we are running in cloud host with 2 application servers (Linode 16GB/ubuntu 14:04) and 1 database server (Linode 16GB /ubuntu 14:04)
but the queries are taking about double time it take in my local machine and the second thing that cloud server always slow even if i rendered simple php page
Is moving to to dedicated will decrease the IO latency and as a result of this the general performance will be better or i need to change my infrastructure?
UPDATE
I make some profiling for the database and php
DATABASE: all database queries taking about double time and even the opening of database connection
PHP take more memory and slower , i'm using the same php version in both servers.
First Byte:
I can see that server is taking about 1 sec before output to browser which is not the same as local