
04-24-2008, 03:42 PM
|
|
WHT Addict
|
|
Join Date: Aug 2006
Posts: 127
|
|
CPU load low, server slow, need more ram?
Hey,
My server gets 300 - 600 concurrent connections to http port 80, has a CPU load of 1 - 2%, has practically all RAM of 1 GB used, is running apache 2 and centos 5.
It tends to get slow and when I ban IPs that use many connections to my server (raping it), it becomes fast again. But soon after that new ******* users come which I again ban and the process repeats itself
I'm starting to think that maybe I just don't have enough RAM to handle them because it seems at least some of those users are legit. I don't however have even that much content that needs to be cached so I'm not sure what good RAM would do but perhaps apache just needs more.
So what should I do?
|

04-24-2008, 03:47 PM
|
|
Custom Hosting Master
|
|
Join Date: Jan 2007
Posts: 2,602
|
|
You need to optimize your Apache; RAM on Linux will appear all used because of how it works, but are you using a lot of swap?
__________________
478east
High Bandwidth Servers
Custom Hosting Solutions
|

04-24-2008, 03:50 PM
|
|
WHT Addict
|
|
Join Date: Aug 2006
Posts: 127
|
|
Practically no swap is being used. I have looked at optimizing apache but just don't seem to find anything to optimize. Care to help me get started on that? My cpu is pentium D 3.0 ghz or so.
|

04-24-2008, 04:06 PM
|
|
WHT Addict
|
|
Join Date: Aug 2006
Posts: 127
|
|
For example now it has been fast since that server raping ended for 20+ minutes.. But why is it so easy to rape the server, making it very slow? Seems like 11 concurrent connections will do it in some cases? Are successful dos attacks from a single IP address possible with such a low amount of connections?
Last edited by Tertsi; 04-24-2008 at 04:09 PM.
|

04-24-2008, 06:07 PM
|
|
** Server & Hosting Experts **
|
|
Join Date: Dec 2001
Location: Franklin, TN, USA
Posts: 1,310
|
|
If you are not swapping at all, it is unlikely you are utilizing all of your free RAM. What is the output of free -m?
|

04-25-2008, 03:28 AM
|
|
WHT Addict
|
|
Join Date: Aug 2006
Posts: 127
|
|
My errorlog says that I reached the MaxClients limit.. so I now increased it to 512 along with the ServerLimit setting and it seems I only get these problems during the evenings so we'll see how it goes this evening.
Last edited by Tertsi; 04-25-2008 at 03:31 AM.
|

04-25-2008, 07:44 AM
|
|
Web Hosting Master
|
|
Join Date: Jun 2004
Location: Bay Area
Posts: 1,317
|
|
Well if you increase your MaxClients limit more connections will be allowed, and thus more loaad will be generated.
Is the problem that your server load becomes too high, or that browsing your website(s) is slow? In the last case it could be that indeed you were just maxing out MaxClients, and that things seemed slow due to the 'waiting' for a client connection.
Another thing you can try is turning off keep-alive. That will free connections directly, and not keep them open. Thus less waiting time when the MaxClients limit is reached.
__________________
Powered by Level3, GBLX and AT&T
|

04-25-2008, 07:54 AM
|
|
WHT Addict
|
|
Join Date: Aug 2006
Posts: 127
|
|
browsing my website becomes slow.. CPU usage remains at 1 - 2 % or so, certainly not near 100 % and swap isn't really used either, ever. Thanks for that keepalive tip, I wonder how big I can set that MaxClients setting? (How much do you guess my server that serves APC cached php pages could handle?)
|

05-15-2008, 12:51 AM
|
|
Web Hosting Evangelist
|
|
Join Date: Nov 2006
Posts: 459
|
|
Quote:
Originally Posted by Tertsi
My errorlog says that I reached the MaxClients limit.. so I now increased it to 512 along with the ServerLimit setting and it seems I only get these problems during the evenings so we'll see how it goes this evening.
|
Hi,can i ask where do you get the errorlog file about MaxClients limit?
thanks
|

05-15-2008, 12:00 PM
|
|
Web Hosting Guru
|
|
Join Date: Mar 2006
Posts: 289
|
|
It depends whether you run the standard installation or a customized control panel installation.
__________________
█ Luke Whiteman
█ PureUnmetered.com - Competitive DE Unmetered Bandwidth Servers
█ Coming Soon!
|

05-15-2008, 12:18 PM
|
|
Web Hosting Guru
|
|
Join Date: May 2006
Location: /home/India/Kolkata
Posts: 306
|
|
Huge concurrent connections and still 1GB RAM usage...something fishy! Avg. apache process is ~15MB AFAIK.
Probably your're maxing out maxclients and banning IPs produce more checks for every connection and low performance. Try increasing RAM and tune your maxclients, timeout etc. Enable keepalive to 1sec.
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
| Postbit Selector |
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|
|
| Login: |
|
|
| Advertisement: |
|
|
| Web Hosting News: |
|
|
|