Site Performance Suggestions

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
cjgarcia1965's picture

I'm trying to speed up my website and need some suggestions about what things go together and which typically give you the most performance increase. I need to lower CPU usage and caching seems like the way to go. We really need to decrease CPU because our host (a pretty well respected and expensive VPS) is being overloaded with only 2-3 simultaneous users. I've run Yslow and the developers are working on making the recommended changes there.

I currently have the boost module working, but most of my users are signed in. The site is sill somewhat under development so I also need to be able to flush caches to see changes as they are made.

I'm new to this and have almost no experience so any tips or other modules, ideas, etc would be greatly appreciated.

Thanks

Comments

There's not a lot to go on

cweagans's picture

There's not a lot to go on here, but one thing that I'd suggest is using Cloudflare or some other CDN to serve up your static assets (images, js, etc). That'll take a little bit of burden off of your server (not much though - the big thing that it will help with is client-side rendering time).

I'd also suggest ensuring that you've disabled unused Apache modules and tuned MySQL a bit: http://mysqltuner.pl/ has worked pretty well for me in the past.

You might also take a look at authcache if you're running D6.

Finally, I'd suggest having a separate dev site where you can clear caches and not worry about driving your server to the ground. Or even better: develop locally and then deploy your changes to prod.

--
Cameron Eagans
http://cweagans.net

Thanks so much for taking the

cjgarcia1965's picture

Thanks so much for taking the time to respond. Right now I'm looking for general ideas and yours are quite helpful. I'll look into Cloudflare. And yes, I'm in the process of disabling modules now.

I am on D6 and will mention authcache to the developer. Our site is highly customized and I have to check to see if it can be implemented.

Again, thanks for replying.

Chris

When you say "highly

cweagans's picture

When you say "highly customized", do you mean "we hacked core mercilessly"?

If so, then that's probably where you should start with your performance issues.

If not, you should be able to use authcache :)

--
Cameron Eagans
http://cweagans.net

I don't think it really means

cjgarcia1965's picture

I don't think it really means that, but quite frankly, when we began developing this site (2.5 yrs ago), I didn't even know what Drupal was. What I think my developer meant by "highly customized" was "expect to keep giving me LOTS of money to work on your site in the future because no one else can help you" :)

Unfortunately, he dropped us due to his "no longer being able to give it the time it needed", aka "I have easier/more lucrative clients now". The upside of that, the subcontractors he had hired kept working on the site for us to finish it, but we are now in charge, not really knowing what we are doing. The subs will install / tweak whatever we ask, (for $ of course), but I have to come up with the ideas. So that's why I'm asking for experienced help with those ideas.

All that being said, I'm starting to like Drupal except for the current performance issues, which, with some good advice from people like you, I think we can overcome.

Thanks again

Authcache on D7

simg's picture

what's wrong with Authcache for D7 ?

Easy way out

afear's picture

You say that your current host is expensive, so I bet you could actually lower costs and get state of the art caching by simply moving to a host that specializes in Drupal and provides Varnish and/or other fancy caching out-of-the-box. We recently moved one of our sites to Pantheon and have been really happy with the results. Acquia and Cadre are two other hosts to consider. All offer Varnish/APC/Memcache (Pantheon uses Redis instead of Memcache) and some really handy developer tools. Toss in a CDN and you can focus on your business goals, Drupal codebase, and frontend and getting that right.

I really don't want to switch

cjgarcia1965's picture

I really don't want to switch hosts at this point. I haven't ruled it out for the future though. My host isn't the most expensive, but it certainly isn't a budget host. The support is pretty good and they are willing to help where they can.

Thanks for taking the time to comment and I'll certainly keep those host in mind if we decide to make a hosting change.

Don't go about on all fronts

kbahey's picture

A very common mistake about performance that we see is trying to do everything based on hearsay that it may help, or have helped other sites, without specifically diagnosing what is wrong with your site first.

For example you say that you "need to decrease CPU", then say you have run YSlow, and someone recommends CloudFlare, ....etc. These are often contradictory beacuse CPU usage is most often tied to back end issues, while YSlow and CDNs target front end issues.

By trying to solve issues that don't exist at layers that don't address your problems, you are wasting time and effort, and complicating things for yourself needlessly.

Treatment follows diagnosis. Only fix what needs to be fixed.

Drupal performance tuning, development, customization and consulting: 2bits.com, Inc..
Personal blog: Baheyeldin.com.

Thanks for taking the time to

cjgarcia1965's picture

Thanks for taking the time to respond. It is certainly good advice not to jump on multiple fronts at the same time.

Your comment about the front and back end has me a little confused. If you are loading faster, wouldn't that decrease CPU usage almost by default? At this point I have to be working on both fronts because I know that we are losing customers due to slow page loading times.

One of our biggest problems is my own lack of knowledge of these performance issues. The developer who quit was, quite honestly, pretty clueless himself, and was asking someone else for advice every time I asked him a question. Of course I didn't know this until just before he quit the project. So, I'm learning as quickly as I can and sorting through advice the best I can. With any luck, I'll get this solved on both fronts soon.

Thanks again!

If you are loading faster,

dalin's picture

If you are loading faster, wouldn't that decrease CPU usage almost by default?

Front-end performance, back-end performance, and scalability are often all thought of as being one and the same, but this isn't true. Sometimes you will make an improvement in one area that harms another area, but sometimes you can do something that improves all three. For example adding a reverse proxy like Varnish can improve all three (if the majority of your traffic is anonymous), but moving your database onto a separate server can increase scalability (since you'll be able to handle more traffic), but can decrease back-end performance (since now the communication between Drupal and the database takes longer). Furthermore some techniques will improve only specific bottlenecks (CPU, disk I/O, bandwidth, etc.).

All this to say what the smart folks have already told you - find out what the problem is before trying to fix it.

--


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

The first thing to do is to

pdrake's picture

The first thing to do is to run xhprof or install something like Tracelytics or New Relic (both have a 14-day free trial) and identify the source of the CPU usage problems.

Thanks for the info. I'll

cjgarcia1965's picture

Thanks for the info. I'll check Tracelytics and New Relic out. The more information I have, the better, .... I hope! :)