store | blogs | forums | twitter | facebook | wiki | mailing lists | downloads | support portal
Atomic Secure Linux
It is currently Fri May 24, 2013 10:51 am

» Feed - Atomicorp

All times are UTC - 5 hours [ DST ]




Post new topic Reply to topic Share/Bookmark  [ 14 posts ] 
Author Message
 Post subject: Slow http (apache) performance
Unread postPosted: Fri Sep 18, 2009 12:27 pm 
Offline
Forum Regular
Forum Regular

Joined: Tue Jul 15, 2008 2:38 pm
Posts: 704
Location: Sweden
I have run into a problem with one of my servers. It have started to perform extremely bad when it handles http requests. It simply is slow. I really can't say that I have changed anything. It is a VPS but it doesn't feel slow in any other aspect. Plesk control panel is ok, ASL gui is ok, but webmail and web pages are slow. It takes 5-10 seconds to display a page. Really don't know where to start. Tried to restart but it doesn't help. top doesn't show anything demanding resources... Any got any suggestions?


Top
 Profile  
 
 Post subject: Re: Slow http (apache) performance
Unread postPosted: Sat Sep 19, 2009 8:41 am 
Offline
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
User avatar

Joined: Thu Feb 07, 2008 7:49 pm
Posts: 3245
Location: Chantilly, VA
Are you using the RBL rules? If so, and if you dont use a local caching DNS server (and make sure its first in your nameserver list) you will experience slowness as you lookup the RBL entry for every connection.

Any thing that can slow down apache tremendously is if you do name lookups on your logs in realtime. In other words, if your system doesnt log the IP but the hostname in your access logs.

_________________
Michael Shinn
Atomicorp - Security For Everyone

Co-Author of Troubleshooting Linux Firewalls.


Top
 Profile  
 
 Post subject: Re: Slow http (apache) performance
Unread postPosted: Sat Sep 19, 2009 8:44 am 
Offline
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin

Joined: Wed Dec 31, 1969 8:00 pm
Posts: 7429
Location: earth
First check out the apache benchmark utility, called ab. I like to get a feel for the performance of a system by using that against a flat HTML file. 300-400 queries/sec is pretty normal for static content.

Keep in mind a VPS is using shared resources too, so another VPS on the box could be the culprit here. All it takes is one of them under load to effect the others.


Top
 Profile  
 
 Post subject: Re: Slow http (apache) performance
Unread postPosted: Sat Sep 19, 2009 8:47 am 
Offline
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
User avatar

Joined: Thu Feb 07, 2008 7:49 pm
Posts: 3245
Location: Chantilly, VA
Excellent point, a VPS could be experiencing slow downs because of another virtual machine on the same system and you would never be able to figure it out from your VPS.

_________________
Michael Shinn
Atomicorp - Security For Everyone

Co-Author of Troubleshooting Linux Firewalls.


Top
 Profile  
 
 Post subject: Re: Slow http (apache) performance
Unread postPosted: Sun Sep 20, 2009 10:05 am 
Offline
Forum Regular
Forum Regular

Joined: Tue Jul 15, 2008 2:38 pm
Posts: 704
Location: Sweden
Thanks a lot. Will try out the performance tomorrow and maybe open a support ticket at my hosting company.


Top
 Profile  
 
 Post subject: Re: Slow http (apache) performance
Unread postPosted: Mon Sep 21, 2009 3:16 pm 
Offline
Forum Regular
Forum Regular

