LxCenter HyperVM & Kloxo Support

Forum



Members   Search      Help    Register    Login    Home
Home » Development Forums » Kloxo Development » [PRE] Nginx/Lighttpd proxy and template-based web config
[PRE] Nginx/Lighttpd proxy and template-based web config [message #95160] Sat, 18 February 2012 01:37 Go to next message
mustafaramadhan is currently offline mustafaramadhan  Indonesia
Messages: 5731
Registered: December 2010
Location: Yogyakarta
Super Grandmaster
Forum Moderator

Want try?. Go to http://forum.lxcenter.org/index.php?t=msg&th=18106

According to 'Enhancement #865 - Webserver config template', 'Feature #862 - Nginx-proxy for Kloxo' and 'Feature #898 - Lighttpd-proxy for Kloxo', this features near release.

Need participant for testing.

How to install:

# update system
yum update

# update kloxo - repeat until version 6.1.10 when running 'sh /script/version'
sh /script/upcp

# download the code
mkdir /tmp/kloxo-test
cd /tmp/kloxo-test
rm -rf index*
### wget 'http://forum.lxcenter.org/index.php?t=getfile&id=1587'
### wget 'http://forum.lxcenter.org/index.php?t=getfile&id=1588'
### wget 'http://forum.lxcenter.org/index.php?t=getfile&id=1591'
### wget 'http://forum.lxcenter.org/index.php?t=getfile&id=1592'
### wget 'http://forum.lxcenter.org/index.php?t=getfile&id=1593'
wget 'http://forum.lxcenter.org/index.php?t=getfile&id=1596'
mv index* kloxo.zip
unzip kloxo.zip

# backup original kloxo
yes | cp -rf /usr/local/lxlabs/kloxo /usr/local/lxlabs/kloxo.bck

# overrite the code
yes | cp -rf ./kloxo /usr/local/lxlabs

# fix the code
sh /script/cleanup

# create custom repo (based-on centalt) because nginx and rpaf taken from here
echo '[centalt]' > /etc/yum.repos.d/kloxo-centalt.repo
echo 'name=centalt - $basearch' >> /etc/yum.repos.d/kloxo-centalt.repo
echo 'baseurl=http://centos.alt.ru/repository/centos/5/$basearch/' >> /etc/yum.repos.d/kloxo-centalt.repo
echo 'enabled=1' >> /etc/yum.repos.d/kloxo-centalt.repo
echo 'gpgcheck=0' >> /etc/yum.repos.d/kloxo-centalt.repo
echo 'includepkgs=nginx mod_rpaf' >> /etc/yum.repos.d/kloxo-centalt.repo

sh /script/fix-chownchmod

reboot


Unfinish job:

1. Swith program not automaticly fix config. Need run 'sh /script/fixweb' when switch (say it) apache to nginx-proxy- fixed

2. select fastcgi for lighttpd/nginx and suphp for apache not work. Need more times for fixed this issues - fixed

3. Add domain will be appear options for fastcgi. This is wrong. Need more times for fixed this issues

4. fixed wildcards subdomains on lighttpd

Advices:

1. don't use on production server
2. select 'mod_php_ruid2' for apache when testing nginx/lighttpd-proxy
3. select 'optimize' on 'webserver config' when select apache and nginx/lighttpd-proxy. Different setting for 'pure' apache and proxy.

----------------
Update 1:

1. Add php-fpm for Nginx and Lighttpd - NEW!
2. change from cache-based to local-based for static files
3. change how to djbdns read ip - NEW!

Update 2:

1. switch program automaticly running fix config -- fix old issue
2. php-fpm on lighttpd and nginx based on pool (more secure) - NEW!
3. add php-fpm on apache but still with 1 pool only (fastcgi finalty for setting with more than 1 pool) -- waiting for Apache 2.4.x and than change mod_fastcgi to mod_proxy_fcgi
4. including trick for install php 'old' version (PHP 5.2.17; not including php-fpm patch) when user(s) select suphp - NEW!

Update 3:

1. fixed wrong code inside serverweb__lib.php
2. Testing with upcoming lighttpd 1.4.30-1 and look like running well.

Update 4:

1. fix permalink on lighttpd (old issue) also use new template

Update 5:

1. fixed log_cleanup so call fix scripts from inside kloxo automaticly use '--nolog' -- mininize grow up cleanup log file
2. Only use 2 dirs (defaults and domains) instead 5 dirs (defaults, domains, redirects, webmails and wildcards) - NEW!
3. fixed awstarts and webalizer config for every domains
4. prepare to httpd 2.4.x
5. fixed php 5.2.17-13 issue for suphp - for fastcgi on lighttpd automaticly fixed when using php-fpm

---------------------------
Next step - http://forum.lxcenter.org/index.php?t=msg&goto=95665
---------------------------


http://download.lxcenter.org/kdev.png
..:: MRatWork ::..
Server/Web-integrator - perfect not always more useful

--- Need KVM/OpenVZ VPS? - click here (Kloxo-MR READY!) ---

For bug/feature/security - Member rank status

http://download.lxcenter.org/hdev.png

[Updated on: Tue, 06 March 2012 23:33]

Report message to a moderator

Re: [PRE] Nginx/Lighttpd proxy and template-based web config [message #95164 is a reply to message #95160] Sat, 18 February 2012 02:07 Go to previous messageGo to next message
mustafaramadhan is currently offline mustafaramadhan  Indonesia
Messages: 5731
Registered: December 2010
Location: Yogyakarta
Super Grandmaster
Forum Moderator

See http://vps30ovz.hostspectra.com/

http://download.lxcenter.org/kdev.png
..:: MRatWork ::..
Server/Web-integrator - perfect not always more useful

--- Need KVM/OpenVZ VPS? - click here (Kloxo-MR READY!) ---

For bug/feature/security - Member rank status

http://download.lxcenter.org/hdev.png

[Updated on: Sat, 18 February 2012 02:25]

Report message to a moderator

Re: [PRE] Nginx/Lighttpd proxy and template-based web config [message #95166 is a reply to message #95164] Sat, 18 February 2012 05:18 Go to previous messageGo to next message
prandah is currently offline prandah  Indonesia
Messages: 491
Registered: March 2011
Location: indonesia
Master
Indonesian Forum Moderator

if you get error on wget direct via attachment
here is the mirror :

http://www.prandah.com/wp-content/uploads/2012/02/kloxo.zip


ready
Re: [PRE] Nginx/Lighttpd proxy and template-based web config [message #95171 is a reply to message #95166] Sat, 18 February 2012 08:11 Go to previous messageGo to next message
mustafaramadhan is currently offline mustafaramadhan  Indonesia
Messages: 5731
Registered: December 2010
Location: Yogyakarta
Super Grandmaster
Forum Moderator

Because nginx-proxy have cache system and enable by default, need disable it for testing step:

1. Change 'proxy_cache cache;' to '# proxy_cache cache;' inside '/home/nginx/conf/globals/proxy.conf', and or

2. delete content of '/home/nginx/conf/cache and '/home/nginx/conf/tmp'

Also change for '/usr/local/lxlabs/kloxo/file/nginx/globals/proxy.conf'.

If you want customize you can make custom.proxy.conf and place inside '/usr/local/lxlabs/kloxo/file/nginx/globals/'.


http://download.lxcenter.org/kdev.png
..:: MRatWork ::..
Server/Web-integrator - perfect not always more useful

--- Need KVM/OpenVZ VPS? - click here (Kloxo-MR READY!) ---

For bug/feature/security - Member rank status

http://download.lxcenter.org/hdev.png

[Updated on: Sat, 18 February 2012 08:42]

Report message to a moderator

Re: [PRE] Nginx/Lighttpd proxy and template-based web config [message #95186 is a reply to message #95171] Sat, 18 February 2012 14:25 Go to previous messageGo to next message
Spacedust is currently offline Spacedust  Poland
Messages: 1233
Registered: October 2007
Location: Poland
Senior Master
Please post some benchmarks and I will compare to my Varnish setup. We will see who is faster Wink
Re: [PRE] Nginx/Lighttpd proxy and template-based web config [message #95190 is a reply to message #95186] Sat, 18 February 2012 17:43 Go to previous messageGo to next message
prandah is currently offline prandah  Indonesia
Messages: 491
Registered: March 2011
Location: indonesia
Master
Indonesian Forum Moderator

this my benchmark
memory 1GB swap 2GB vps xen
benchmark test with unixbench

========================================================================
[root@ks365910 ~]# ab -n 10 -c 2 http://www.somesite.com/
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking www.somesite.com (be patient).....done


Server Software:        nginx
Server Hostname:        www.somesite.com
Server Port:            80

Document Path:          /
Document Length:        123872 bytes

Concurrency Level:      2
Time taken for tests:   6.862 seconds
Complete requests:      10
Failed requests:        0
Write errors:           0
Total transferred:      1244958 bytes
HTML transferred:       1238720 bytes
Requests per second:    1.46 [#/sec] (mean)
Time per request:       1372.338 [ms] (mean)
Time per request:       686.169 [ms] (mean, across all concurrent requests)
Transfer rate:          177.18 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:      136  138   0.8    138     139
Processing:  1138 1211  92.9   1161    1387
Waiting:      445  514  94.3    464     694
Total:       1276 1348  92.7   1300    1524

Percentage of the requests served within a certain time (ms)
  50%   1300
  66%   1311
  75%   1444
  80%   1469
  90%   1524
  95%   1524
  98%   1524
  99%   1524
 100%   1524 (longest request)
[root@ks365910 ~]#


[root@ks365910 ~]# ab -n 1000 -c 5 http://www.somesite.com/
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking www.somesite.com (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Completed 1000 requests
Finished 1000 requests


Server Software:        nginx
Server Hostname:        www.somesite.com
Server Port:            80

Document Path:          /
Document Length:        123872 bytes

Concurrency Level:      5
Time taken for tests:   265.978 seconds
Complete requests:      1000
Failed requests:        246
   (Connect: 0, Receive: 0, Length: 246, Exceptions: 0)
Write errors:           0
Total transferred:      124566092 bytes
HTML transferred:       123957484 bytes
Requests per second:    3.76 [#/sec] (mean)
Time per request:       1329.890 [ms] (mean)
Time per request:       265.978 [ms] (mean, across all concurrent requests)
Transfer rate:          457.36 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:      136  138   2.3    138     169
Processing:  1003 1188 249.2   1160    6221
Waiting:      441  493 246.7    463    5524
Total:       1140 1326 249.3   1298    6360

Percentage of the requests served within a certain time (ms)
  50%   1298
  66%   1308
  75%   1316
  80%   1323
  90%   1348
  95%   1413
  98%   1558
  99%   1806
 100%   6360 (longest request)
[root@ks365910 ~]#


server for vBulletin 4.1.10 + vBSEO
with 5000 - 8000 Unique User Online


ready

[Updated on: Sun, 19 February 2012 02:50]

Report message to a moderator

Re: [PRE] Nginx/Lighttpd proxy and template-based web config [message #95197 is a reply to message #95190] Sat, 18 February 2012 22:09 Go to previous messageGo to next message
shazar is currently offline shazar  United States
Messages: 1856
Registered: May 2011
Grandmaster
LxCenter Core Team Member
LxCenter Representative
prandah - Is this benchmark run locally? The reason I ask is because a latency of 0ms and a real world latency of 40 - 200 ms for a real world user is a huge difference. You will find the limiting factor to be the processor locally where you won't use near the processor in a real world test. Also I am not certain with this test, but it may just load the first page you tell it and not all the children of that page.

As an example I ran a test against your blog and was quickly getting full page loads surpassing 5 and 7 seconds approaching just 50 concurrent connections. Just curious what your test against your blog gives to get a better idea here.


https://www.mercuryvps.com
HyperVM Xen VPS hosting
Re: [PRE] Nginx/Lighttpd proxy and template-based web config [message #95199 is a reply to message #95197] Sun, 19 February 2012 02:40 Go to previous messageGo to next message
prandah is currently offline prandah  Indonesia
Messages: 491
Registered: March 2011
Location: indonesia
Master
Indonesian Forum Moderator

helo shazar i'm sorry wrong Smile
i have edit my result


ready
Re: [PRE] Nginx/Lighttpd proxy and template-based web config [message #95202 is a reply to message #95199] Sun, 19 February 2012 04:50 Go to previous messageGo to next message
mustafaramadhan is currently offline mustafaramadhan  Indonesia
Messages: 5731
Registered: December 2010
Location: Yogyakarta
Super Grandmaster
Forum Moderator

This is my test:

-------------------------------

Apache 10 concurrents

-------------------------------

[root@mustafa1 ~]# ab -n 1000 -c 10 http://vps30ovz.hostspectra.com:30080/wp/
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking vps30ovz.hostspectra.com (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Completed 1000 requests
Finished 1000 requests


Server Software:        Apache/2.2.22
Server Hostname:        vps30ovz.hostspectra.com
Server Port:            30080

Document Path:          /wp/
Document Length:        294 bytes

Concurrency Level:      10
Time taken for tests:   8.539 seconds
Complete requests:      1000
Failed requests:        0
Write errors:           0
Non-2xx responses:      1000
Total transferred:      474000 bytes
HTML transferred:       294000 bytes
Requests per second:    117.11 [#/sec] (mean)
Time per request:       85.388 [ms] (mean)
Time per request:       8.539 [ms] (mean, across all concurrent requests)
Transfer rate:          54.21 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:       41   41   0.3     41      44
Processing:    41   44  14.6     42     244
Waiting:       41   44  14.6     42     244
Total:         82   85  14.6     83     285

Percentage of the requests served within a certain time (ms)
  50%     83
  66%     83
  75%     83
  80%     84
  90%     85
  95%     86
  98%     87
  99%    208
 100%    285 (longest request)
[root@mustafa1 ~]#

-------------------------------

Apache 100 concurrents

-------------------------------


[root@mustafa1 ~]# ab -n 1000 -c 100 http://vps30ovz.hostspectra.com:30080/wp/
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking vps30ovz.hostspectra.com (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Completed 1000 requests
Finished 1000 requests


Server Software:        Apache/2.2.22
Server Hostname:        vps30ovz.hostspectra.com
Server Port:            30080

Document Path:          /wp/
Document Length:        294 bytes

Concurrency Level:      100
Time taken for tests:   4.232 seconds
Complete requests:      1000
Failed requests:        0
Write errors:           0
Non-2xx responses:      1000
Total transferred:      474000 bytes
HTML transferred:       294000 bytes
Requests per second:    236.30 [#/sec] (mean)
Time per request:       423.183 [ms] (mean)
Time per request:       4.232 [ms] (mean, across all concurrent requests)
Transfer rate:          109.38 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:       41   41   0.2     41      44
Processing:    42  362  58.3    377     419
Waiting:       42  362  58.3    377     419
Total:         83  404  58.3    418     460

Percentage of the requests served within a certain time (ms)
  50%    418
  66%    419
  75%    419
  80%    420
  90%    421
  95%    421
  98%    422
  99%    456
 100%    460 (longest request)
[root@mustafa1 ~]#


-------------------------------

Nginx-proxy 10 concurrents

-------------------------------

[root@mustafa1 ~]# ab -n 1000 -c 10 http://vps30ovz.hostspectra.com:80/wp/
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking vps30ovz.hostspectra.com (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Completed 1000 requests
Finished 1000 requests


Server Software:        nginx
Server Hostname:        vps30ovz.hostspectra.com
Server Port:            80

Document Path:          /wp/
Document Length:        291 bytes

Concurrency Level:      10
Time taken for tests:   8.588 seconds
Complete requests:      1000
Failed requests:        0
Write errors:           0
Non-2xx responses:      1000
Total transferred:      454000 bytes
HTML transferred:       291000 bytes
Requests per second:    116.44 [#/sec] (mean)
Time per request:       85.879 [ms] (mean)
Time per request:       8.588 [ms] (mean, across all concurrent requests)
Transfer rate:          51.63 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:       41   41   0.2     41      42
Processing:    41   45  21.2     41     237
Waiting:       41   45  21.2     41     237
Total:         82   86  21.2     83     278

Percentage of the requests served within a certain time (ms)
  50%     83
  66%     83
  75%     83
  80%     83
  90%     83
  95%     85
  98%    162
  99%    277
 100%    278 (longest request)
[root@mustafa1 ~]#

-------------------------------

Nginx-proxy 100 concurrents

-------------------------------

[root@mustafa1 ~]# ab -n 1000 -c 100 http://vps30ovz.hostspectra.com:80/wp/
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking vps30ovz.hostspectra.com (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Completed 1000 requests
Finished 1000 requests


Server Software:        nginx
Server Hostname:        vps30ovz.hostspectra.com
Server Port:            80

Document Path:          /wp/
Document Length:        291 bytes

Concurrency Level:      100
Time taken for tests:   0.879 seconds
Complete requests:      1000
Failed requests:        0
Write errors:           0
Non-2xx responses:      1000
Total transferred:      454000 bytes
HTML transferred:       291000 bytes
Requests per second:    1137.08 [#/sec] (mean)
Time per request:       87.944 [ms] (mean)
Time per request:       0.879 [ms] (mean, across all concurrent requests)
Transfer rate:          504.14 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:       41   41   0.5     41      46
Processing:    41   45   8.8     42      82
Waiting:       41   44   8.3     42      81
Total:         82   86   8.8     83     123

Percentage of the requests served within a certain time (ms)
  50%     83
  66%     84
  75%     85
  80%     85
  90%     86
  95%    118
  98%    119
  99%    123
 100%    123 (longest request)
[root@mustafa1 ~]#


Notes:

1. setting inside /etc/httpd/conf.d/~lxcenter.conf
...
<IfModule prefork.c>
	StartServers 2
	MinSpareServers 5
	MaxSpareServers 10
	ServerLimit 10
	MaxClients 10
	MaxRequestsPerChild 4000
	MaxMemFree 5
	SendBufferSize 65536
	ReceiveBufferSize 65536
</IfModule>
...


2. In nginx/lighttpd-proxy, access to port 80 mean access to nginx/lightpd and access to port 30080 mean access to apache directly

3. Summary:

----------------------------------------------------------------------
                                           Concurrencies
                        ----------------------------------------------
                                Apache                   Nginx-proxy
                        ----------------------------------------------
                            10         100              10         100
----------------------------------------------------------------------

1. Requests/second      117.11      236.30          116.44     1137.08

2. Transfer rate         54.21      109.38           51.63      504.14

----------------------------------------------------------------------



http://download.lxcenter.org/kdev.png
..:: MRatWork ::..
Server/Web-integrator - perfect not always more useful

--- Need KVM/OpenVZ VPS? - click here (Kloxo-MR READY!) ---

For bug/feature/security - Member rank status

http://download.lxcenter.org/hdev.png

[Updated on: Sun, 19 February 2012 04:52]

Report message to a moderator

Re: [PRE] Nginx/Lighttpd proxy and template-based web config [message #95204 is a reply to message #95202] Sun, 19 February 2012 04:59 Go to previous messageGo to next message
mustafaramadhan is currently offline mustafaramadhan  Indonesia
Messages: 5731
Registered: December 2010
Location: Yogyakarta
Super Grandmaster
Forum Moderator

Conclusion:

1. with limited concurrents for 10 (on apache config) and test to the same value, no different result between apache and nginx-proxy (117.11 reqs/sec and 116.44 reqs/sec)

2. with test for 100 concurrents, result for apache just 2x (236.30 reqs/sec) and for nginx near 10x (1137.08 reqs/sec)


http://download.lxcenter.org/kdev.png
..:: MRatWork ::..
Server/Web-integrator - perfect not always more useful

--- Need KVM/OpenVZ VPS? - click here (Kloxo-MR READY!) ---

For bug/feature/security - Member rank status

http://download.lxcenter.org/hdev.png

[Updated on: Sun, 19 February 2012 05:00]

Report message to a moderator

Re: [PRE] Nginx/Lighttpd proxy and template-based web config [message #95224 is a reply to message #95204] Sun, 19 February 2012 09:40 Go to previous messageGo to next message
lupetalo is currently offline lupetalo  
Messages: 253
Registered: April 2011
Senior Member
Actualy i cant make it run on test server with non static data... No errors apeared and i folowed procedure... i get nginx error 502 or "The page you are looking for is temporarily unavailable.
Please try again later."
Re: [PRE] Nginx/Lighttpd proxy and template-based web config [message #95226 is a reply to message #95224] Sun, 19 February 2012 09:46 Go to previous messageGo to next message
lupetalo is currently offline lupetalo  
Messages: 253
Registered: April 2011
Senior Member
lupetalo wrote on Sun, 19 February 2012 09:40
Actualy i cant make it run on test server with non static data... No errors apeared and i folowed procedure... i get nginx error 502 or "The page you are looking for is temporarily unavailable.
Please try again later."

Worked after reboot... Will post sone results...
Re: [PRE] Nginx/Lighttpd proxy and template-based web config [message #95236 is a reply to message #95226] Sun, 19 February 2012 11:56 Go to previous messageGo to next message
shazar is currently offline shazar  United States
Messages: 1856
Registered: May 2011
Grandmaster
LxCenter Core Team Member
LxCenter Representative
Prandah - ab only loads the first page as far as I can tell. So in this case any images, css, js and other objects aren't taken into account. I would just hate to see people get the wrong idea from skewed results.

mustafa - The same for your results.

You have to use a test that is remote and that will load the entire page and is run remotely not even in the same LAN preferably.


https://www.mercuryvps.com
HyperVM Xen VPS hosting
Re: [PRE] Nginx/Lighttpd proxy and template-based web config [message #95241 is a reply to message #95236] Sun, 19 February 2012 12:27 Go to previous messageGo to next message
lupetalo is currently offline lupetalo  
Messages: 253
Registered: April 2011
Senior Member
Maybe loadimpact.com...
Re: [PRE] Nginx/Lighttpd proxy and template-based web config [message #95248 is a reply to message #95241] Sun, 19 February 2012 15:18 Go to previous messageGo to next message
mustafaramadhan is currently offline mustafaramadhan  Indonesia
Messages: 5731
Registered: December 2010
Location: Yogyakarta
Super Grandmaster
Forum Moderator

Results with loadimpact.com

1. Nginx-proxy - http:// loadimpact.com/load-test/mr1.hostspectra.com:80-77bd66463e28 1cf486a341a865e88589

2. Apache - http:// loadimpact.com/load-test/mr1.hostspectra.com:30080-703c1458c 234743be7ac2f0cb62e6af7


http://download.lxcenter.org/kdev.png
..:: MRatWork ::..
Server/Web-integrator - perfect not always more useful

--- Need KVM/OpenVZ VPS? - click here (Kloxo-MR READY!) ---

For bug/feature/security - Member rank status

http://download.lxcenter.org/hdev.png

[Updated on: Sun, 19 February 2012 15:19]

Report message to a moderator

Re: [PRE] Nginx/Lighttpd proxy and template-based web config [message #95249 is a reply to message #95248] Sun, 19 February 2012 15:35 Go to previous messageGo to next message
shazar is currently offline shazar  United States
Messages: 1856
Registered: May 2011
Grandmaster
LxCenter Core Team Member
LxCenter Representative
That's more like it. Now as there is already a lighttpd driver in Kloxo, what is the comparison with lighttpd? The apache that Kloxo uses just isn't a fair comparison. It isn't a good set up to begin with.

https://www.mercuryvps.com
HyperVM Xen VPS hosting
Re: [PRE] Nginx/Lighttpd proxy and template-based web config [message #95253 is a reply to message #95249] Mon, 20 February 2012 01:20 Go to previous messageGo to next message
prandah is currently offline prandah  Indonesia
Messages: 491
Registered: March 2011
Location: indonesia
Master
Indonesian Forum Moderator

nginx vs apache hmmmm
i think so many people will choose apache for default webserver ( simple and support .htaccess, and many site have tutorial about it )
but, if them get high user, high unique visitor, have black hat for sites ( in one server ). i think them will think twice to use it

---This Is My Experience---
apache when get many user, using blackhat seo ( like AGC : Automated generated Content ), it allways get high load, so need more resource ( i.e memory, cpu core, hardware ). so lets talk with budget Very Happy. "How Much Money just For Server"

Lighty ( Lighttpd ), It's fast but sometimes Lighty eat more more memory ussage.

for two reasons in above, i will choose nginx Very Happy.
in a fact, nginx can handle my forum Very Happy with 1GB memory and 2Gb and just less then 700MB ussage( 3000 - 8000 unique visitor per day, and 1xxx thread/post per day ).when i'm using apache, i allways get high load Very Happy
this is the answer http://forum.lxcenter.org/index.php?t=msg&th=17931&s tart=0& 7 of 10 member need nginx Very Happy

i hope my english not make you confuse Smile


ready
Re: [PRE] Nginx/Lighttpd proxy and template-based web config [message #95254 is a reply to message #95253] Mon, 20 February 2012 02:02 Go to previous messageGo to next message
mustafaramadhan is currently offline mustafaramadhan  Indonesia
Messages: 5731
Registered: December 2010
Location: Yogyakarta
Super Grandmaster
Forum Moderator

Why must be choose?. Why not nginx+apache (aka nginx-proxy)?.

http://download.lxcenter.org/kdev.png
..:: MRatWork ::..
Server/Web-integrator - perfect not always more useful

--- Need KVM/OpenVZ VPS? - click here (Kloxo-MR READY!) ---

For bug/feature/security - Member rank status

http://download.lxcenter.org/hdev.png
Re: [PRE] Nginx/Lighttpd proxy and template-based web config [message #95264 is a reply to message #95254] Mon, 20 February 2012 06:27 Go to previous messageGo to next message
prandah is currently offline prandah  Indonesia
Messages: 491
Registered: March 2011
Location: indonesia
Master
Indonesian Forum Moderator

why not for a something "new" Very Happy

ready
Re: [PRE] Nginx/Lighttpd proxy and template-based web config [message #95275 is a reply to message #95264] Mon, 20 February 2012 11:34 Go to previous messageGo to next message
mustafaramadhan is currently offline mustafaramadhan  Indonesia
Messages: 5731
Registered: December 2010
Location: Yogyakarta
Super Grandmaster
Forum Moderator

Update 1 - add php-fpm for nginx and lighttpd

http://download.lxcenter.org/kdev.png
..:: MRatWork ::..
Server/Web-integrator - perfect not always more useful

--- Need KVM/OpenVZ VPS? - click here (Kloxo-MR READY!) ---

For bug/feature/security - Member rank status

http://download.lxcenter.org/hdev.png
Re: [PRE] Nginx/Lighttpd proxy and template-based web config [message #95306 is a reply to message #95275] Tue, 21 February 2012 09:04 Go to previous messageGo to next message
shazar is currently offline shazar  United States
Messages: 1856
Registered: May 2011
Grandmaster
LxCenter Core Team Member
LxCenter Representative
I was working with prandah and have a few suggestions for this config. Thought this may just be for the general apache, I don't know for certain. I think you should not need to run any scripts when switching between the drivers and the switch should do more to remove itself so that when switching back, you are guaranteed a fresh version of the config.

https://www.mercuryvps.com
HyperVM Xen VPS hosting
Re: [PRE] Nginx/Lighttpd proxy and template-based web config [message #95307 is a reply to message #95306] Tue, 21 February 2012 09:15 Go to previous messageGo to next message
mustafaramadhan is currently offline mustafaramadhan  Indonesia
Messages: 5731
Registered: December 2010
Location: Yogyakarta
Super Grandmaster
Forum Moderator

shazar wrote on Tue, 21 February 2012 21:04
I was working with prandah and have a few suggestions for this config. Thought this may just be for the general apache, I don't know for certain. I think you should not need to run any scripts when switching between the drivers and the switch should do more to remove itself so that when switching back, you are guaranteed a fresh version of the config.

Yes, still have a problem when switch program need run 'sh /script/fixweb'.

It's possible to including 'fixweb' process on 'switch program' but I don't want complain from users that have many domains (say it more than 1000 domains).

Maybe add option 'fix configuration' on 'switch program'.


http://download.lxcenter.org/kdev.png
..:: MRatWork ::..
Server/Web-integrator - perfect not always more useful

--- Need KVM/OpenVZ VPS? - click here (Kloxo-MR READY!) ---

For bug/feature/security - Member rank status

http://download.lxcenter.org/hdev.png
Re: [PRE] Nginx/Lighttpd proxy and template-based web config [message #95308 is a reply to message #95307] Tue, 21 February 2012 09:17 Go to previous messageGo to next message
mustafaramadhan is currently offline mustafaramadhan  Indonesia
Messages: 5731
Registered: December 2010
Location: Yogyakarta
Super Grandmaster
Forum Moderator

My consentration now to make user-based php-fpm and add 'php-fpm_worker' and 'php-fpm_worker' on apache.

http://download.lxcenter.org/kdev.png
..:: MRatWork ::..
Server/Web-integrator - perfect not always more useful

--- Need KVM/OpenVZ VPS? - click here (Kloxo-MR READY!) ---

For bug/feature/security - Member rank status

http://download.lxcenter.org/hdev.png
Re: [PRE] Nginx/Lighttpd proxy and template-based web config [message #95309 is a reply to message #95308] Tue, 21 February 2012 10:33 Go to previous messageGo to next message
shazar is currently offline shazar  United States
Messages: 1856
Registered: May 2011
Grandmaster
LxCenter Core Team Member
LxCenter Representative
I would recommend against running the scripts in the switch. I think you can do the switch better than that.

https://www.mercuryvps.com
HyperVM Xen VPS hosting
Re: [PRE] Nginx/Lighttpd proxy and template-based web config [message #95332 is a reply to message #95309] Tue, 21 February 2012 20:00 Go to previous messageGo to next message
mustafaramadhan is currently offline mustafaramadhan  Indonesia
Messages: 5731
Registered: December 2010
Location: Yogyakarta
Super Grandmaster
Forum Moderator

shazar wrote on Tue, 21 February 2012 22:33
I would recommend against running the scripts in the switch. I think you can do the switch better than that.

What's your recommended.


http://download.lxcenter.org/kdev.png
..:: MRatWork ::..
Server/Web-integrator - perfect not always more useful

--- Need KVM/OpenVZ VPS? - click here (Kloxo-MR READY!) ---

For bug/feature/security - Member rank status

http://download.lxcenter.org/hdev.png
Re: [PRE] Nginx/Lighttpd proxy and template-based web config [message #95334 is a reply to message #95332] Tue, 21 February 2012 20:52 Go to previous messageGo to next message
shazar is currently offline shazar  United States
Messages: 1856
Registered: May 2011
Grandmaster
LxCenter Core Team Member
LxCenter Representative
I don't know your config well enough but I would recommend first to remove anything that you deal with during the installme phase:

//Remove any previous httpd
system("rm -rf /etc/httpd");
system("rm -rf /home/httpd/conf");
system("rm -rf /home/apache/conf");
system("rm -f /etc/init.d/httpd");
system("rm -f /etc/sysconfig/httpd");

Any other directories that you add conf files to as well as they are included as *.conf, meaning anything left there from something else may interfere.

also probably better to use lx functions for removing files and folders...


https://www.mercuryvps.com
HyperVM Xen VPS hosting
Re: [PRE] Nginx/Lighttpd proxy and template-based web config [message #95335 is a reply to message #95334] Tue, 21 February 2012 21:24 Go to previous messageGo to next message
mustafaramadhan is currently offline mustafaramadhan  Indonesia
Messages: 5731
Registered: December 2010
Location: Yogyakarta
Super Grandmaster
Forum Moderator

So, this remove for what?. Not enough just running 'rpm -e --nodeps httpd'?

Discussion for old model conf is unrelevant now. Change topic to 'template-based' config. Please compare web__apachelib.php/web__lighttpdlib.php from old model with 'template based' model.


http://download.lxcenter.org/kdev.png
..:: MRatWork ::..
Server/Web-integrator - perfect not always more useful

--- Need KVM/OpenVZ VPS? - click here (Kloxo-MR READY!) ---

For bug/feature/security - Member rank status

http://download.lxcenter.org/hdev.png
Re: [PRE] Nginx/Lighttpd proxy and template-based web config [message #95354 is a reply to message #95335] Wed, 22 February 2012 08:42 Go to previous messageGo to next message
shazar is currently offline shazar  United States
Messages: 1856
Registered: May 2011
Grandmaster
LxCenter Core Team Member
LxCenter Representative
Well however you do it, you are leaving artifacts behind. That is my suggestion to remove all the old config and not leave stuff that may break it when you switch back to it. Test it out and you will see. Removing an rpm doesn't even remove all of /etc/httpd. It definitely doesn't remove the config files from /home/apache/conf.

https://www.mercuryvps.com
HyperVM Xen VPS hosting
Re: [PRE] Nginx/Lighttpd proxy and template-based web config [message #95396 is a reply to message #95354] Thu, 23 February 2012 05:25 Go to previous messageGo to next message
mustafaramadhan is currently offline mustafaramadhan  Indonesia
Messages: 5731
Registered: December 2010
Location: Yogyakarta
Super Grandmaster
Forum Moderator

Please comparing 'yum remove http' and 'rpm -e httpd'. I think Kloxo use 'rpm -e' instead 'yum remove' with many reasons.

http://download.lxcenter.org/kdev.png
..:: MRatWork ::..
Server/Web-integrator - perfect not always more useful

--- Need KVM/OpenVZ VPS? - click here (Kloxo-MR READY!) ---

For bug/feature/security - Member rank status

http://download.lxcenter.org/hdev.png
Re: [PRE] Nginx/Lighttpd proxy and template-based web config [message #95407 is a reply to message #95396] Thu, 23 February 2012 13:17 Go to previous messageGo to next message
shazar is currently offline shazar  United States
Messages: 1856
Registered: May 2011
Grandmaster
LxCenter Core Team Member
LxCenter Representative
mustafa you completely have missed my point. Please don't get stuck on this. I am not suggesting how you should uninstall a package. I am asking that you remove all previous files so no conflicts will exist when switching drivers.

https://www.mercuryvps.com
HyperVM Xen VPS hosting
Re: [PRE] Nginx/Lighttpd proxy and template-based web config [message #95408 is a reply to message #95407] Thu, 23 February 2012 13:18 Go to previous messageGo to next message
shazar is currently offline shazar  United States
Messages: 1856
Registered: May 2011
Grandmaster
LxCenter Core Team Member
LxCenter Representative
All you have to do is switch from apache to lighttpd and then you can see all those config files left behind...

https://www.mercuryvps.com
HyperVM Xen VPS hosting
Re: [PRE] Nginx/Lighttpd proxy and template-based web config [message #95424 is a reply to message #95408] Fri, 24 February 2012 00:02 Go to previous messageGo to next message
mustafaramadhan is currently offline mustafaramadhan  Indonesia
Messages: 5731
Registered: December 2010
Location: Yogyakarta
Super Grandmaster
Forum Moderator

Yes still exist because (as original code by author) no need to delete for all configs.

http://download.lxcenter.org/kdev.png
..:: MRatWork ::..
Server/Web-integrator - perfect not always more useful

--- Need KVM/OpenVZ VPS? - click here (Kloxo-MR READY!) ---

For bug/feature/security - Member rank status

http://download.lxcenter.org/hdev.png
Re: [PRE] Nginx/Lighttpd proxy and template-based web config [message #95432 is a reply to message #95424] Fri, 24 February 2012 08:01 Go to previous messageGo to next message
shazar is currently offline shazar  United States
Messages: 1856
Registered: May 2011
Grandmaster
LxCenter Core Team Member
LxCenter Representative
But there is a need to remove now that you have all these different configurations working against each other. This is a suggestion to your new configuration not the existing working one.

https://www.mercuryvps.com
HyperVM Xen VPS hosting
Re: [PRE] Nginx/Lighttpd proxy and template-based web config [message #95433 is a reply to message #95432] Fri, 24 February 2012 08:43 Go to previous messageGo to next message
mustafaramadhan is currently offline mustafaramadhan  Indonesia
Messages: 5731
Registered: December 2010
Location: Yogyakarta
Super Grandmaster
Forum Moderator

shazar wrote on Fri, 24 February 2012 20:01
But there is a need to remove now that you have all these different configurations working against each other. This is a suggestion to your new configuration not the existing working one.


Switch program automaticly fix config now -- (fixed old bug).


http://download.lxcenter.org/kdev.png
..:: MRatWork ::..
Server/Web-integrator - perfect not always more useful

--- Need KVM/OpenVZ VPS? - click here (Kloxo-MR READY!) ---

For bug/feature/security - Member rank status

http://download.lxcenter.org/hdev.png
Re: [PRE] Nginx/Lighttpd proxy and template-based web config [message #95435 is a reply to message #95433] Fri, 24 February 2012 10:02 Go to previous messageGo to next message
shazar is currently offline shazar  United States
Messages: 1856
Registered: May 2011
Grandmaster
LxCenter Core Team Member
LxCenter Representative
mustafa I still think you are missing the point. Let me present it like this.

1. A user installs Kloxo for the first time. Apache is the default and is installed so he has a fresh install and configuration of it. The server goes out of memory because the apache drivers set bad defaults. The user add custom.conf to the conf.d directory but makes it works and just leaves it there.
2. The user decides to switch to lighttpd and it works fine.
3. There is an update to the apache driver that sets better defaults. It lowers the MaxClients from 256 to a more suitable number when installed and doesn't change if the user sets it to something else.
4. The user switches back to apache hoping this solves the problem, but his conf file is still in conf.d and he forgot about it.

Do you see what I am suggesting now? You may FIX the conf files that are made by Kloxo, but you leave conf files behind still.



https://www.mercuryvps.com
HyperVM Xen VPS hosting
Re: [PRE] Nginx/Lighttpd proxy and template-based web config [message #95449 is a reply to message #95275] Fri, 24 February 2012 16:36 Go to previous messageGo to next message
AviationAtom is currently offline AviationAtom  United States
Messages: 4
Registered: February 2012
Member
mustafaramadhan wrote on Mon, 20 February 2012 11:34
Update 1 - add php-fpm for nginx and lighttpd


This is to be applied after the original steps you posted? I am just wanting to get PHP-fpm working with Lighttpd. What are the minimum steps to accomplish that using your updates?
Re: [PRE] Nginx/Lighttpd proxy and template-based web config [message #95453 is a reply to message #95449] Fri, 24 February 2012 20:56 Go to previous messageGo to next message
mustafaramadhan is currently offline mustafaramadhan  Indonesia
Messages: 5731
Registered: December 2010
Location: Yogyakarta
Super Grandmaster
Forum Moderator

@AviationAtom,

Yes, switch to lighttpd and then select fastcgi will automaticly use php-fpm. Nginx automaticly use php-fpm. For apache, must be select php-type as php-fpm_event or php-fpm_worker.

@shazar,

As your suggest, I change maxclients and serverlimit as the same as maxspareservers/maxsparethreads when running apache-optimize. In nginx/lighttpd-proxy, values only half.

I found memory leaks (buffers and cached always growing) found on xen and dedi.


http://download.lxcenter.org/kdev.png
..:: MRatWork ::..
Server/Web-integrator - perfect not always more useful

--- Need KVM/OpenVZ VPS? - click here (Kloxo-MR READY!) ---

For bug/feature/security - Member rank status

http://download.lxcenter.org/hdev.png

[Updated on: Fri, 24 February 2012 20:56]

Report message to a moderator

Re: [PRE] Nginx/Lighttpd proxy and template-based web config [message #95457 is a reply to message #95453] Fri, 24 February 2012 23:18 Go to previous messageGo to next message
shazar is currently offline shazar  United States
Messages: 1856
Registered: May 2011
Grandmaster
LxCenter Core Team Member
LxCenter Representative
Again you never understand what I am saying or completely miss my point. This is just a scenario. I am sorry, but I don't know how to get you to better understand.

And no there is no memory leak, you must ignore buffers and cache and stop trying to clear them. Buffers and cache are good for your overall performance. If the system needs to allocate more memory, the cache will be flushed on its own. I have said this quite a few times here. Again this is something that you just are not understanding.


https://www.mercuryvps.com
HyperVM Xen VPS hosting
Re: [PRE] Nginx/Lighttpd proxy and template-based web config [message #95458 is a reply to message #95457] Fri, 24 February 2012 23:22 Go to previous messageGo to next message
mustafaramadhan is currently offline mustafaramadhan  Indonesia
Messages: 5731
Registered: December 2010
Location: Yogyakarta
Super Grandmaster
Forum Moderator

shazar wrote on Sat, 25 February 2012 11:18
Again you never understand what I am saying or completely miss my point. This is just a scenario. I am sorry, but I don't know how to get you to better understand.

And no there is no memory leak, you must ignore buffers and cache and stop trying to clear them. Buffers and cache are good for your overall performance. If the system needs to allocate more memory, the cache will be flushed on its own. I have said this quite a few times here. Again this is something that you just are not understanding.


Do you test on openvz also?. Buffers and cached issue only found on xen and dedicated; not on openvz.


http://download.lxcenter.org/kdev.png
..:: MRatWork ::..
Server/Web-integrator - perfect not always more useful

--- Need KVM/OpenVZ VPS? - click here (Kloxo-MR READY!) ---

For bug/feature/security - Member rank status

http://download.lxcenter.org/hdev.png
Re: [PRE] Nginx/Lighttpd proxy and template-based web config [message #95459 is a reply to message #95458] Fri, 24 February 2012 23:56 Go to previous messageGo to previous message
shazar is currently offline shazar  United States
Messages: 1856
Registered: May 2011
Grandmaster
LxCenter Core Team Member
LxCenter Representative
Not an issue. a Xen domU (guest) sees its dedicated memory the same as s dedicated installation of Linux. When you do file intensive operations writes are buffered in memory so when you read the file you read from the memory instead of having to do disk operations. When you do a copy of a file, it is much slower on a system with low memory as on a system with more memory the copy is complete after it is buffered into memory. In the background it is still writing to disk, If you try to read the new file you still read it fine as it is reading from that buffered/cached memory. It works out great. There is no problem at all with the buffering and caching.

https://www.mercuryvps.com
HyperVM Xen VPS hosting
Previous Topic:register mail account in kloxo db
Next Topic:What is going on with Kloxo?
Goto Forum:
  


Current Time: Thu Jun 20 00:18:42 EDT 2013

Total time taken to generate the page: 0.04079 seconds
.:: Contact :: Home :: Privacy ::.

Click here to lend your support to: LxCenter and make a donation at www.pledgie.com !

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software