Solved

Slow performing home page on fast server

Posted on 2011-03-04
5
474 Views
Last Modified: 2012-05-11
I have been experiencing slow website but only when it is viewed for the first time on the network. It may take 6-15sec for the home page to popup, after that it's very very fast. Perhaps one of the experts can solve the issue, or at least point out what the problem may be.
Hosting:
VPS: 768MB RAM
HDD: RAID 10
CPU dual xeon
Idle CPU utilization: 0.1-0.2%
OS: CentOS 5.x 64bit
Website: Joomla 1.5.22 with demo content, cache disabled, no gzip compression
Template: Original template, no modifications

Network 1:
Speed: 100Mbps up/down
ping to target VPS: 2ms – 20ms, no timeouts
hops: 8 (both machines are in the same city)
DNS used: local DNS on Windows 2008 server R2, or 4.2.2.1
Workstation: Win7 pro 74bit, i5 8BG RAM
Browsers: MSIE, Chrome, FF (all latest versions)
Network 2,3,4
ISP: true for all
Speed: 6-20Mbps down, 1-5Mbps up
ping to target VPS 2-4ms
hops: 8-9
browsers: MSIE, FF, Chrome (latest versions)

Symptoms:
Nslookup performed on the workstation prior to opening home page returns correct IP address without any delays, www.intodns.com didn't report any issues with DNS set up, 100% returned pings with avg of 2ms.
At this time workstation is aware about the DNS/IP address of the target website, yet when home page is opened in any web browser for the first time it takes anywhere from 6-15 seconds while browsers display "waiting for www.example.com"...
After home page opens for the first time everything else works super-fast.  I can reopen the site without any problems; clearing dns cache will not affect it (done on DNS server as well as on the workstation).
At this time page can be reopened any time and it is very fast. No proxy connection enabled in all browsers.
The problem can be reproduced on every network, condition is it needs to be a first request in a longer period of time, I'd say 6+ hours.

I have talked with the hosting company, everything looks good on their end, DNS is set up properly, VPS is not overloaded, and underlying hardware is also in good shape.  I am suspecting routing cache problem on their end, but can't test it remotely. They keep saying everything is fine on the VPS.

What could be a problem here, it's been over two months, and no one knows what's causing the slowness.  The problem is not only related to Joomla site, I used it as an example. Other PHP/mysql site are also lagging upon initial view.
0
Comment
Question by:Coffinated
5 Comments
 
LVL 39

Assisted Solution

by:Aaron Tomosky
Aaron Tomosky earned 166 total points
ID: 35040741
Usually a lag before initial page view is caused by initiating a connection to the database. Is the database on the web server? If you remote into the web server an view the site is it also really slow for first load?
0
 
LVL 10

Accepted Solution

by:
APNFSSC earned 167 total points
ID: 35040925
well you could narrow it down by putting up a html page with a few average size images on it, this takes the db out of the equation.

Also in FF you could install the "Firebug" add-on which shows you the net times for the content that is loaded... this may also help.

Is it slow for every person the first time?

As you have a VPS you could try installing mytop on the server and then connect that to the mysql servers so that you can what what the database is doing when the first load occurs, it will show you the queries executing.

0
 
LVL 83

Assisted Solution

by:Dave Baldwin
Dave Baldwin earned 167 total points
ID: 35041013
You can use this page http://www.uptrends.com/aspx/free-html-site-page-load-check-tool.aspx to see what takes a long time to load on your page.  But the first time is always going to be the longest loading time because after that all the common graphics and scripts are in the browser cache and doesn't have to be downloaded any more.
0
 
LVL 5

Author Comment

by:Coffinated
ID: 35158646
The problem was directly related to underlying hardware, VPS got moved to another host problem and the problem disappeared.
0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 35158735
Thanks for the points anyway.  Glad you got it solved.
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If your site has a few sections that need to be secure when data is transmitted between the server and local computer, such as a /order/ section for ordering or /customer/ which contains customer data, etc it would of course be recommended to secure…
Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL (http://www.experts-exchange.com/articles/201/Handling-Date-and-Time-in-PHP-and-MySQL.html) several years ago, it seemed like now was a good time to updat…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…

679 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question