Forum Moderators: bakedjake

Message Too Old, No Replies

shared mem of httpd process (top command)

understanding the significance?

         

jamie

7:26 am on May 9, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



been looking at the ram each httpd process consumes on our server and it varies between 4 and 16 mb.

1) does each httpd process represent one surfer?

2) we have a busy phpbb forum. if the above is true, could it be that surfers in the forum need more ram (for the dynamic page creation) than surfers browsing static pages?

3) in which case, if i put the forum on another box we could server many more clients from our static box because less mem is neeed for each client.

or am i misunderstanding the significance of httpd and shared mem?

lots of questions :-) many thanks in advance for help!

jamie

1:24 pm on May 10, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



well,

been investigating myself and it looks as though my speculations above are correct.

however i have since set the KeepAliveTimeout down to 2 seconds in my httpd.conf and since then each httpd process is consuming on average 5 mb. i haven't seen it go above 9 yet today even at peak periods!

py9jmas

1:56 pm on May 10, 2004 (gmt 0)

10+ Year Member



however i have since set the KeepAliveTimeout down to 2 seconds in my httpd.conf and since then each httpd process is consuming on average 5 mb. i haven't seen it go above 9 yet today even at peak periods!

Won't this lead to clients having to open more TCP connections and hence poorer performance?

As long as your webserver isn't using swap memory, is there a need to reduce httpd's memory usage?

Isn't the shared memory exactly that, shared between the httpd processes and so should only be counted once?

[httpd.apache.org...]
may be of help.

Jon.

jamie

2:35 pm on May 10, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



hi jon,

thanks for the comments!

>> Isn't the shared memory exactly that, shared between the httpd processes and so should only be counted once?

what does this mean with regard to e.g.

10478 nobody 10 0 11652 11M 8672 S 7.8 1.1 0:10 httpd
13483 nobody 11 0 12340 11M 9024 S 4.9 1.1 0:05 httpd
11098 nobody 14 0 11640 11M 8604 S 2.9 1.1 0:08 httpd
10468 nobody 9 0 11920 11M 8680 S 1.4 1.1 0:10 httpd
10486 nobody 9 0 15280 14M 11828 S 0.4 1.4 0:09 httpd
10601 nobody 10 0 16120 15M 11752 S 0.4 1.5 0:11 httpd
13479 nobody 10 0 10648 10M 7808 S 0.4 1.0 0:05 httpd

why is having each httpd process using less memory not a good thing?

i feel i'm tapping around in the dark a lot of the time :-)

Bluepixel

5:39 pm on May 20, 2004 (gmt 0)

10+ Year Member



I don't think you can share the memory of the httpd processes, and your client's are only using 10-15 Mb :-). That's not a lot.

However, if you use mod_perl, or something similar, and you are loading data at the server start, it makes sense to share the data (you can only share read-only data). Have a look at Apache::Peek (I think it was called like that). It does a great job here. My httpd process is over 888 Mb big. If I wouldn't share the data, everyone would be using that much memory...