URN Logo
UNIX Resources » Linux » Linux Forum » Linux Web Servers » Page.1 » Apache running slowly
announcement The content of this page is collected from Linux Forum, All copyrights and other associated rights are reserved by the original authors of the articles.
Resources
China Linux Forum(finished)
Linux Forum(finished)
FreeBSD China(finished)
linuxforum.com
  LinuxForum General Chat
  Linux Advocacy
  LinuxForum Polls
  Introductions
  Linux Kernel Support
  Patch Management
  Development Release
  Linux Programming
  Linux Security
  Linux Software
  Linux Hardware Problems
    Linux Video Problems
    Linux Sound Problems
  Linux Networking Support
  Linux Printing Support
  Linux Human Interface Devices Support
  Linux Data Storage Support
  Linux Applications Support
  Linux Installation Support
  Linux Laptops Support
  Linux Motherboard, Chipsets, CPU, Memory
  Miscellaneous
  Debian Linux Support
  Ubuntu Linux Support
  LiveCD Discussions
  Gentoo Linux Support
  Mandrake Linux Support
  Redhat / Fedora Linux Support
  Slackware Linux Support
  SuSE Linux Support
  CentOS Linux Support
  Linux Web Servers
  Linux DNS Servers
  Linux Database Servers
  Linux Email Servers
  Linux FTP Servers
  Linux Squid Proxy Server
  Linux Samba Help
  Linux cPanel Help
  Linux Ensim Help
  Linux Plesk Help
  Linux Webmin / Usermin Help
  Qmail Toaster Help
  Linux Games
  Windows Game Emulation
  Linux Discussions
  General Linux Discussions
  Red Hat Linux Discussions
  More Red Hat Linux Discussions
  Mandrake Linux Discussions
  Slackware Linux Discussions
  SuSE Linux Discussions
  Debian Discussions
  Samba Help
  Linux Security
  Linux Networking
  Gentoo Help
  Operating System Rant Forum
  Hardware Rants
   
Apache running slowly
Subject: Apache running slowly
Author: smd453    Posted: 2007-01-14 12:07:32    Length: 896 byte(s)
[Original] [Print] [Top]
    Hi,

    I'm running apache 2.2 on a rhel server. Everything is up to date. It is being used for an advertising campaign server and handles about 6m hits a day.

    Here's the problem: The http server is very slow to respond (if at all; it frequently times out) from the client side.  The machine is a dual dual core opteron with 2gb of ram in a datacenter.  Bandwidth is not the problem, nor is the hardware.

    Netstat shows that the machine has on average 500-600 or more sockets open simultaneously.

    top shows that none of the http child processes are eating up the processor, so it can't be a matter of hardware requirements.

    I'm using the default mpm settings. What could be causing this?

    Thanks!

[Original] [Print] [Top]
Subject: Re: Apache running slowly
Author: Nikesh    Posted: 2007-01-15 02:38:29    Length: 898 byte(s)
[Original] [Print] [Top]
Look, Optimization and security is a journey not the destination

You need to keep on looking, experiment and hunt for the best way to optimize the web server, there are 100's of way to do the optimization (google) but it may happen none of them will optimize your web server, every servers running Apache are different and they have a different way to optimize.

Few areas you should look at

1) Optimize your filesystem (Sync interval, noatime, partitions, bufferes, cache, etc ..)
2) Optimize your networking settings (TCP settings, timeout, connections, buffers, cache, Kernel packet processing, etc ...)
3) Optimize your caching techniques (put on your stating pages on your ram)
4) Optimize your apache modules, no of process, threads running
5) Add compression module to apache so that it can send the compressed pages


----
Check more at : http://linux-poison.blogspot.com
[Original] [Print] [Top]
Subject: Re: Apache running slowly
Author: smd453    Posted: 2007-01-15 09:56:07    Length: 844 byte(s)
[Original] [Print] [Top]
I'm not trying to "optimize" it so much as I am trying to get it to work properly on a basic level.  I don't think that 6 million hits per day should bring apache down to its knees. 

I used iptables to block all http traffic to the server except from my machines and stormed apache with requests from some of my other machines and was getting about 100 hits per second on the server.  It didn't slow down at all.  Also, it closed the sockets instantly as soon as the request was done and only kept a handful running at a time.

The main file that is being served by apache is a 1kb php script.  I don't think it should be keeping so many sockets open at a time for such a small script.  Is there any way to have the sockets time out in a shorter amount of time?
[Original] [Print] [Top]
Subject: Re: Apache running slowly
Author: Nikesh    Posted: 2007-01-16 00:16:15    Length: 198 byte(s)
[Original] [Print] [Top]
For socket time you need to look at the /proc filesystem and tune some of the the kernel Networking feature.

You should seriously read this :  http://ipsysctl-tutorial.frozentux.net/
----
Check more at : http://linux-poison.blogspot.com
[Original] [Print] [Top]
Subject: Re: Apache running slowly
Author: smd453    Posted: 2007-01-16 23:21:51    Length: 252 byte(s)
[Original] [Print] [Top]
Hmm... it appears to be working now.  I think messing with the MPM settings did it. Before, it only had about 32 child processes spawned, now it has 250+. 

Thanks for the link to the socket stuff, I'm going to check that out!
[Original] [Print] [Top]
« Previous thread
PHP page loading time
Linux Web Servers
Page. 1
Next thread »
Newbie question re Linux & Windows 2003
     

Copyright © 2007 UNIX Resources Network, All Rights Reserved.      About URN | Privacy & Legal | Help | Contact us
Powered by FreeBSD    webmaster: webmaster@unixresources.net
This page created on 2007-08-01 12:06:25, cost 0.025280952453613 ms.