LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 06-30-2006, 02:38 AM   #1
LinuxLover
Member
 
Registered: Feb 2004
Distribution: Centos 7 x86_64 , Rocky Linux 8 (aarch64)
Posts: 196

Rep: Reputation: 32
how much memory used by apache


Hello Every one

I have a query and confused on it
Let me explain it.

My goal is that I want to calculate memory utilization of apache.

Below is the output of Free command before starting apache service.

total used free shared buffers cached
Mem: 248 42 205 0 7 19
-/+ buffers/cache: 15 233
Swap: 298 0 298



And after starting the httpd service output of Free command

total used free shared buffers cached
Mem: 248 50 190 0 7 22
-/+ buffers/cache: 20 227
Swap: 298 0 298



It shows about 5MB increase in memroy (As show by buffers/cache: 20 227 line )


Now oput ut of top command

Mem: 254532k total, 60392k used, 194140k free, 8232k buffers
Swap: 305192k total, 0k used, 305192k free, 30532k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
2778 apache 25 0 19444 9176 5900 S 0.0 3.6 0:00.00 httpd
2779 apache 25 0 19444 9176 5900 S 0.0 3.6 0:00.00 httpd
2780 apache 25 0 19444 9176 5900 S 0.0 3.6 0:00.00 httpd
2781 apache 25 0 19444 9176 5900 S 0.0 3.6 0:00.00 httpd
2782 apache 25 0 19444 9176 5900 S 0.0 3.6 0:00.00 httpd
2783 apache 25 0 19444 9176 5900 S 0.0 3.6 0:00.00 httpd
2784 apache 25 0 19444 9176 5900 S 0.0 3.6 0:00.00 httpd
2785 apache 25 0 19444 9176 5900 S 0.0 3.6 0:00.00 httpd




This output show that their are 8 process of apache running and eache process using 9176 kilo byte memory. (as shown by RES field)


According to this memory usuage bye apche becomes about 73mb .

I am so much confuse on this .

Can any explain what is the actual memory usuage by apache
 
Old 07-01-2006, 01:17 PM   #2
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
The RES memory is the code + data segments of the executable. These are probably mapped to the same physical pages for each Apache pages (certainly the code is, since it doesn't change between the Apache processes, so it only needs to exist once in physical memory). I suspect the executable itself is only taking up a few mwgabytes, but you can check with "size `which httpd`". It doesn't look like anything is apged out, so the rest of the discrepency is probably in buffers/cache. I would imagine Apache uses a lot of buffer and cache space since it is network and disk I/O intensive.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
apache / memory problems cbe Linux - Software 1 01-05-2006 08:41 PM
memory usage (apache related?) stonecrest Linux - General 3 08-10-2005 05:52 AM
apache sucking memory dry untoldone Linux - Software 1 04-11-2005 02:04 AM
supermounted usb-memory and apache zezami Linux - General 1 10-17-2004 05:02 AM
Help,Apache use too much memory adoyee Linux - Networking 0 02-11-2004 04:32 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 01:36 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration