This is not to shame our developers, but I just need a better perspective before I get an invoice tomorrow, so here is my story simplified.

After getting our site 2 weeks late the site is running ridiculously slow and our developers’ response was yet again to upgrade our 4GB rackspace server to an 8 or perhaps 16GB server if I want a faster site. I told them to send me our final invoice while I think about getting a larger server over the weekend.

Today I asked a friend of mine that I met on Drupal.org whose opinion I respect to check out the site and if I needed a faster server. After he laughed at me we installed the Devel Module and we were both shocked to see this:

"Executed 42,508 queries in 44.710 Seconds"

What would you do when if you got the invoice?

Comments

alliax’s picture

I don't know, is the cache enabled?
That sound horribly slow, 44 seconds to display a page :-)
What is the site about? How can it be so slow?

vm’s picture

Was optimization part of the contract?

what page are those querries on ? how much content is on that page?

developing and optimizing are two totally different animals.

toNYb-2’s picture

Thanks for the input.

@alliax

* Is the cache enabled? - I don't know.

* What is the site about? - It's like a Pligg site, but in Drupal. Here is a great example of a fantastic Drigg Site: http://designbump.com/

* How can it be so slow? - That is what I am trying to find out.

@VM

Was optimization part of the contract? - optimization is one thing but is 42508 queries in 44710 milliseconds just plain not working?

What page are those querries on? On all page except the Admin Section

How much content is on that page? As much as the site mentioned above.

developing and optimizing are two totally different animals. - yes, but are you saying when I pay for a Drupal developer they could hand over a site that take 30 seconds for pages to load and then I have to find someone to optimize to make it functional?

vm’s picture

