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.
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
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 188.8.131.52
Workstation: Win7 pro 74bit, i5 8BG RAM
Browsers: MSIE, Chrome, FF (all latest versions)
ISP: true for all
Speed: 6-20Mbps down, 1-5Mbps up
ping to target VPS 2-4ms
browsers: MSIE, FF, Chrome (latest versions)
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.