LiteSpeed Tuning for over 100req/sec

cmanns

Well-Known Member
#1
It runs good but sometimes we get hang ups. I got DDoS protection and what not, it seems lshttpd IO binding?

Also is there no way to change the /tmp/lshttpd dir with the status files that update all the time and what not to a ramdisk? I --bind mounted /dev/shm/tmp to /tmp and it seemed to help but we'll see, need some more mem first :)

What options should we use, and I'm on LSWS VPS on a 8 core xen cloud platform vm pretty much on it's own node with a 8 disk raid 10 array (hardware, bbu) and 10GB ram, might go to 2gb since theres very slight occasional swap.

We aren't cpu bound or anything, we'll pump 1 sec page loads with like 60 php req/sec, then randomly it slows up which feels like litespeed.

Just curious what tuning y'all doing, we're about to do a new LiteSpeed case study with 4.1.1 and MariaDB 5.2.7 vs Apache mpm event + mod_fcgid and MySQL 5.1

Also why don't we use an IRC channel? I could throw one up.... we should all chill and chat like all the other app users do. I searched left and right for a channel
 

anything

Well-Known Member
#2
you are only getting 60-100requests/second?

on a medium spec quadcore machine im getting a lot more:
html/files: Requests per second: 24206.36 [#/sec] (mean)
php: Requests per second: 19106.94 [#/sec] (mean)
granted that its not VPS but it cant be hurting your performance that badly.

it sounds to me that your choice of webserver has nothing to do with it.
 

cmanns

Well-Known Member
#3
you are only getting 60-100requests/second?

on a medium spec quadcore machine im getting a lot more:

granted that its not VPS but it cant be hurting your performance that badly.

it sounds to me that your choice of webserver has nothing to do with it.
We had LiteSpeed on a quad cpu system and on Xen, got similar performance in our lab, it was also on production on a similar quad cpu which we find Xen performs very nice.

How do ya'll get so much PHP performance? We notice high lag in req processing. Does the childs handle more then one request per second?


I have max connections set to 25, seems logical or mysql can get a bit more hits and raise more ram. We got childs to 4 atm I think which is logical incase someones page is eating 1 core they don't spawn 5 other ones.

The load is nice, lots of req/sec currently around 1 load with the above. Shall I allow it more connections?

I just don't know where to tune with LiteSpeed after what we've done.
 

anything

Well-Known Member
#4
How do ya'll get so much PHP performance? We notice high lag in req processing. Does the childs handle more then one request per second?
the above test was for a file that is literally: <? print "hello"; ?>

if you are benchmarking a wordpress/drupal/complete php&mysql site then your performance will be very different.
this is because the bottleneck is likely your website's code itself, or its connection to the database. changing webserver will not do much for you.


I dont normally do this for a random forum. but I thought i might give you a real world complete example.
I used one of the websites i manage as test..

on the same webserver as mentioned above, a full wordpress site with no caching gets only:
Requests per second: 31.96 [#/sec] (mean)
this is because wordpress is getting stuff from the database, including lots of files, doing lots of things with the template/etc/etc.
the site also has many modules installed, of which any one of these could be badly written (they're written by any old joe, so assume badly written=yes!).
so performance steadily declines and declines until you are left with a website MUCH slower than it could be.
now you see why its important to write it properly!

an easy way to get past this you can do things like caching.
same webserver, same website, but with a couple of wordpress caching plugins installed:
Requests per second: 897.08 [#/sec] (mean

once you start getting into these high numbers the performance of the webserver becomes significant, rather than the speed of the php script.
this is where litespeed becomes important to have vs apache.
(i use litespeed specifically because its implementation of suphp is at least 25x faster than apache)

but you can go further!

on top of this, with a proper caching setup, such as varnish (which I use almost everywhere)
Requests per second: 24185.17 [#/sec] (mean)
(I haven't tested it yet, but litespeed's cache feature should get similar speeds)

24185.17 PHP requests per second, on a ~$250/month server. nice huh!

now setup a small cluster of 3x servers servers behind a loadbalancer = 24185.17 x 3 ? i couldn't test easily (its fast enough that ab is now using 100% cpu to do the test)

but you can still go further!

now i put the site on a content delivery network (as a reverse proxy). but unfortunately its also too fast to test.....
I tested it from 20+ servers simultaneously, from different locations around the world (ie, assume hundreds of thousands)


ps: high speed website stuff is my favorite area ;)
 
Last edited:

cmanns

Well-Known Member
#5
the above test was for a file that is literally: <? print "hello"; ?>

if you are benchmarking a wordpress/drupal/complete php&mysql site then your performance will be very different.
this is because the bottleneck is likely your website's code itself, or its connection to the database. changing webserver will not do much for you.


I dont normally do this for a random forum. but I thought i might give you a real world complete example.
I used one of the websites i manage as test..

on the same webserver as mentioned above, a full wordpress site with no caching gets only:
Requests per second: 31.96 [#/sec] (mean)
this is because wordpress is getting stuff from the database, including lots of files, doing lots of things with the template/etc/etc.
the site also has many modules installed, of which any one of these could be badly written (they're written by any old joe, so assume badly written=yes!).
so performance steadily declines and declines until you are left with a website MUCH slower than it could be.
now you see why its important to write it properly!

an easy way to get past this you can do things like caching.
same webserver, same website, but with a couple of wordpress caching plugins installed:
Requests per second: 897.08 [#/sec] (mean

once you start getting into these high numbers the performance of the webserver becomes significant, rather than the speed of the php script.
this is where litespeed becomes important to have vs apache.
(i use litespeed specifically because its implementation of suphp is at least 25x faster than apache)

but you can go further!

<snip>
Performance is my area too. When I ran out of room on Apache I tried LiteSpeed and didn't look back for our own setups but clients still had me using Apache to saturate 1gbps lines, nginx, lighttpd, varnish, etc.

What you've described sounds like my varnish test on one of our cPanel/WHM boxes. I set litespeed to port 8080 and varnish with a config for all sites and no cache if cookie (logged in user) and the load was almost nothing.
 
Top