Not necessairily (unless the developer of the site is responsible for creating a custom module that is out of control or if he/she/they were responsible for optimizing a site. Which may or may not have been part of the agreement between you and the party or parties handling development of the site.

If the site in development is a site that is pulling a lot of information from the database on a single page the site will inherently use alot of querries to pull the content. If a front page (or any page) has many pages, pieces of content or lists on it then it's more likley to pull alot of querries to generate the page.

A developer of a site without LAMP optimizing background or 3rd party caching skillset likley never even looked at how many querries were being created.

Drupal has seemed to use a lot of querries for quite some time based on the dates of other conversation revolving around the drupalsphere. As can be researched here on drupal.org, 2bits.com and the performance group on groups.drupal.org. see: http://www.google.com/search?hl=en&q=drupal+uses+many+querries&aq=f&oq=&...

Optimization isn't everyones cup of tea and is a specialty all it's own. This is evidenced (to me) by the fact that there are specialty services by companies who soley handle optimization see: http://tag1consulting.com/

Developers build the site, designers design a site, optimizers optimize a site using techonology running the site. Rarely are all three of these handled by the same person, or outfit. My personal take, Optimizing a site is more of a sys admin type of thing. Many shared hosts don't allow the tools required to handle many of those tasks. Those who've learned how and pursue learning those skillets are working in VPS and or dedicated harware.

page caching in administer -> performance may help
css and js aggregation in administer -> performance may help

checking with ySlow may help diagnose some issues that may be altered

certainly checking for slow querries and duplicate querries is of benefit. (both equally if not more important than how many.)

http://www.google.com/search?hl=en&source=hp&q=drupal+finding+bottleneck...

some reading:
http://buytaert.net/drupal-webserver-configurations-compared
http://2bits.com/contents/articles
http://www.google.com/search?hl=en&source=hp&q=optimizing+drupal&aq=f&oq...

Anonymous’s picture

Not 100+/- queries...... but 42 THOUSAND.

When you pay a developer to develop a site, that does not mean that as long as what they come up with constitutes a 'non-breaking' drupal installation, that they've done their job.

To suggest otherwise is a joke.

Also, yslow will of course not be able to diagnose server-side inefficiencies, which this is certainly a case of given the number of queries.

To clarify (correct me if I'm wrong, OP), these developers are asking to be paid for a drupal development job wherein the site takes at least 40 seconds to even begin sending the page back. So for 40 seconds, the user waits without any indication of what's going on other than a 'waiting for server" type message from the browser.

To me, this is job failed. I would perhaps give the developer 10% or $50 (whichever is less), so they have bus money to get to a job centre.

Regards

Steve

alliax’s picture

A friend of mine who also have several drigg sites uses boost module on its most visited one with good results on the resources used.
I haven't used it myself since my traffic is not yet too much (between 10 and 20k unique visitors daily on both sites together)

vm’s picture

Not 100+/- queries...... but 42 THOUSAND.

When you pay a developer to develop a site, that does not mean that as long as what they come up with constitutes a 'non-breaking' drupal installation, that they've done their job.

To suggest otherwise is a joke.

yea, I know how many querries the OP stated, and again, and without joke, it's dependant one what the RFQ/contract called for. Whether you develop sites in this manner or even agree with it isn't the issue and without you analyzing the RFQ is the joke.

If the so called developer of the OP's site simply installed drupal and contrib modules and made the site do what the client wanted based on the RFQ .... and the RFQ didn't specify cleaning up contrib modules rewriting querries or rewriting the modules completely where they weren't porperly coded as well as adjusting apache, mysql or php for the hardware runnind then the OP got the product they requested. Would I do it this way? certainly not, but again, we're left with assumptions because for all anyone here knows there are 50 views running on a single page at the clients animate request. How would this be a developers fault for giving the client what they wanted? It wouldn't.

Safe to say that without anyone here knowing exactly what the RFQ and contract included as well as being able to see and understand how the site was built there is no way for anyone to give solid advice. Not to mention noone here knows what was paid for the developement. In most cases you get what you pay for.

I'd hire an attorney before choosing Steve's method above as you could be open to a lawsuit for withholding pay if everything in the RFQ or contract was completed and it didn't include optimizing contrib modules and the like.

Anonymous’s picture

How many queries do you think the average drupal page performs? It goes without saying that 40,000+ queries on every page load (except admin pages) is never going to be acceptable, and doesn't have to be specified against beforehand in the RFQ/contract.

It's very obviously a huge screw up, which the developers either tried to deny, or were unaware of. Not sure which is worse.

Any real developer would agree, your responsibility goes a lot further than just doing exactly what you're told. Ultimately, it's your job to take the clients uneducated ideas about the development and turn it into something that actually works. That means, when they say "I want 50 views on this page", you say "That could be a performance issue. It might cause this to happen. Here's a better option."

And umm....an attorney? What planet are you on?

OP....Here's what ya do.

1. Send the developer/s an email, or get 'em on skype and be like "WTF? 42,000 queries? WTF? You wanted me to upgrade my 4GB server!? WTF?!?!?!?! You call this job done?!?!? WHAT THE $!#%??!?!?!?!"
2. Give that some time to sink in, maybe a day or so, then send him/them a much nicer email, giving them a chance to come to the party and make it right. Make sure you still specify that as it stands, you will certainly not paying all/any of their invoice.
3. If they magically fix it, then pay them. If they refuse, then don't. If they try, but are obviously out of their depth, then throw them some massively reduced payment, cut your losses, and move on.

@VM Just say the word and I'll come up with a bunch of analogies/simalies to better illustrate my point about what you should expect when hiring professionals in any trade/profession.

Regards

Steve

vm’s picture

Of course, your offering is good too. A swift attack of expletives after hunting them down on Skype followed by some reverse physcology a day or two later in email may in some way work too.

@VM Just say the word and I'll come up with a bunch of analogies/simalies to better illustrate my point about what you should expect when hiring professionals in any trade/profession.

Thanks, but I'll have to gracefully decline. I truly appreciate the offer though. Honest.

alliax’s picture

I also have 2 drigg sites running, one in french for one year and a half and the other since last april and it is quite ressource intensive, especially as you have more content and votes, so having cache enabled is a must, as in many drupal websites anyway.
The younger drigg is http://shetoldme.com if you want to check the speed.
If you want I can have a look at your site's config for free and I'm not a hacker, I'm not interested in doing anything bad, so if you want contact me privately.

toNYb-2’s picture

I think you would have to admit a professional relationship goes beyond a fine print in a contract.

I hired this team to develop a website and that implies it works. I told them before getting paid we need to do testing (as it says in the contract). They said it was impossible to do testing because the site ran too slow. It was only after they saw "Executed 42,508 queries in 44.710 Seconds" in Devel did they admit it was not the server and did the right thing. 2 hours later the site was working and we moved on to the testing phase.

I’m not a litigious person and luckily the team I hire isn’t either. BUT this does leave the bad taste in my mouth since if I had not spoken to my friend to install Devel that they might have not seen the light.

@VM Would you expect to get paid for a drupal site that took 40 seconds for each page to load?

vm’s picture

Thankfully, I'd never be in that position to qualify discussion on such a hypothesis. At this point my my only interest is the cause not the effect. Sadly, there has yet to be an explaination of the cause.

Anonymous’s picture

Very good to hear that you had a positive outcome OP! For a second it looked a bit dire :)

You're very right about the the advantages of a good working relationship over a detailed contract. A contract is essential, but worth nothing if you don't have that channel of understanding and communication in the first place.

Regards

Steve

sudeepg’s picture

Anthony, if you agree to VM, the performance optimization is altogether different game and could be difficult to fix at times especially if you do not trust the developers or fail to coporate with them in terms of benefit of doubt that you might have to give at times.

Unfortunately, you never paid up for the major part of the development as well apart from optimizations. This is sad that people may take so much for granted and then hold up the payments.

Our other site we are working on is getting as much as 3 million page views now per month and we have struggled at times to find an optimum solution.