Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

So everytime I load a new page, I notice a new HTTPD process opens, every time I click a page, and each process says it's using anywhere from 2-4.5% of memory. Does that mean every single process is running at that time using 2-4% of RAM? It's a brand new server and I'm the only one on the server at the moment.

Or does it mean all the other processes are dying, and only the new one is active. Because 4% of my 2048MB of RAM is already 82MB for just one process!?!?

Let me know, because I am trying to determine what I need to beef my server up in order to handle high loads of traffic. I'm expect to get 20,000 uniques per day on launch.

I am currently running a Dual Quad Xeon server, with only 2GB of ram, I will upgrade to 8GB or more shortly. Let me know what you suggest!

thank you

[root@D18634 log]# top | grep 'httpd'
11315 apache    15   0  362m  82m  24m R 12.3  4.1   0:03.00 httpd                     
11310 apache    16   0  322m  41m  21m S  5.7  2.1   0:02.98 httpd                     
11315 apache    15   0  362m  83m  25m S 24.3  4.1   0:03.73 httpd                     
11319 apache    16   0  324m  42m  20m R  1.0  2.1   0:01.85 httpd                     
11319 apache    16   0  362m  82m  23m R 78.5  4.1   0:04.21 httpd                     
11321 apache    16   0  323m  44m  23m S 35.3  2.2   0:04.13 httpd                     
11319 apache    15   0  361m  82m  23m S  8.3  4.1   0:04.46 httpd                     
11321 apache    15   0  323m  44m  23m S 35.9  2.2   0:05.21 httpd                     
11313 apache    15   0  324m  41m  19m S 48.6  2.1   0:03.23 httpd                     
11322 apache    16   0  354m  72m  20m R 11.0  3.6   0:05.11 httpd                     
11322 apache    16   0  354m  72m  20m S 23.9  3.6   0:05.83 httpd                     
11314 apache    16   0  355m  75m  22m R 18.3  3.7   0:04.64 httpd
share|improve this question

1 Answer 1

up vote 1 down vote accepted

Yout are correct - 82MB of physical ram is being used by one apache process. The second memory column in your top(1) output is the resident size. That's the amount of physical memory that each process is actually consuming. Looks like each apache process on your system is consuming about 41-82MB of RAM. Look at your apache configuration (/etc/httpd/httpd.conf likely) and check the MaxClients directive - that's the maximum number of workers that apache will try to spawn. Multiply that by 82MB for a worst case scenario of how much physical memory apache will try to use. If that is a larger number than your installed system memory, you will exhaust the memory on your system under heavy apache load.

Here's a decent description of some apache tuning tips that might be helpful.

share|improve this answer
    
Does that Apache process of 82MB include loading pages/html/images/php and MySQL? It's all on the same server. Or is MySQL RAM/CPU usage 100% separate from the apache RAM usage? –  Andrew Fashion Jan 11 '11 at 7:54
    
It does include php, because that operates as a module inside apache. It does not include mysql, that runs as a separate process. –  Phil Hollenback Jan 11 '11 at 7:55

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.