Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

My issue is that these servers are taking rather long for request about 2 seconds on average just to serve files. When we had just one server doing everything it was noticeably faster even with the same web app (Drupal 6 and Drupal 7). I want to get this number down to a reasonable level and so I need some help getting to the bottom of why the request times are so slow.

This can cause the webapp to hang on post or put and generally leads to a bad user experience on my sites.

PS: I am more of a server newbie so this has confounded me for quite some time.

The domains: collabornation.net nptrainingworks.com (they run off the same two webservers using vhost configs)

The Gear: Two Rackspace 4 Gig servers running CentOS 6.2 Final They have a mounted file system (gluster) that is used to keep files the same on both machines. They are behind a rackspace load balancer running round robin. Mysql is run using php-pdo and php-mysql as such mysql is run on another instance running memcache on that machine with phpMyAdmin located there as well.

Apache version number 2.2.15-15.el6.centos.1 (httpd.x86_64) Varnish version number 3.0.2-1.el5 (varnish.x86_64) PHP version number 5.3.14-1.el6.remi (php.x86_64)

Configs Linked Below

Apache Conf

Vhost Conf

Varnish Backends

Varnish Defaults

Varnish Acl

PHP INI

Again need some help, much appreciated!

share|improve this question
    
Adding memcached configs pastebin.com/aP7Ztc4v –  coolestdude1 Jun 26 '12 at 20:07
    
Out of curiosity why are you using PHP from the REMI repository when RHEL 6.x provides PHP53 natively? –  HTTP500 Jun 27 '12 at 16:50
    
When back in the yum default with centos 5 etc the php module was way to out of date for our liking. Remi was chosen as having really stable builds of all these modules. Would there be a noticeable difference when switching to another repos builds? –  coolestdude1 Jun 27 '12 at 17:59
    
Looks like gluster, the mounted file system used for syncing, is causing a bit of the lag. We are launching an investigation into the configs and settings that we are using to see if that is causing the issues. We are also splitting the sites to not use vhosts for hosting. Will report back with the findings. –  coolestdude1 Jul 10 '12 at 19:25
    
Seems to be slow disk speeds we are investigating possible fixes to get better read/write speeds. –  coolestdude1 Jul 13 '12 at 20:52

2 Answers 2

Start looking into the database and connections to and from the database instance (hopefully a separate server) from the web server. You may be experiencing high wait times on your database, in which case you'll need to performance tune the database.

share|improve this answer
    
I tried running a couple of mysql statements from one of the webservers to the db server and even my most complicated sql consisting of a 3 table select with a left join, between, order by, not in and aliases still only took 0.07 a select on its own took 0.00 woot time magic so thanks for the guess. –  coolestdude1 Jun 26 '12 at 20:02
    
Memcached was temporarily disabled to see if you were indeed right but again page loads slowly. So its not memcached. –  coolestdude1 Jun 26 '12 at 20:55
    
If you go into MySQL and use the SHOW FULL PROCESSLIST; query, you can see if you're getting any waits or locks. Also, I'm curious if PHP compression would help at all, since it appears that you're not using it, according to your php.ini. If you have the available CPU resources, I'd try enabling it and seeing if that helps at all. –  nojak Jun 27 '12 at 15:56
    
Noticed that you're also using SOAP, and I'm not sure if it's compatible with Varnish or not. Couldn't find any definitive answers on that. In my experience, most CMS issues regarding slowness are either caused by the database, or lack of proper caching. It seems odd to me that it would be a cache issue, since you're using Varnish, which is why I wonder if the SOAP php extension is causing issues between it and Varnish. –  nojak Jun 27 '12 at 15:56
    
Show full processlist; displays db=null command=query time=0 state=null, also if I go and use a db that is in use on the site the only thing that changes is that the db changes to the name of that db. Zlib output compression turned on, no differences noted. Note module php-soap is not installed is this a setting in php.ini? Or rather how do I make sure it is off? –  coolestdude1 Jun 27 '12 at 17:55

You've ruled out MySQL and memcached, so try going direct to apache and bypass varnish to rule that out.

Having munin set up on both servers to give you some visuals on what's happening stack wide would help a lot in this situation.

share|improve this answer
    
I took your suggestion and it turns out that I already had munin installed. I now have a bunch of stats for my server should I be looking for anything in particular? I will by trying a varnish bypass soon. –  coolestdude1 Jun 27 '12 at 19:57
    
Varnish bypass did not do it either so it is not varnish. –  coolestdude1 Jul 5 '12 at 13:11

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.