2

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

  • 4
    What does this mean: "the second thing that first bay always slow even if i rendered simple php page"? As for your question, it's kind of too generic. Virtualized servers can be (almost) as fast as dedicated ones, but if on a rented platform, performance is almost always lower, because there are other customers on it. – Halfgaar Jul 9 '15 at 11:54
  • 1
    Have you done testing to see if it's the Web server -> DB or the client -> Web server that is slow? Can you create a static HTML page and see if that's noticeably slower? – TheFiddlerWins Jul 9 '15 at 15:34
-3

Performance will never be the same because you local server is a few feet away I suppose. Even if your hosted server is on the same city, you still need to take in consideration the time it takes every request to get to the server.

Also, bandwidth will have a small effect too.

Moving to a dedicated server might decrease TCP (network) latency a little, but you'll never get the same response time as your local server.

  • That's not really true, yes, the actual TCP latency will be lower on a local network but that's not the same thing as saying the page will render faster - that is a much more complex issue. – TheFiddlerWins Jul 9 '15 at 15:33
  • See my edited response. I never meant that the rendering time is related to the network latency. – joluis9 Jul 9 '15 at 18:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.