LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 07-16-2006, 02:21 AM   #1
kayman
LQ Newbie
 
Registered: Jul 2006
Posts: 8

Rep: Reputation: 0
why my web server is running so slowly?


my webserver is 3000+ with maxtor sata2 200GB
using debian+apache2+php4+mysql
it's ok when there are not too many connections.
however, when there are around 60 connections,
it takes around 10 sec to load a 10KB webpage.
at that time, the average upload is 30 KB/s only
but normally, my max upload can up to 1MB/s
the cpu usage is only around 1x%
and when I ssh to my server, it's connected without waiting a sec.

so why my web server is running so slowly when there are around 60 connections? is it the problem of my apache's setting?
 
Old 07-16-2006, 03:56 AM   #2
TigerOC
Senior Member
 
Registered: Jan 2003
Location: Devon, UK
Distribution: Debian Etc/kernel 2.6.18-4K7
Posts: 2,380

Rep: Reputation: 49
This my be related to your upload connection rather than anything to do with the server itself. Depends largely on what your connection is, which you have not specified. If you have no load balancing on the server then the server will hand back on a first come first serve basis and the service will degrade. i.e. this is a bandwidth problem. Without concrete details I am guessing.
 
Old 07-16-2006, 10:04 AM   #3
kayman
LQ Newbie
 
Registered: Jul 2006
Posts: 8

Original Poster
Rep: Reputation: 0
The connections refer to the number of visitors browsing the webpages from the web server.

my upload bandwidth can up to 1 MB/s on average.
But it's only 1x KB/s when the web server is running so slowly
(i.e. there are more than 60 visitors on the webpages)
Btw, how can I set the load balancing on the server?

Thanks.

Quote:
Originally Posted by TigerOC
This my be related to your upload connection rather than anything to do with the server itself. Depends largely on what your connection is, which you have not specified. If you have no load balancing on the server then the server will hand back on a first come first serve basis and the service will degrade. i.e. this is a bandwidth problem. Without concrete details I am guessing.
 
Old 07-16-2006, 03:05 PM   #4
TigerOC
Senior Member
 
Registered: Jan 2003
Location: Devon, UK
Distribution: Debian Etc/kernel 2.6.18-4K7
Posts: 2,380

Rep: Reputation: 49
This tutorial will give you the reasons why this is happening and how to resolve the situation. I would also look at mod-gzip for apache which compresses responses and speeds up communication significantly.
 
Old 07-16-2006, 05:40 PM   #5
closet geek
Member
 
Registered: Apr 2003
Location: England
Posts: 146

Rep: Reputation: 15
How have you tweaked your httpd.conf? Have you considered lighttpd?

cg
 
Old 07-17-2006, 12:05 AM   #6
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
Are you having a bottleneck at disk access? How is the memory situation on the webserver? (available and swap used)
 
Old 07-18-2006, 10:43 AM   #7
kayman
LQ Newbie
 
Registered: Jul 2006
Posts: 8

Original Poster
Rep: Reputation: 0
Thanks everyone!

Finally, I solved the problem by changing the setting of prefork module
<IfModule prefork.c>
StartServers 5
MinSpareServers 25
MaxSpareServers 75
MaxClients 20 <-- changed into 256
MaxRequestsPerChild 0
</IfModule>
 
Old 07-18-2006, 10:59 AM   #8
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
I'm glad that you got it to work, and thanks for sharing your solution to help others!
 
  


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
Can't find running web server carlg Linux - General 0 10-13-2004 06:58 PM
Running a web server with Apache? Anth3m Linux - Newbie 4 12-09-2003 07:39 AM
running web server pcdebb Programming 3 09-09-2003 09:25 AM
so is a web server running Linux without X 4x faster than win2k server? Mr. Mojo Risin General 3 09-02-2003 07:41 PM
Running Two Web Sites On the same server Chijtska Linux - Networking 3 06-08-2002 11:13 PM

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

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