Variable page load times..

Hi,

I have been monitoring page load times as I optimise my Drupal site.. Strange thing is the page load times with no changes vary massively..

Is this most likely because its a virtual server and so depending on the load of the other virtual servers are putting in the physical server would effect how my sites pages respond?

If so are there any best practices for profiling sites running on a virtual server to optimise it? Or is is something like nailing jelly to a wall because you can never know what the actual server is doing?

TIA

4 Replies

It entirely depends on the other processes too, and it may depend on things such as query caching, kernel disk caching, etc.

See if running an opcache like APC helps your server's performance, also.

Thanks for the reply..

APC isn't really an option because I am running a combination of php-cgi and php-fcgid sites.. Since php-cgi closes the process, and so the cache it actually slows things down.. With php-fcgid each site would have its own cache so would quickly chew up memory.. The only way it works is with modphp.. Since I am using MPM-Worker with suexec modphp isn't really an option.. :)

Anyway I think the best option I have is to "profile" the pages rather than looking at load times which, especially on a virtual server, are effected by factors that are beyond my control..

Drupal also employs its own page cache, so if it has an equivalent result ready to go, it will be really fast. On the other hand, if it has to generate the page from scratch, it will take some time. That will account for orders-of-magnitude differences in page rendering times.

If it takes more than a second to spit HTML out, it was probably a cache miss.

@hoopycat:

Drupal also employs its own page cache, so if it has an equivalent result ready to go, it will be really fast. On the other hand, if it has to generate the page from scratch, it will take some time. That will account for orders-of-magnitude differences in page rendering times.

If it takes more than a second to spit HTML out, it was probably a cache miss.

Thanks hoopycat, I know about the page cache.. The load times I am looking at are averages of between 30 - 90 page loads at various times of the day.. So yes caching is a factor but shouldn't be the cause of the variation over that many page loads.. Of course I could disable the caching to run tests, optimise it and then re-enable it to eliminate it as a factor.. Average page load times vary from ~70ms to over 200ms so its a fairly large variation..

I still think the variation is likely due to the available processor resource of the physical server which is determined by what all the other vm's are doing at the time. This means that any performance optimisation needs to somehow be done independently of CPU influence..

In thinking about it every resource in a virtual environment is in some way or another contended which makes accurate measurement for tuning and optimisation a little tricky if you want accurate results..

Think I have answered my own question.. :)

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct