LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 07-29-2013, 05:01 AM   #1
devUnix
Member
 
Registered: Oct 2010
Posts: 606

Rep: Reputation: 59
Lightbulb httpd and default instances of apache


Hi,

Sideline (you can skip this): It seems after working for over 1 year in a Telecom company and providing support for applications, I have almost forgotten Linux Servers Administration related stuffs.


Does the following output mean there are 8 instances of apache available on the system?

Code:
[root@Dev ~]# ps aufx | grep -i [h]ttpd
root     30147  0.0  0.6 351616 25920 ?        Ss   Jan17   0:11 /usr/sbin/httpd
apache    1598  0.0  0.6 364292 24440 ?        S    Jul28   0:00  \_ /usr/sbin/httpd
apache    1599  0.0  0.4 351616 19436 ?        S    Jul28   0:00  \_ /usr/sbin/httpd
apache    1600  0.0  0.6 364292 24588 ?        S    Jul28   0:00  \_ /usr/sbin/httpd
apache    1626  0.0  0.6 368408 27200 ?        S    Jul28   0:00  \_ /usr/sbin/httpd
apache    1627  0.0  0.6 364292 24732 ?        S    Jul28   0:00  \_ /usr/sbin/httpd
apache    1628  0.0  0.6 364292 24656 ?        S    Jul28   0:00  \_ /usr/sbin/httpd
apache    1629  0.0  0.6 366360 25068 ?        S    Jul28   0:00  \_ /usr/sbin/httpd
apache    1630  0.0  0.6 368408 26200 ?        S    Jul28   0:00  \_ /usr/sbin/httpd
For httpd, the count is: 9.

What I understand is when we run httpd it forks 8 instances of httpd and calls them apache. These 8 instances are there to load-balance requests from clients/browsers. Is this correct?

How can we have more instances of apache instead of the default 8 above? Can I have 16 or more when I start httpd?

Please help me understand the above stuff.

Thanks,
Dev.
 
Old 07-29-2013, 05:42 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
What I understand is when we run httpd it forks 8 instances of httpd and calls them apache.
It starts the 8 child processes as the user apache


Quote:
These 8 instances are there to load-balance requests from clients/browsers. Is this correct?
No, each one is used to serve a request


Quote:
How can we have more instances of apache instead of the default 8 above? Can I have 16 or more when I start httpd?
Sure, use in httpd.conf
Code:
StartServers 16
See this for more options

Regards
 
1 members found this post helpful.
Old 07-29-2013, 11:14 PM   #3
SAbhi
Member
 
Registered: Aug 2009
Location: Bangaluru, India
Distribution: CentOS 6.5, SuSE SLED/ SLES 10.2 SP2 /11.2, Fedora 11/16
Posts: 665

Rep: Reputation: Disabled
You can verify what Bathory said by :

Code:
ps -p [pid] -o ppid=      # this will output the Parent process id of the running child pid.
That will make the concept clear.

Last edited by SAbhi; 07-29-2013 at 11:25 PM.
 
1 members found this post helpful.
Old 07-30-2013, 12:07 AM   #4
devUnix
Member
 
Registered: Oct 2010
Posts: 606

Original Poster
Rep: Reputation: 59
Thanks to Sabhi and Bathory!
 
  


Reply

Tags
apache, httpd



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
need Default Apache 2.2.3 httpd.conf in Redhat 5.3 please ackman Linux - Enterprise 7 09-11-2009 04:47 AM
Failed to start apache :Starting httpd: Syntax error on line 1027 of /etc/httpd/conf/ payjoe Linux - Newbie 3 09-21-2007 07:24 AM
9 httpd instances running!?? jlinden Linux - Newbie 2 09-17-2003 11:32 AM
httpd chokes on ScriptAlias line in Apache httpd.conf lhoff Linux - Software 1 07-14-2003 10:32 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 11:06 PM.

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