Web Hosting Forum | Lunarpages


*
Welcome, Guest. Please login or register.
Did you miss your activation email?



Login with username, password and session length
May 25, 2012, 09:35:35 AM

Pages: [1] 2   Go Down
  Print  
Author Topic: anyone tried Lighttpd?  (Read 2955 times)
testall
Intergalactic Cowboy
*****
Offline Offline

Posts: 70


« on: June 19, 2007, 12:24:25 PM »

I found out the apache httpd use lots of memory in VPS, every connection takes about 5-6M memory.

the Lighttpd seems use less memory and runs faster than apache httpd, and it could to be installed to work with httpd at the same VPS.

anyone have tried it with Plesk?
Logged
vivalite
Intergalactic Cowboy
*****
Offline Offline

Posts: 52


« Reply #1 on: June 19, 2007, 03:02:17 PM »

Don't think Plesk provide any Lighttpd module or support. BTW Apache is not as that bad as per say. Currently I am having 10 Apache processes running in background and the total memory cost is 11MB.
Logged
testall
Intergalactic Cowboy
*****
Offline Offline

Posts: 70


« Reply #2 on: June 19, 2007, 04:35:30 PM »

Don't think Plesk provide any Lighttpd module or support. BTW Apache is not as that bad as per say. Currently I am having 10 Apache processes running in background and the total memory cost is 11MB.

really? your httpd only cost 1M for each thread?  Confused

If i using this simple test php file, and run it several instances, then we can find out memory usuage from vpsinfo.php:

test.php
=========
<? sleep(60); ?>

# php test.php &
# php test.php &
# php test.php &
# php test.php &
# php test.php &

for me , it costs 5M per thread.
 Grr..!!
Logged
testall
Intergalactic Cowboy
*****
Offline Offline

Posts: 70


« Reply #3 on: June 19, 2007, 04:43:31 PM »

also i have noticed my VPS can only handle 40 concorrent connections, above that , mysql starts reporting memory error( 30 mysql connctions).

if there is no much load, the privvmpages is around 340M

Logged
vivalite
Intergalactic Cowboy
*****
Offline Offline

Posts: 52


« Reply #4 on: June 19, 2007, 10:35:42 PM »

The RES column you see from linux top command means the total memory that process use. For example you see 14M means your httpd took 14MB memory in total.
Logged
vivalite
Intergalactic Cowboy
*****
Offline Offline

Posts: 52


« Reply #5 on: June 19, 2007, 10:38:59 PM »

also i have noticed my VPS can only handle 40 concorrent connections, above that , mysql starts reporting memory error( 30 mysql connctions).

if there is no much load, the privvmpages is around 340M



you really have a busy site, I think dedicated server is more suit for you.
Logged
testall
Intergalactic Cowboy
*****
Offline Offline

Posts: 70


« Reply #6 on: June 20, 2007, 06:25:08 AM »

The RES column you see from linux top command means the total memory that process use. For example you see 14M means your httpd took 14MB memory in total.

from Top, i can see about 10 httpd Thread, RES columen from 12M to 21M, average is about 17M, does it mean each httpd thread use that much memory? that is way too much.  Grr..!!
Logged
testall
Intergalactic Cowboy
*****
Offline Offline

Posts: 70


« Reply #7 on: June 20, 2007, 07:31:26 PM »

This is my "top" screen cut:

30510 mysql     15   0  115m  26m 4500 S    0  0.3   1:19.20 mysqld
 3655 apache    15   0 45556  21m  14m S    1  0.3   0:18.57 httpd
32708 psaadm    15   0 44612  20m  12m S    0  0.3   0:00.39 httpsd
 5636 apache    15   0 45548  20m  14m S    1  0.3   0:18.86 httpd
 3330 apache    16   0 45588  19m  13m S    0  0.2   0:20.04 httpd
13776 apache    16   0 45524  19m  13m S    0  0.2   0:11.51 httpd
22108 apache    16   0 45996  19m  12m S    0  0.2   0:05.23 httpd
32627 psaadm    15   0 44812  18m  10m S    0  0.2   0:00.29 httpsd
23653 apache    15   0 45432  17m  11m S    0  0.2   0:03.93 httpd
18269 apache    16   0 44256  17m  12m S    0  0.2   0:06.84 httpd
26157 apache    15   0 44084  13m 8396 S    0  0.2   0:01.37 httpd
25998 apache    15   0 44036  12m 7840 S    0  0.2   0:01.56 httpd
28003 apache    16   0 44024  10m 5956 S    0  0.1   0:00.19 httpd
22368 root      15   0 42348 8884 5556 S    0  0.1   0:01.40 httpd
Logged
vivalite
Intergalactic Cowboy
*****
Offline Offline

Posts: 52


« Reply #8 on: June 20, 2007, 08:51:49 PM »

looks like your apache dose take some more memory than mine.

