Drupal 7 Site Performance and Advice

Events happening in the community are now at Drupal community events on www.drupal.org.
n34_panda's picture

Hi,

I am involved in a Drupal 7 site, I am note a Drupal Developer but I am IT savvy.

Anyway the site was recently moved onto a dedicated server due to heavy usage at certain periods. The site is young but growing fast, circa 1k users and during the heavy periods at least 70 users logged in...maybe lots more - shared hosting was no longer a suitable option. As it was an emergency we were recommended a server and migrated to a dedicated server: Quad Core CPU, 32GB RAM, 300GB and Plesk (for alerts) - fastcgi is in use but I am not sure what else as I don't have access :( .

Ultimately my question is this - by guessing based upon the server specs above and the site usage described is the hardware sufficient?

The developers, a reputable company are struggling (at least they haven't outright said there is a problem) but we are receiving periodic performance issues and before i begin requesting consultancy to tune the code/database in your opinion is the server more (than capable for now and the future)?

Thanks (I gotta go now but will revise this with more detail asap).

Comments

As a stop-gap measure...

brad.curnow's picture

I'd suggest possibly moving the site to Pantheon (US based "cloud" hosting). Their system automatically scales to meet demand.

I've been experimenting with them doing some load testing recently and their system handles pretty much anything I throw at it. We're talking up to 50 simultaneous requests (50 users requesting the same page, at exactly the same moment) on an un-cached site, which is akin to having logged in users.

So far it's holding up very well. By the sounds of what you described I think Pantheon would handle it no worries at all, unless you have buggy code that is hogging resources like mad.

I think you'll find it

brad.curnow's picture

I think you'll find it handles the traffic at least as well as a dedicated server, and will give you a buffer so you can take your time tuning the code and then you'll have a choice to make whether to stay with Pantheon or move away.

Worth noting though is that Pantheon runs on the nginx server and not Apache - if your current system is on Apache (which it likely is) then you could have some issues migrating the site. I had a few but nothing I couldn't handle and I'm a noob-level developer, so if you have real developers working on the project they should be able to handle anything that comes up.

Another cloud option is Acquia hosting which may be better once you have your code tuned - I moved from there to Pantheon because my site couldn't handle the load testing. This is because Acquia and Pantheon are set up differently.

Acquia was actually faster in my case up to a certain number of users, but would choke completely at a certain point. Right now I don't have time to tune my code so sticking with Pantheon, but will look at Acquia again later once my site is more efficient.

Thanks, my main concern is

n34_panda's picture

Thanks, my main concern is whether or not the developers are making mistakes which leads to poor performance...now we have a dedicated server I think i'll try migrating the site myself.

Theoretically, what would be the only option for hosting for a site with hundreds of users accessing/updating at a specific time ( we encounter about 100 at the minute we think but obviously in the future this will grow and grow).

Would it make sense moving to nginx anyway - I understand it to be better for high performance sites?

Thanks

I can understand your pain,

dalin's picture

I can understand your pain, but unfortunately there's no way for us to tell you if your development team is up to snuff or not. The devil is always in the details. Your performance problems may be caused by some small feature with a big impact, or it may be the result of many small things that just add up. It may be caused by the way that your contributed modules are configured, or it might be a bit of custom code that wasn't built to scale.

Your development team should be able to pinpoint most performance issues within a few hours of debugging (though things can get real tricky when the problems only happen on production). But sometimes it can take several days of solid development to do an adequate fix.

The real measure of an experienced dev team is how they communicate with you. And that you can gauge for yourself.

--


Dave Hansen-Lange
Director of Technical Strategy, Advomatic.com
Pronouns: he/him/his

nginx is definitely faster

brad.curnow's picture

So if it does everything you need, well worth a look. Sometimes sites are built around functionality provided by an Apache module so that could be a sticking point, but unlikely.

I'd thoroughly suggest adding NewRelic to your server. NR is an excellent third party performance monitoring application that lets you dive in and explore PHP and database queries that are taking too long etc etc.

This is your best bet for really understanding what's going on under the hood. It's not cheap but I think it gives great value for money as it points out exactly how long each component is taking to complete a task.

Knowledge is power!

I've used NR to find out that a particular hard coded function executes in about 10ms, and the same query when hitting the database takes up to 100ms. So, by tweaking my process a little I can skip the db altogether and increase performance on this action by 4-10 times.

NR told me it was worth following that line of enquiry and so I did, with pleasing results.

I second the motion to

Brian Altenhofel's picture

I second the motion to install New Relic. (If you haven't used them before, I'm pretty sure they still have a free trial of the "pro" plan. But yes, paying for it is definitely worth every penny, especially if your website is a core part of your business.)

That server, if properly configured, should be able to handle that load in most cases. Personally, I provide management services to a site that sees ~1200 users (~900 authenticated) during peak hours, and without change in performance according to New Relic. It runs with a 2GB/2vCPU VM for the database (technically, it's three servers in a Percona cluster, but as little as the database actually gets hit it doesn't really matter) and a 1GB/1vCPU VM for Varnish/Nginx/PHP-FPM/Memcache during most hours with a second 1GB/1vCPU webserver automatically deployed if determined necessary by KPIs.

As for your developers making mistakes, I wouldn't necessary call everything that has a negative impact on performance a "mistake". They may have done the right thing at the time of development - maybe even a "best practice". One cannot truly expect developers to build something that can scale to Facebook-size on the first (or even second or third) iteration. The most important thing for all parties involved in the beginning is getting a working product out the door. Easy performance wins should be implemented, of course, but the extra $10K for 10ms of performance boost probably wouldn't be a good investment when a company is at the stage of "it'd be nice if we could get 100 concurrent users".

This is where regular code reviews can pay off whether between team members are using an outside consultant. One of the biggest advantages of hiring an outside consultant to perform a review is a fresh set of eyes can spot something that is easily (and understandably) overlooked by the original developers.

D7 Performance

mikeytown2's picture

I've been working on a simple guide on how to make sure you have the basics covered for a drupal 7 site when it comes to performance. I'm still working on it but it should be ready to go this Sunday for devsignercon
http://devsignercon.com/devsigner-2014/session/diy-drupal-7-performance

Link to the slides (note still a work in progress)
http://goo.gl/30yi39

High performance

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week