LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    

Go Back   LiteSpeed Support Forums > LiteSpeed Web Server > Install/Configuration > high-traffic site loads quickly, low-traffic site loads slow

Reply
 
Thread Tools Display Modes
  #1  
Old 12-10-2012, 01:14 PM
ARPLink ARPLink is offline
New Member
 
Join Date: Dec 2012
Posts: 8
Default high-traffic site loads quickly, low-traffic site loads slow

Hi,

For some time I've been dealing with a very weird issue. A part of the sites I host have a normal load time, but they have some traffic(from 50-100 visitors/day to 1000-2000 visitors/day). My problem is with low trafic sites(5-10 visitors/day). The load time for these low trafic sites tends to reach 40 seconds sometimes, but after the first visitor loads the site, if another visitor comes along in the next 30-60 minutes, the load time is instant.

My server is a Xeon with 8 Gb of RAM and 4 SATA disks in RAID 10. LiteSpeed is installed on a CloudLinux XenServer VPS and has alocated 7 cores and 7 Gb of RAM.

Here are some screenshots of Litespeed configuration and HTop.

LiteSpeed Monitor:


Server Process + Using Apache Config File:


Connection:


Request/Response + GZIP:


Per Client Throttling + External Application Resource:


External App - LSPHP5:
Reply With Quote
  #2  
Old 12-10-2012, 01:16 PM
ARPLink ARPLink is offline
New Member
 
Join Date: Dec 2012
Posts: 8
Here's HTop:
Reply With Quote
  #3  
Old 12-11-2012, 06:12 PM
webizen webizen is offline
LiteSpeed Staff
 
Join Date: Oct 2010
Posts: 2,339
it sounds like it takes a long time to compile php script the first time. since your opcode cache TTL is longer than 60 mins, next request hits opcode cache, hence fast.

check your i/o wait and see if your hard drive slow down php script loading from disk.

another thing you can try: run a cronjob to pull the low traffic site more often to refresh opcode cache before it expires.
Reply With Quote
  #4  
Old 12-11-2012, 10:56 PM
ARPLink ARPLink is offline
New Member
 
Join Date: Dec 2012
Posts: 8
Hi,

Thanks for the advice. I will monitor I/O for a few days, but from what I've seen so far in the last 48 hours it stais under 5%(in most cases around 1-1.5%).

As for the cron, it's a good ideea but impossible to apply because there are a lot of small sites and I don't know all of them.(it's a shared server)

Is there any way to make litespeed compile the php scripts faster or extend the opcache TTL time to 6 hours, for example?

Also, does my configuration look ok considering my server's resources?

Thank you

P.S. The server is on cPanel and has a remote dedicated mysql server attached to it. Could this be the reason for the slow compilation of PHP scripts?
Reply With Quote
  #5  
Old 12-12-2012, 04:00 AM
NiteWave NiteWave is offline
LiteSpeed Staff
 
Join Date: Sep 2009
Posts: 2,226
Quote:
P.S. The server is on cPanel and has a remote dedicated mysql server attached to it. Could this be the reason for the slow compilation of PHP scripts?
good point, looks more reasonable -- database warming up has caused the delay.

to verify this, just put a phpinfo() page under the documentroot, if phpinfo() is fast at any time, then the culprit is mysql; otherwise, it may be related to litespeed.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 11:34 AM.



- Archive - Top
© Copyright 2003-2011 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.