Moodle 2 installation that I use is not only used for running courses but also is used as content management system and has some traffic. Apache after tuning looks good along with APC PHP accelerator but considering 5x or even more load due to some event in future, I thought of giving lightweight server a try using it on another port. I chose Cherokee because some comparisons of lightweight servers pointed out towards, "easy to configure" aspect of Cherokee which I was looking for (incidentally, Cherokee installation/configuration turned out to be not really easy on an Ubuntu 10.04 machine). After installation, configuration and tweaking some setting, Cherokee appeared to be using far less RAM and responded quickly. However, in stress tests with large number of concurrent users some failed requests of the type, "Non-2xx responses" showed. The server error log file shows something like, "Could not unlock spawning semaphore...". The same test using Apache incidentally shows no failed requests with same number of concurrent users, but either the response time would be large or memory would be consumed depending on how Apache is tuned. As, the Cherokee installation under load would sometimes say, "503 service unavailable" doing some search pointed out the issue as php-cgi crash under load. Some tuning in php-cgi can possibly make it more stable. But, then if the site goes down at 3 AM due to php-cgi crash, who fill fix it? It does not appear to restart on its own. Won't a slow but stable Apache be better under such condition which would become fast once the load decreases? While doing the search to fix the issue, it appears that this php-cgi issue is there with some other lightweight server(s). This whole experiment was to decide the course of action under load without increasing RAM and unless php-cgi issue is fixed, tuned Apache seems to be the way for the moment. I wonder how much worth is the buzz about lightweight servers unless the php-cgi issue is resolved (for php intensive sites). Any thoughts, workaround, solution would be welcome.
The php-cgi processes are managed by the Cherokee worker, and that "Could not unlock spawning semaphore..." prevents it from launching/restarting any php-cgi process. It seems to be an issue with your config, maybe related to the user under the Cherokee worker is running (www-data?) or to the Fast-CGI config.
Did install Cherokee from Ubuntu packages or from the PPA linked at the Crerokee's website? Maybe trying the "other one" package will work better for you. Also, you could ask for help on the Cherokee's mail-list, which is very active and friendly.
I've been using Cherokee(PPA)+XCache on Ubuntu 8.04 Server to run a Moodle 1.9 install since 2008 and from my experience, the configuration is very simple and easy and the performance is great - with peaks of 150+ concurrent users the load rarely goes over 1.0 on a dual Quad-Xeon E5310 with only 1 GB of RAM.
The php issue has almost been resolved with manual configuration (PHP wizard did not work from Cherokee admin). One major issue has come up while testing Cherokee due to which right now I am back to Apache. Tex using latex, dvips, convert is giving internal server error with Cherokee, though it works with Apache.
When I was doing performance testing of Apache & Cherokee, it appeared that when both were tuned to work within certain memory limit using suitable MaxClients, StartServers, MinSpareServers, MaxSpareServers, MaxRequestsPerChild, Timeout settings etc. for Apache (KeepAlive Off as well) and suitable PHP_FCGI_CHILDREN, PHP_FCGI_MAX_REQUESTS, php timeout, server timeout settings for Cherokee, then both appeared to be taking comparable loads in comparable response time. If Apache was not tuned, it would eventually hang consuming all memory and Cherokee would give frequent 504 timeouts.
Troo Don, since you have been using Cherokee for a while, is latex working for you or you are using mimetex or something else for equations or not using equations. I installed Cherokee using, "sudo add-apt-repository ppa:cherokee-webserver" since you asked and am also using APC for php acceleration. Also, have you tried performance comparison with tuned Apache (for 1 GB RAM for moodle 2 with php accelerator, my guesstimate would be MaxClients=30, StartServers=30, MinSpareServers=30, MaxSpareServers=30, MaxRequestsPerChild=100, Timeout=30 sec, KeepAlive Off).
Latex has been working fine from the start and I don't remember doing anything else than installing the packages required for latex from Ubuntu's packages and adding the paths in Moodle's config.
When I configured the Cherokee server nearly three years ago, it was required to work ASAP to replace the Windows server where Moodle was previously running on. Since then, I didn't had time to do a comparision with Apache on the same hardware and also, you know, if it works, don't touch it .
The Windows server was running Apache and it had severe stabilty issues and with 2 GB of RAM it had hard times with more than 30 concurrent users. I suspect the main problem was a bad configuration, but migrating to a clean server configured from the ground up was the best solution. Now, we not only have a good performance, but also very good uptimes.