LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 03-01-2006, 05:22 AM   #1
eQualizer
Member
 
Registered: Oct 2003
Location: Finland
Distribution: Debian
Posts: 43

Rep: Reputation: 15
Question Apache2, cpu usage and ports


Top gives me this:
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
30553 www-data 25 0 13612 5224 3448 R 13.5 2.0 77:45.89 apache2
30552 www-data 25 0 13612 5224 3448 R 13.2 2.0 77:46.59 apache2
30555 www-data 25 0 13612 5224 3448 R 13.2 2.0 77:45.98 apache2
30554 www-data 25 0 13612 5308 3492 R 12.9 2.1 77:47.38 apache2
30556 www-data 25 0 13612 5224 3448 R 11.2 2.0 77:45.87 apache2
13732 www-data 25 0 13612 5312 3492 R 9.9 2.1 14:34.08 apache2

That's a bit high cpu usage, isn't it? And why there's so many processes of Apache2?
Is it normal? How do I decrease the cpu usage?

And, how do I make it listen to more than one port? I know I need to edit ports.cfg, but there's only "Listen xxxx", where's xxxx is the port it listens to.

Or should I switch back to Apache 1.3something? :f

Oh yeah, and system specs are:
128Mt ram
520Mhz Pentium3
Some NVIDIA Riva TNT2 gpu
Ubuntu 5.10
 
Old 03-01-2006, 05:49 AM   #2
stormrider_may
Member
 
Registered: Sep 2005
Distribution: Debian
Posts: 304

Rep: Reputation: 30
Usually this happens when someone is trying to access an heavy php script or when you have some heavy traffic sites.

There are so many process of apache 2 because it works like this know. Those are child process, they are responsible for respoding to the requests on your server.

Yes, itīs normal.

You can decrease cpu usage reducing the number of process apache creates (watch out, if you have lots of clients accessing your server, it can become inacessible for some of them)

Serious, apache2 is a low resource web server. I use it on a pentium 166 and it only gets 100% of cpu usage when i run a php script.

To listen to other ports, put something like this:

Code:
Listen 80
Listen 81
Listen 8080
Restart the server, ok?

I donīt think you should switch. Probaly someday apache 1.3 wonīt be supported anymore and if someone finds a bug it wonīt be corrected.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
getting realtime info on memory usage-cpu and harddrive usage steering Linux - Newbie 5 03-03-2005 08:43 PM
Can't do Apache2 virtual host different ports SK_pt Linux - Software 3 01-30-2005 07:04 PM
how to determine cpu usage, memory usage, I/O usage by a particular user logged on li rags2k Programming 4 08-21-2004 04:45 AM
99% CPU usage /home/kyle Linux - General 6 03-13-2004 09:25 AM
Controlling CPU usage & memory usage Saravana babu Linux - Software 0 02-18-2004 05:55 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:07 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