100 Day Review Of LiteSpeed (Apache Drop-in Replacement)
Aug 14, 2007
(This is the first review I've ever written for practically anything so please bear with me. I feel the need to share my experience to try to help others after all the great advice and info I've received around here.)
If you've done everything you think you can do to improve the responsiveness of your websites like add a mysql cache, PHP opcode cache and various other tweaks, I discovered there is still one more easy thing you can do for a big improvement: replace Apache with LiteSpeed. It's way too easy not to try it and you can leave Apache completely intact to go back to at a moment's notice if you so desire.
I call LiteSpeed a "drop-in" replacement because it uses all my httpd.conf and .htaccess settings without modification. This was critical for me as my sites have some very complex rewrite rules. Other solutions like LightHttpd require extensive work to make changes if you use fancy mod-rewrite rules. LiteSpeed does not need any fiddling. LiteSpeed just adds it's own clean little web interface so you can tweak if you want to, but I didn't really have to change anything. Last but not least, LiteSpeed gets along with Cpanel and DirectAdmin without any conflicts. LiteSpeed's so compatible I can literally do this on my server and the visitors don't even notice the difference (except speed of course!)
service httpd stop
service lsws start
(and visa versa)
I discovered LiteSpeed after reading that the main WordPress.com site had switched to it and had great success (they have a quarter million registered bloggers and of course many millions more daily readers).
The main reason I tried LiteSpeed is because it's roughly twice as efficient in memory use and performance than Apache 1.3 & 2. It runs PHP up to 50% faster than Apache and static files get served several times faster (faster than thttpd & lighthttpd). So this means you can either double the number of active connections you currently max out at now, or make a regular website respond nearly twice as fast, or under heavy loads still respond within a reasonable amount of time when Apache would be completely unresponsive.
The last situation was exactly what I was hoping for and LiteSpeed helped me keep my sanity on a bad VPS node.
Basically a couple months into owning my first VPS (after many years of shared-hosting experience) I started to realise many of the industry promises about VPS are an outright lie. You are far from isolated from your neighbours. Any disk load created by bad neighbours, mysql abuse or otherwise, will directly affect you and you are powerless to stop it. It's the most poorly regulated resource on any VPS node and it can be made worse by slack, ignorant or inexperienced hosts who do things like move accounts during busy periods onto and off a node at the root level which ties up the entire node for an hour or more. Under Apache, I was getting timeouts during peak visitor times and that was very upsetting.
On top of my VPS neighbour troubles, no matter how I fiddled with Apache's settings (with all the helpful guides around here) I could not make it comfortably fit within the guaranteed memory limit of my VPS with Cpanel, which I really wanted to keep as it's much easier for my end-users. Switching to LiteSpeed caused a radical drop in memory use. I've seen nearly 1000 people online within a one minute period on one of my sites and it still fit comfortably within my memory limits and stayed extremely responsive.
I've discovered another plus to LiteSpeed along the way that no-one else seems to mention. It's the only server software that "out of the box" seems to serve web compressed (gzipped) pages properly as chunked output. This means a visitor will start to see the page immediately as soon as the first part is sent vs. on Apache, mod_gzip actually de-chunks all the output, waits for it to finish, then compresses, then sends.
Mod_deflate on Apache 2.0 was supposed to fix this but it usually doesn't work properly and I've never gotten 2.0 to do compressed+chunked output on my sites without alot of fiddling and help from PHP. It also doesn't seem as smooth as LiteSpeed's output which gives you that "silky" watch-the-webpage render effect that's mentally rewarding to visitors.
On the downside, there is one reason you wouldn't use LiteSpeed - if you use highly customised Apache mods. LiteSpeed cannot support custom mod's and their directives. It does have a lot built in however that Apache does not, so you may way to examine if you can accomplish what you are trying to do another way.
I started with LiteSpeed 3.1 and when I found an incompatibility with an obscure Apache feature (ie. ErrorDocument's as plain text output: ErrorDocument 404 "Not Found" was not supported) they fixed it for me in a day or so after I reported it on their forum. The same for PHP support of "Apache_Response_Headers". Note I am not even a commercial customer! They are now up to 3.2 which has a few other fixes.
The free version of LiteSpeed has a limit of 150 simultaneous connections (plus the linux stack of 200 more which will backlog). I've never seen that limit hit. It's so intelligent about closing connections as needed that it's not an issue for me. Perhaps on a dedicated server with many virtual hosts this will be a problem. Up to version 3.1.1 that was the only limitation, however unfortunately in 3.2 they have decided to also limit virtual hosts to "5", so that's something else you'll have to consider if you want the free version, otherwise the commercial version has a free trial and money back guarantee.
Some people were upset with me that I wouldn't name my VPS host when I was constantly complaining of troubles but that's just my style when I have nothing nice to say still have to do business with them, so don't name names. But when I have something nice to say about a company, I like to speak up. So I heartily recommend LiteSpeed and hope other people give it a try - especially if you are on my VPS node ;-)
SO the last few months I been trying like crazy to tweak Apache or find a better http setup such as running lighttpd with Apache, etc. I have been frustrated by the way Apache easily fork bombs under any decent load or dos attack. You get about 100 bots all making 30+ connections a piece on Apache and it kills it.
Bot kids have adapted to ddos protection and connection flooding banning by sending low bandwidth attacks that do not make enough connections to get banned if you do have protection, its real low bandwidth incoming but is like a massive vampire attack outgoing. And it destroys Apache no matter what you do, what modules you have, etc. You basically have to go in and manually ban or set your connection tracking limit down to where it starts banning regular users too.
So I seen on here somewhere someone recommending litespeed to someone so I went and checked it out and was amazed by the performance. I installed the trial enterprise in a p4 server I been having problems out of lately crashing all because a busy site and I installed it in my main server.
The only thing I needed to do was compile my own php5 for it, which is real easy via their wiki instruction. After a few snags here in there I finally got it working tip top on both servers, both of which are cpanel.
So with the p4 that was always crashing and keeping hi load, We would end up having to remote reboot that box almost once a week not due to any misconfiguration or wrong setup, just couldnt take all that Apache usage and would die. We instantly noticed a difference with litespeed. The average load used to be about 1-2 always, with litespeed the average stayed about ..2 even under heavy traffic. So this was a big improvement and we have not had to reboot that box since.
My main server which I take my high risk clients on, core2duo 2.4. I thought there for a Lil bit the sites were starting to outgrow the server as its average load always was around 1 which was fairly acceptable seeing the traffic it gets so normal for Apache.
During the low bandwidth ddos attacks I would have to go in and manually ban as well as setting connection limit way down just to keep it from lagging, most of the time it still did. So I was really wanting to do something for this server to optimize http without upgrading, because it seems most of your hardware upgrades are to suit Apache anyway.
So I installed litespeed on my main server, ran into a few snags here and there but eventually got it under control. Just the last few days I got to see it put to the test.
I took on a client who was being extorted by a ddoser who recently got him kicked off his previous host. SO as soon as dns resolves here comes the crapstorm. A low bandwidth http attack, a lot got by ddos firewall on the network level which these are hard to stop because they are so similar to a legit user.
So I started getting hundreds of csf connection tracking blocked emails, was checking the site periodically and it loaded fine. So I logged in the box, looked at the load.
Was at .24. When I done netstat command there was hundreds of syns coming in and about 250 ips all connected about 50 times, this would normally kill Apache no matter what CPU/ram and all that you have. So I set connection tracking down to a reasonable level, 60 connections and I figured I would just let them get themselves banned. Looking in the live stats in the litespeed admin panel which is real cool BTW. I was seeing about 400 requests a second. This was eating a Lil bandwidth, all outgoing as that is how the attack works like a massive vamp attack. So about 2000 connection tracking emails later finally gets em all banned. The entire time the load on that box never even got to 1!
So im pretty much amazed how fast and light this http server is. And especially how well it handles dos. I about know for a fact even if you was on a non protected network it could handle as much http as your pipe will give it, and do all this at a low resource load.
This will end up saving me money on hardware upgrades in the future as well. Long review, long story, but I been so amazed by this http server I had to make a review on it. Im sure some geniouses will try to say "If you do this and that with apache you can make it just as good" But check it out for yourselves and see.
Anyone happen to know the difference between the two and whether or not I'll notice the difference between them?
For example, many, many, many, many moons ago, in a far away land, there used to be a difference between Windows and Linux for perl scripts. In fact, if you couldn't re-write half the script, some of them just didn't work right on a windows host.
Are there any differences like that between lightspeed and apache, or is it all pretty much the same and doesn't really matter?
I no longer have the funds for a LSWS lic, so I need to move to Apache. I run CPanel and need help in configuring Apache to be able to take 120 requests/sec and no crap out.
I've never worked with Apache since been using LiteSpeed for over 2 years, so I need some advice on how to set it up, compile, configure, ect...
I started a thread last night to get some opinions as I am trying to find a new host & now am coming up with another question... Apache vs Litespeed. A cpanel is important to me, which I am not sure is possible with Litespeed & a highly rated company that offers LS, Medialayer, doesn't offer phone support which is mandatory to me. Can't find many companies that offer Litespeed & everything else that I need.
So as not to repeat, please see the tread I started last night to get the gist of my needs. I also another opinion over there on Liquidweb. See:
We run a quite intensive web and found some performance tests about LiteSpeed Ent. Our site is Apache + PHP driven. Is it worth to pay for LiteSpeed Ent ? Is the performance increase really significant?
if there is any difference between apache & litespeed? Performance wise I know litespeed would be better. But in terms of configuration wise, compatitibility wise and some other factors, how different would it be for apache & litespeed?
My concern is if I were to change from apache to litespeed, would my webhosting customers know how to use it in 1 way or another? like permissions and stuff.
I know most webhosts run Apache and it seems to server their needs very well. However LiteSpeed is new and fast, assuming you have relatively static content. At least that's what I've heard. Beyond this, I don't know much, though a year ago I worked with a guy who hosted an iPhone software repository (smallish files, huge demand), and he put LiteSpeed on the servers to deal with the load. Running at 30+ Mbps, with spikes above 60, the server never went above 0.2 load as far as I remember, and it was just a 2GB Core 2 Duo E6300 1.86 GHz machine.
how Litespeed Standard (free) edition compares to apache. Of course it's not as good as the paid version, but I'm wondering how the free version compares to Apache.
According to the latest trend and technological advances, which server software should people go with from the very beginning. Which do you recommend as on today?
btw anybody has experience with all 3 (apache/nginx/litespeed) webservers?
I have -
On a common shared environment, I started off with Apache - was fine until some load started generating and it became crapache.
Then litespeed - Totally awesome, could seriously feel the difference, but its cost is something not everybody can afford.
Then nginx - Very nice, felt like litespeed only, the only difference was it got quite complex in configuring it at a later stage BUT its free'ness made me love it badly.
2008-04-06 08:52:32.597ERRORApache Binary Path must be set properly in order replace Apache, fall back to 'Reload on configuration file change'. 2008-04-06 08:52:32.602WARN[configerver:listener] No listener is available for normal virtual host! 2008-04-06 08:52:32.604ERROR[config:template:centralConfigLog] Listener [Default] does not exist 2008-04-06 08:52:32.605ERROR[config:templateHP_SuEXEC] Listener [Default] does not exist 2008-04-06 08:52:32.605ERROR[config:template:EasyRailsWithSuEXEC] Listener [Default] does not exist 2008-04-06 08:52:32.617WARNStandard Edition only support up to 5 Apache vhosts.
I did everything on the litespeed setup I was soppose to found at their wiki site. But still I recieve these errors, LiteSpeed works on my server because httpd is disabled and LiteSpeed is responding to request now.
I'm noticing that apache's mod layout is dead upstream and has been for a while. I'm looking for somthing to use to put ads and a legal disclaimer on free hosted blogs (lifetype).
I normally use Win32 Clamav for scanning of viruses in servers but now it is no longer being maintained. Where can I find an equivalent? Or is there any step by step instructions on compiling it from source?
I was a reseller with WebstrikeSolutions for almost a decade and now, sadly, they are gone. Swallowed up by EasyCGI...don't know if they are any good or not but the few opinions I did manage to find haven't been very favorable at all. Plus, somewhere in the transition my credit card info got out into the world and the very next day after being billed by EasyCGI, fraudulant charges showed up on my credit card which I had to cancel! Not sure if it's a coincidence or not but the timing seems odd...so if you believe in signs, I'm thinking that that just might be one saying it's time to move on...
So, I am now looking for a replacement host. Unfortunately, trying to find out anything about the various companies by searching Google results in nothing more than a tangled mess of "review" sites that are nothing more than paid advertising for whichever hosts pays the most to be number one!
I am looking for a Windows host in the neighborhood of <$10 a month. I have been considering ReliableSite.net, m6.net, godaddy.com (except I use them to register my domain names so that might be a bad idea) and **************.com (why is a-c-cuwebhosting.com blocked out?). Any opinions about any of the above would be greatly appreciated. Of course, if anybody (other than a company owner or marketing guy/gal) has any experience with somebody else I would love to hear from you.
Now, as for requirements, my bandwidth needs are relatively low and storage doesn't need to be enormous but once my standard sites are up and running I would like the ability to offer customers individual website packages utilizing oscommerce (possibly) as their storefronts to allow them to sell their own products. Basically online stores that they don't have to code or setup themselves. That's the long term goal. Right now I just want to get my sites back online so that I can maintain and update them without incident.
As many of you may have also experienced, Easy CGI went from being one of the best hosts (I had them for 7 years and they were great), to one of the worst. They migrated to new servers and literally destroyed our site, lost data, did a search and replace of our code (yes, this actually happened), and brought our sites down completely. After about 100 hours of on-line support, chat, phone calls, emails, etc. we have to move on.
The things that were great (prior to the debacle) about EasyCGI was the Windows hosting, fast performance (FTP access was great), and the controls that were available. I'm finding it difficult to match what we used to have. I've tried GoDaddy's VPS packages and that was a complete bust due to FTP performance (would have literally taken us months to just upload our web site ... about 10 GB total).
I tried Network Solutions, but they are only Linux and although they told us they support ASP Upload, ASP Email, and a number of other controls, now tell us that those are not supported.
I've also tried APLUS.NET and 1AND1. Same peformance issues.
anyone have any recommendations for hosting that would meet these needs?
Windows (Virtual or Shared) 30 GB + disk space Unlimited Email Form Mailers (CDONTS or ASP Mail) ASP / ASP.NET / AJAX DSN with Microsoft Access databases Ability to work with SQL Server (not MySQL) databases ASP Upload (or similar) that can be coded in ASP to upload files FAST PERFORMANCE Unlimited FTP accounts (we create a folder and FTP account for each of our customers) Unlimited (or very high) transfers monthly (~ 1000 GB/MO +)
I have been fiddling with an .htaccess file trying to get it to show a default "Image Not Available" image in place of a 404 error. I have found code in other forums that has worked for others, but does nothing for me:
Code: Options +FollowSymLinks RewriteEngine on RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI}!-f RewriteCond %{REQUEST_URI} (.*).(gif|jpg|jpeg|png)$ RewriteRule ^(.*) noimage.gif and this one which several people said worked for them
Code: RewriteCond %{ENV:ERROR404} .(jpg|gif|png)$ [NC] RewriteRule ^.*$ noimage.gif [L] Anyone had experience with this? The webserver is Apache on CentOS 5.
A friend pointed out today that urgentVPS' WHMCS license had expired so he was unable to get to support tickets, he also said about the phone number not working properly. Wondered if anyone could shed some light on this situation, or whether I should get ready to back up and pack up?
way to restart mysql and named if they drop. I'm on cpanel.
I've searched and found the following:
For mysql:
Code: NUMBER=`ps --no-heading --user mysql | wc -l`; [ $NUMBER -eq 0 ] && service mysql restart; For named:
Code: NUMBER=`ps --no-heading --user named | wc -l`; [ $NUMBER -eq 0 ] && service named restart; I have these set to run every 5 minutes, just to check if mysql/named are running. I found out that it doesn't work: I woke up to a whole bunch of sql errors and realized that mysql dropped while I was asleep... I type in "service mysql restart" manually and it restarts as usual, so I know that the command to restart sql works fine, but the restarts aren't triggering in the first place.
I keep having tons of spams in the Drop folder of my Windows SMTP which I enable only for sending out forms. How do you normally stop this? I cant stop the SMTP as it is for forms usage. Relays are already set to my local IPs
I have created virtual SMTP server in IIS6 and while send e-mail from the same server using SMTP IP address, the e-mail do not reach recipient, all sent e-mails goes directlly to DROP folder and stay it that folder.
I have checked event viewer, no error, also used telnet to create and send e-mail, no error.
I just got my servers up, DNS servers what not and my main plesk server for shared/reseller hosting.
Now for the weirdest thing ever!
I started working on my plesk packages a few days ago, after I got plesk installed.
Systems stats as follows
Supermicro AS1021M-T2 barebone [url]
Has 16GB of infeon DDR2-667 memory. 2 250GB hard drives in mirrored configuration with the Acera 9500 w/ 256MB of memory
Running Cent OS 4.4
For some reason, Everytime I go into Plesk, or any of the websites that are contained in Plesk, The nic card drops out, wont allow any activity to get through, both ways.