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

Go Back   LiteSpeed Support Forums > External Applications > PHP > Performance tuning - php 4/apc/lsapi

Reply
 
Thread Tools Display Modes
  #1  
Old 08-21-2006, 04:04 PM
bazza bazza is offline
Member
 
Join Date: Jun 2006
Posts: 13
Default Performance tuning - php 4/apc/lsapi

Hi,

I was wondering if anyone could provide some feedback as to optimal settings or performance tweaks to get the most out of a relatively standard lsws 2.1.20 std/php 4.4.2/APC setup?

Things have been going along ok, but recently, we have had issues with huge load spikes. The load will spike from < 1 to > 100 in a matter of seconds. Looking through the access logs, there is nothing obviously untoward that would cause such a spike (DoS, etc). What I did notice is that when these spikes happen, the number of lsphp processes increases dramatically. Normally less than 10, it can increase to over 100.

Previously, we did not have the PHP_LSAPI_CHILDREN env variable set, so I have been experimenting with different combinations of config settings.

Is defining the PHP_LSAPI_CHILDREN variable provide better performance than not defining it? I think that in our case, it may help these load spikes, but it is too soon to tell. Also, what should the variable be set to? Is it more efficient to have 1 lsphp instance with # of children = max connections or should the number of instances be greater than 1 and the number of children less? I can see how there could be advantages and disadvantages to each, but not sure what the best options are.

Also, we have been experimenting with keep alives, but have yet to really determine the optimal settings for those as well.

Any input would be greatly appreciated.

Barry
Wordpress.com/Wordpress.org
Reply With Quote
  #2  
Old 08-21-2006, 08:54 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
The root cause probably is not in PHP or LiteSpeed, maybe because the backend DB cannot keep up and it causes load spikes on front end server.

PHP_LSAPI_CHILDREN may not help much. Better to find out why PHP has been slowed down.
Reply With Quote
  #3  
Old 08-21-2006, 10:09 PM
bazza bazza is offline
Member
 
Join Date: Jun 2006
Posts: 13
Thanks for the reply. I dont think the DB layer is the problem, but it could be something else (memcached, maybe?) It could also I guess just be a large influx of simultaneous requests. If this were the case, would it be wise to use PHP_LSAPI_CHILDREN to handle the concurreny better? Do you have any recommendations

Thanks.
Reply With Quote
  #4  
Old 08-22-2006, 06:21 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
Using PHP_LSAPI_CHILDREN will start all PHP processes statically, so it may handle the traffic surge a little bit better, but it will not solve the load spike problem completely. You can set "Dynamic Requests/second" to smooth the traffic surge a little.

Better to found out exactly what causes the problem and act accordingly.
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
replacing system php felosi PHP 3 07-16-2007 11:23 PM
Usability issue with LSAPI PHP jrmarino PHP 5 05-08-2007 01:54 PM
setup php in rails template cswilliams Install/Configuration 2 01-25-2007 08:21 AM
recommended rails performance tuning Tomh Ruby/Rails 2 11-23-2006 03:02 PM
Best configuration for PHP LiteSpeed SAPI jeff Install/Configuration 6 10-19-2005 09:54 AM


All times are GMT -7. The time now is 04:53 PM.



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