apache processes as listed by ps -A

Hello,

my linode 128 works great, but i want to get more free RAM for other applications. so i am trying to tune my slack 10 - kernel 2.4.27.

I looked at the processes and i am astonished of how many httpd processes there are.

ex:

444 ? 00:00:00 httpd

447 ? 00:00:00 httpd

452 ? 00:00:00 httpd

…………………………..

9007 ? 00:00:00 httpd

9008 ? 00:00:00 httpd

9009 ? 00:00:00 httpd

9010 ? 00:00:00 httpd

9011 ? 00:00:00 httpd

How can this be possible? on my linode 128 i still have around 50MB free RAM all the time. Can anybody explain this to me? Apache is version 2.0.48 with threadpool.c module.

here is top output:

Cpu(s): 0.3% user, 3.2% system, 0.0% nice, 96.5% idle

Mem: 123644k total, 104572k used, 19072k free, 16636k buffers

Swap: 263160k total, 24692k used, 238468k free, 25808k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND

1143 nobody 9 0 28728 22m 6424 S 0.0 18.5 0:00.00 httpd

1144 nobody 8 0 28728 22m 6424 S 0.0 18.5 0:00.00 httpd

1146 nobody 9 0 28728 22m 6424 S 0.0 18.5 0:03.21 httpd

1147 nobody 9 0 28728 22m 6424 S 0.0 18.5 0:00.02 httpd

1148 nobody 9 0 28728 22m 6424 S 0.0 18.5 0:00.00 httpd

1149 nobody 9 0 28728 22m 6424 S 0.0 18.5 0:00.00 httpd

1150 nobody 9 0 28728 22m 6424 S 0.0 18.5 0:00.05 httpd

1151 nobody 9 0 28728 22m 6424 S 0.0 18.5 0:00.00 httpd

1152 nobody 9 0 28728 22m 6424 S 0.0 18.5 0:00.00 httpd

1153 nobody 9 0 28728 22m 6424 S 0.0 18.5 0:00.00 httpd

Thank you in advance

jlin

4 Replies

Don't worry jlin … those other apache processes you see are apache's child processes. Top reports 18.5% memory usage for one of them .. imagine what that would mean if they were separate processes … you would get 100+% used only by apache, cool :)

To sum up, it's only one process. Memory usage is the same.

I'm also on a linode 128 and after some hours after reboot (after I played around with mc, users have accessed my web server serving php pages -- so php cached a lot --, etc etc) i have 90Mb of mem used.

I don;t think apache is the one that give the system trouble .. maybe the output of "ps aux" woul dbe of more help.

Cheers

Just out of curiosity - why are you using threadpool rather than worker?

@pclissold:

Just out of curiosity - why are you using threadpool rather than worker?

I don't really know the difference between these two, but i use threadpool beacause I think it needs less resources than any other.

jlinos

@mastabog:

Top reports 18.5% memory usage for one of them .. imagine what that would mean if they were separate processes … you would get 100+% used only by apache, cool :)

That's not entirely true. Linux uses copy-on-write, so different instances of the same program can share memory.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct