![]() |
Litespeed and eAccelerator on Mac OS X
I've installed Litespeed Standard 2.1.14 on a test iBook running Mac OS X 10.4.5 (PPC), and for the most part it appears to function. There are a few gotchas I've come across, which I'll explain below as I document the process.
- Install wget, which is required by the installer but is not on OS X by default Code:
$ sudo port install wgetCode:
$ tar xzf lsws-2.1.14-std-ppc-osx.tar.gzCode:
Destination [/opt/lsws]: /usr/local/litespeedhttp://localhost/phpinfo.php I did some benchmark testing via Apache Bench on the above URL but was only able to get about 68 requests per second. I used the enable_phpa.sh command line tool to turn the APC cache tool on and off, but it did not appear to make a difference. I decided to try some of the other caching tools, but ran into several problems. With mmcache, for example, the download link from the download page... http://www.litespeedtech.com/package...ppc-osx.tar.gz ...results in a 404 "File Not Found" error (just click the above link and you'll see what I mean). Okay, so much for mmcache. Let's try eAccelerator. I run enable_phpa.sh and select item #3 (eAccelerator), and the following is the output. Code:
http://www.litespeedtech.com/packages/eaccelerator/eaccelerator-php-4.4.2-ppc-osx.tar.gzI tried compiling eAccelerator manually via the following steps and then selecting it via enable_phpa.sh, but doing so broke PHP completely, and I had to revert to APC. Code:
$ tar xzf eaccelerator-0.9.4.tar.bz2Thank you! Justin |
Any suggestions?
We would like to deploy Litespeed instead of Lighttpd or Apache, but that unfortunately won't be an option if we can't get Litespeed to play nicely with eAccelerator.
Xing? Mistwang? Anybody have any suggestions as to how we might get Litespeed working on Mac OS X with the leading PHP opcode accelerators? I tried above to provide as much detail as possible, but if you need additional information to help troubleshoot the problem, by all means please let me know. Looking forward to your suggestions! :) |
Justin, sorry for the late reply. Schedule off wack.
First off, the pre-configured install options for PHP opcode caches are a bit update and looking forward, we would likely remove all both mmcache and eacc and default to APC 3.0 in the near future. One reason is that APC is simply the most well developed product at the moment backed several key PHP developers. I would highly recommend you to use the latest APC opcode module from http://pecl.php.net/apc . Try that with OS X. You will have to install the developer tools on your ibook to get gcc/compiler packages. You will have to compile and install it yourself. From my personal experience with APC, which has had major stability upgrades the past 6 months, is now the defacto PHP opcode cache module to beat. Zend is non-free so we can ignore them. LiteSpeed does have a 24/7 live OS X (Intel) server testing our software non-stop so I will try to install PHP and APC on it tonight to see it how it goes. I don't see any potential problems. Lastly, you are probably curious why I recommend APC over eAcc. The answer is pretty simple, I started on eAcc and have always had php segfaults, though at a very small volume, per day. Since the move to APC, 3.0 branch I have not had a single problem with the opcode cache. Our in-house LiteSpeed test machines gets tested very hard 24/7 with live traffic as we have agreement with a few websites so based on that, I'm sold on APC 3.0. |
There is a gotcha when using SHM segements with OS X. Make sure you follow the instruction here:
http://www.digitalpoint.com/~shawn/2...-variants.html |
Try this:
APC 3.0.10 on OS X (intel) 1) download/expand PHP 5.1.2 2) cd into php-5.1.2/sapi 3) download and expand lhttp://www.litespeedtech.com/lsapi/litespeed-1.9.tgz into the "sapi" folder of php source. 4) in php source directory, do Code:
touch ac*Code:
'./configure' '--prefix=/xingwww/php5' '--with-litespeed' '--with-config-file-path=../conf'/xingwww/php5/sapi/litespeed/php. 7) Download/Expand APC from http://pecl.php.net/package/APC . In APC source dir do: Code:
/xingwww/php5/bin/phize8) Configure /lswsinstall/conf/php.ini Code:
extension=apc.so9) Critical for OS X. By default, OS X kernel does not allow shared memory segments over 4MB. So right now, apc.so wil fail to load with some "can't load null" error. edit or make /etc/sysctl.conf if doesn't exist already with following values: Code:
kern.sysv.shmmax=134217728That's it. |
Thank you!
Thank you for the detailed responses! They were very helpful.
Quote:
I have Litespeed running with APC 3.0.10, and running the "siege" load test tool locally for 30 seconds on phpinfo.php on a dual 1.0 GHz G4 Xserve produces the following results: Code:
$ siege --concurrent=10 --time=30S --delay=0 --url=http://localhost/phpinfo.phpThe next step is getting Rails running on Litespeed via the Ruby LSAPI module (as opposed to fastcgi). If you could possibly test Rails via the Ruby LSAPI on your MacTel server and document the steps as you did above and post them in the new thread I created, I imagine you will have a number of very grateful folks (including me!) :D Thanks again for all of your help! Justin |
| All times are GMT -7. The time now is 07:39 AM. |