Joined: Tue Jul 15, 2008 2:38 pm
Posts: 704
Location: Sweden
It was the ASL RBL that had been turned on by one of the ASL 2.1 upgrades. Tricky to find (if you're not an ART, of course)!

Thanks again for your help!


Top
 Profile  
 
 Post subject: Re: Slow http (apache) performance
Unread postPosted: Tue Sep 22, 2009 6:54 pm 
Offline
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
User avatar

Joined: Thu Feb 07, 2008 7:49 pm
Posts: 3245
Location: Chantilly, VA
Our pleasure. If you want to use the RBLs you really want to use a local DNS server on the box for all your DNS lookups. In fact, you want to do this on any box. Local DNS is lightspeed compared to a remote DNS server.

_________________
Michael Shinn
Atomicorp - Security For Everyone

Co-Author of Troubleshooting Linux Firewalls.


Top
 Profile  
 
 Post subject: Re: Slow http (apache) performance
Unread postPosted: Thu Sep 24, 2009 11:33 am 
Offline
Forum Regular
Forum Regular

Joined: Thu Apr 23, 2009 12:08 pm
Posts: 218
Biggles...
I went through similar thing with the RBL turned on in the upgrade...i am sure that i set it on in my configuration cycles...slowed some sites down to 900 bites/sec...people were closing the connection, so the error i was getting on this was referring to the closed connection...

Anyway, with ASL's support help, we set up the local DNS caching...really quite simple...but i have to say it has improved the speed on a lot of functions such as yum updates, upgrades, and of course the html downloads...the sites (joomla) that were going at 900bytes/sec and failing increased in speed up to 20,000+ bytes/sec...dramatic difference...

I see that "AB" is part of apache, but does anyone have some good commands for this utility?


Top
 Profile  
 
 Post subject: Re: Slow http (apache) performance
Unread postPosted: Thu Sep 24, 2009 12:33 pm 
Offline
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin

Joined: Wed Dec 31, 1969 8:00 pm
Posts: 7429
Location: earth
It will also make a huge difference for processing web statistics, and spamassassin performance.


Top
 Profile  
 
 Post subject: Re: Slow http (apache) performance
Unread postPosted: Fri Sep 25, 2009 12:53 am 
Offline
Forum Regular
Forum Regular

Joined: Tue Jul 15, 2008 2:38 pm
Posts: 704
Location: Sweden
And the correct way of doing it is to install bind (installed by Plesk) and make sure 127.0.0.1 is in resolve.conf, right?


Top
 Profile  
 
 Post subject: Re: Slow http (apache) performance
Unread postPosted: Fri Sep 25, 2009 8:25 am 
Offline
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin

Joined: Wed Dec 31, 1969 8:00 pm
Posts: 7429
Location: earth
and make sure its listed first (nameserver 127.0.0.1), the libc resolver on your system might not support more than 3 nameserver entries.


Top
 Profile  
 
 Post subject: Re: Slow http (apache) performance
Unread postPosted: Fri Sep 25, 2009 10:02 am 
Offline
Long Time Forum Regular
Long Time Forum Regular

Joined: Thu Dec 09, 2004 11:19 am
Posts: 1846
We've switched to using the OpenDNS DNS servers instead of using localhost. It seems to be extremely fast.

I've not added them as forwarders - we just use them in resolv.conf and don't use 127.0.0.1.

In theory I'd hope that this should help with spamassassin (and spamdyke) dns lookups, as they are most likely cached on the OpenDNS side due to the volume of users looking up the same things.

At any rate we do DNS lookups on several rbls via ASL on several VPSes and there's no perceptible hit in terms of performance. I was surprised how well it works, to be honest.

Faris.

_________________
--------------------------------
<advert>
If you want to rent a UK-based VPS that comes with friendly advice and support from a fellow ART fan, please get in touch.
</advert>


Top
 Profile  
 
 Post subject: Re: Slow http (apache) performance
Unread postPosted: Fri Sep 25, 2009 11:28 am 
Offline
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
User avatar

Joined: Thu Feb 07, 2008 7:49 pm
Posts: 3245
Location: Chantilly, VA
I'd still use a local server and set it up to use OpenDNS as forwarders. You're not doing any caching in your case, and that will be much slower than a local resolver.

_________________
Michael Shinn
Atomicorp - Security For Everyone

Co-Author of Troubleshooting Linux Firewalls.


Top
 Profile  
 
 Post subject: Re: Slow http (apache) performance
Unread postPosted: Fri Sep 25, 2009 9:43 pm 
Offline
Long Time Forum Regular
Long Time Forum Regular

Joined: Thu Dec 09, 2004 11:19 am
Posts: 1846
I'll do that and report back.

Faris.

_________________
--------------------------------
<advert>
If you want to rent a UK-based VPS that comes with friendly advice and support from a fellow ART fan, please get in touch.
</advert>


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic Share/Bookmark  [ 14 posts ] 

» Feed - Atomicorp

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group