This one is mine:

 8005 apache    16   0 34528  12m 3944 S    0  0.4   0:00.11 httpd             
20020 apache    15   0 34512  12m 3940 S    0  0.4   0:00.04 httpd             
20021 apache    15   0 34504  12m 3924 S    0  0.4   0:00.05 httpd             
20022 apache    16   0 35124  12m 3960 S    0  0.4   0:00.09 httpd             
20023 apache    15   0 34524  13m 5372 S    0  0.4   0:00.05 httpd             
20024 apache    15   0 34476  12m 3748 S    0  0.4   0:00.03 httpd             
20025 apache    15   0 34476  12m 3712 S    0  0.4   0:00.01 httpd             
20026 apache    15   0 34656  13m 5192 S    0  0.4   0:00.02 httpd             
20027 apache    15   0 34528  13m 5396 S    0  0.4   0:00.13 httpd     



Maybe unload  unnecessary Apache/PHP module will help some?
Here is my phpinfo: http://www.itamsdemo.com/phpinfo.php
any difference with yours?

Logged
perestrelka
Administrator
Master Jedi
*****
Offline Offline

Posts: 1395



« Reply #9 on: June 21, 2007, 04:32:45 AM »

Hi Testall,

You may also consider unloading Apache modules you do not use.

Logged

Kind Regards,
Vlad Artamonov
testall
Intergalactic Cowboy
*****
Offline Offline

Posts: 70


« Reply #10 on: June 21, 2007, 08:51:03 AM »

my loaded Apache models is much less then  vivalite's apache models.

the big difference i noticed is vivalite is using PHP 5.2, I am using 5.1.6( yum from centosplus ).

according php.net, php 5.2 has big improvement to the Memory Manager.
I don't know if this is the reason.

here is another post i searched from google:


On another server (Ubuntu) httpd processes take 15-20 Mb for Moodle, I have mostly the same modules except SSL and DAV. The PHP modules don't seem to matter that much, the test server has "everything" loaded on the PHP side, the "culprit" (SuSe Enterprise 9) server has less PHP modules, but it eats 35-40 Mb per process (physical memory, RES in "top").

I never had the time nor the expertise to find out what this was, but just reporting: we upgraded to Apache 2.2.3, PHP 5.2.0 and MySQL 5.0.27 (From 2.0, 4.1 and 4.1 respectively) and on the same server the top reports that httpd processes take <10M (RES) each, and almost half of that reported as shared (SHR) surprise

Must be a memory-model change somewhere deep in the system, but things seem to be running smoothly now so happy happy joy joy for us smile
Logged
perestrelka
Administrator
Master Jedi
*****
Offline Offline

Posts: 1395



« Reply #11 on: June 21, 2007, 09:56:37 PM »

my loaded Apache models is much less then  vivalite's apache models.

the big difference i noticed is vivalite is using PHP 5.2, I am using 5.1.6( yum from centosplus ).

according php.net, php 5.2 has big improvement to the Memory Manager.
I don't know if this is the reason.

here is another post i searched from google:


On another server (Ubuntu) httpd processes take 15-20 Mb for Moodle, I have mostly the same modules except SSL and DAV. The PHP modules don't seem to matter that much, the test server has "everything" loaded on the PHP side, the "culprit" (SuSe Enterprise 9) server has less PHP modules, but it eats 35-40 Mb per process (physical memory, RES in "top").

I never had the time nor the expertise to find out what this was, but just reporting: we upgraded to Apache 2.2.3, PHP 5.2.0 and MySQL 5.0.27 (From 2.0, 4.1 and 4.1 respectively) and on the same server the top reports that httpd processes take <10M (RES) each, and almost half of that reported as shared (SHR) surprise

Must be a memory-model change somewhere deep in the system, but things seem to be running smoothly now so happy happy joy joy for us smile


The only way to check this is to try to upgrade Wink
Logged

Kind Regards,
Vlad Artamonov
testall
Intergalactic Cowboy
*****
Offline Offline

Posts: 70


« Reply #12 on: June 21, 2007, 10:20:56 PM »

today i tried to reduce "MaxRequestsPerChild" = 15 in httpd.conf, which forces httpd thread to expire quickly, so the memory can be set to free quickly.

so far so good, the average RES is around 11M.
Logged
perestrelka
Administrator
Master Jedi
*****
Offline Offline

Posts: 1395



« Reply #13 on: June 23, 2007, 12:08:27 AM »


That's really awesome. Please let us know how it is going through the next week.
Logged

Kind Regards,
Vlad Artamonov
testall
Intergalactic Cowboy
*****
Offline Offline

Posts: 70


« Reply #14 on: June 23, 2007, 09:03:36 AM »


That's really awesome. Please let us know how it is going through the next week.

so far so good, the memory usuage is down about 80M. cpu usuage keeps health too.
Logged
Pages: [1] 2   Go Up
  Print  
 
Jump to: