Project

General

Profile

Lighttpd runing very slow

Added by panji about 16 years ago

I'm really2 interest in lightty, so I move my server on lightty, and I like it,.. but everything goes slow right now,.. I don't know why,.. I've try to recompile and configure everything,.. but it's still running very slow,.. I will give You the complete detail of my server configuration,.. I need some help here,..

I run this benchmark :
http://hyperend.com/php-benchmark.php
(using script from http://www.free-webhosts.com/php-benchmark-script.php)
Under lighttpd it's about 90ms-400ms (it was about 45ms under apache)

PHP Info :
http://hyperend.com/phpinfo.php

My Server Info :
- I am running on VPS (OPENVZ) Q9300 @500Mhz CPU + 512MB mem,
- Under Centos 5.2 + LXadmin (Host in a box)
- Detail http://hyperend.com/serverinfo.txt

lighttpd.conf and other importance file :
http://hyperend.com/etc.zip

My Lighttpd RPM :
http://hyperend.com/mylightty/lighttpd-1.4.20-6.i386.rpm
http://hyperend.com/mylightty/lighttpd-fastcgi-1.4.20-6.i386.rpm
http://hyperend.com/mylightty/lighttpd-mod_mysql_vhost-1.4.20-6.i386.rpm
http://hyperend.com/mylightty/lighttpd-mod_geoip-1.4.20-6.i386.rpm
http://hyperend.com/mylightty/spawn-fcgi-1.4.20-6.i386.rpm
http://hyperend.com/mylightty/lighttpd-1.4.20-6.src.rpm

Plugins:

enabled:
mod_access
mod_accesslog
mod_alias
mod_auth
mod_cgi
mod_cml
mod_compress
mod_dirlisting
mod_evhost
mod_expire
mod_extforward
mod_fastcgi
mod_flv_streaming
mod_indexfiles
mod_magnet
mod_mysql_vhost
mod_proxy
mod_redirect
mod_rewrite
mod_rrdtool
mod_scgi
mod_secdownload
mod_setenv
mod_simple_vhost
mod_ssi
mod_staticfile
mod_status
mod_trigger_b4_dl
mod_userdir
mod_usertrack
mod_webdav
disabled:

Features:

enabled:
auth-crypt
auth-ldap
compress-bzip2
compress-deflate
compress-gzip
network-openssl
regex-conditionals
stat-cache-fam
storage-gdbm
storage-memcache
webdav-locks
webdav-properties

disabled:
large-files
network-ipv6

Please help me,.. what is wrong with my configuration,.. why am I running slow under lighttpd?


Replies (10)

RE: Lighttpd runing very slow - Added by nitrox about 16 years ago

so is lighty slow or php? i´d say its php and one of the problems might be using 2 opcode-cachers like eA and xcache, choose only one of them...beside that 5.2.1 is really old, get newer one...

RE: Lighttpd runing very slow - Added by icy about 16 years ago

The benchmark doesn't tell anything about the webserver. It's pure php number calculation and string manipulation.
It's more like a cpu benchmark.

RE: Lighttpd runing very slow - Added by panji about 16 years ago

Thanks for such a quick answer, really appreciate that...

@nitrox
I'm just trying to use eA, because it's running slow,... neither one nor two opcode-cachers there's still slow,.. I've uninstall eA now since xCache is officially opcode-cachers for lightty...
but there's no change as before, still runing very slow.. I've try to install memcached,.. but it's still slow..
I's a good idea for updating my php,.. I'll try to update my php,... It's the latest rpm available,.. so I need to compile it my self,..

@icy
Is there any benchmark that represent the webserver performance that I can try? where can I download it?
as log as I try http://hyperend.com/php-benchmark.php it's runing much faster when I use apache,.. what is wrong with my lightty?

Here is some sample website on my server : www.hyperend.com (DRUPAL) & www.lingkarfarmasi.com (SMF)

RE: Lighttpd runing very slow - Added by icy about 16 years ago

Bytecode caches like xcache or eaccelerator will not make that "benchmark" run any faster. They elliminate the parsing of php files on every request, that's all.
And memcached doesn't magically make your app faster. It's a database that you have to use. Read about what it actually does!

To measure webserver performance, one can use "ab", siege, http_load or other tools.

You probably only need to increase the number of php children as I think you are only using one.

RE: Lighttpd runing very slow - Added by panji about 16 years ago

I've try to modify :

"min-procs" => 0,
"max-procs" => 1,
"bin-environment" => (
"MUID" => "1015",
"GID" => "1015",
"TARGET" => "/usr/bin/php-cgi",
"NON_RESIDENT" => "0",
"PHP_FCGI_CHILDREN" => "8",
"PHP_FCGI_MAX_REQUESTS" => "10000" ),
"max-load-per-proc" => 1000,
"idle-timeout" => 3
))
Then running siege :
  1. siege -b -r 10 -c 4 http://www.lingkarfarmasi.com/
    • SIEGE 2.67
    • Preparing 4 concurrent users for battle.
      The server is now under siege...
      HTTP/1.1 200 2.18 secs: 10362 bytes > /
      HTTP/1.1 200 3.85 secs: 10359 bytes > /
      HTTP/1.1 200 19.50 secs: 10362 bytes > /
      HTTP/1.1 200 3.65 secs: 10361 bytes > /
      HTTP/1.1 200 4.45 secs: 10361 bytes > /
      HTTP/1.1 200 5.37 secs: 10362 bytes > /
      HTTP/1.1 200 32.03 secs: 10359 bytes > /
      HTTP/1.1 200 6.25 secs: 10362 bytes > /
      HTTP/1.1 200 5.70 secs: 10360 bytes > /
      HTTP/1.1 200 7.41 secs: 10361 bytes > /
      HTTP/1.1 200 5.53 secs: 10362 bytes > /
      HTTP/1.1 200 5.52 secs: 10360 bytes > /
      HTTP/1.1 200 11.20 secs: 10358 bytes > /
      HTTP/1.1 200 7.06 secs: 10361 bytes > /
      ....
      done.
      Transactions: 40 hits
      Availability: 100.00 %
      Elapsed time: 69.32 secs
      Data transferred: 0.40 MB
      Response time: 5.63 secs
      Transaction rate: 0.58 trans/sec
      Throughput: 0.01 MB/sec
      Concurrency: 3.25
      Successful transactions: 40
      Failed transactions: 0
      Longest transaction: 32.03
      Shortest transaction: 1.62

it's still running really slow (0.58 trans/sec)

  1. ps axu | grep php
    root 7784 0.0 0.0 1736 484 pts/0 S+ 05:32 0:00 grep php

RE: Lighttpd runing very slow - Added by nitrox about 16 years ago

1. the topic is misleading and wrong, its obviously php and not lighty
2. we already told you to upgrade your php
3. we advised you to use only one opcode cacher
4. what do you expect from a 500mhz box?
5. you might want to join #lighttpd or #php on irc.freenode.net

RE: Lighttpd runing very slow - Added by panji about 16 years ago

I try to switch into apache and it's 7.38 trans/sec

So I guess lighttpd need more cpu speed, I'll upgrade my box then, maybe I'll use Xen.. let's see what happen..

thanks for the help..

RE: Lighttpd runing very slow - Added by panji about 16 years ago

Just upgrade my VPS..

Now I'm runing @ 1Ghz CPU box now,..

Testing on it :
ransactions: 40 hits
Availability: 100.00 %
Elapsed time: 26.11 secs
Data transferred: 0.33 MB
Response time: 2.11 secs
Transaction rate: 1.53 trans/sec
Throughput: 0.01 MB/sec
Concurrency: 3.24
Successful transactions: 40
Failed transactions: 0
Longest transaction: 10.40
Shortest transaction: 0.60

It's 1.53 trans/sec now...
2X CPU speed => 3X Faster..
so, lighty would be much2 better on high CPU Speed server...

@nitrox
1. I'm sure this topic is about lighty,.. I
2. sure I'm working on it..
3. Yup I'll use Xcache only now..
4. So I try to upgrade my VPS box
5. Sure..

RE: Lighttpd runing very slow - Added by nitrox about 16 years ago

No, its not, you are testing on php, mysql or whatever... Test on plain static files and i´d say you are talking about lighty.

RE: Lighttpd runing very slow - Added by panji about 16 years ago

I move my VPS BOX to XEN
and my siege bench now:

Transactions: 40 hits
Availability: 100.00 %
Elapsed time: 12.17 secs
Data transferred: 0.37 MB
Response time: 1.09 secs
Transaction rate: 3.29 trans/sec
Throughput: 0.03 MB/sec
Concurrency: 3.58
Successful transactions: 40
Failed transactions: 0
Longest transaction: 3.34
Shortest transaction: 0.43

It goes 3.29 trans/sec now... and the point here is, lighty need higher CPU speed to run faster (use XEN if there's anyone plan for lighty on his VPS)

@nitrox for static file I'm sure lighty is the clear winner and runing really2 fast

    (1-10/10)