Apr 1 2011

5,742,000 Queries Per Hour = DataBound = Slowdowns

Posted by Mike Brunt at 10:42 AM
7 comments
- Categories: Web Servers | DataBase | CloudComputing | Default | ColdFusion | JRun-J2EE

First of all, apologies for the silence here, a lot has happened in the past month, I relocated, temporarily and that took a good deal of my time, plus we are very busy at present.  In this posting I want to introduce a mildly un technical but nevertheless critical issue for web applications reliant upon Relational Database Management Systems, RDBMS's, which is still most sites out there.  One of the first things we look at, typically either via FusionReactor or SeeFusion, is the number of queries per request; hence my reference to this being mildly non-technical.

I will start at the end and say this, any application running with more than 10 queries per request is a potential red-flag for us.  There are good reasons for this and here is an example why; we have a current client who's initial query to request count was 45-50 queries per request.  We immediately homed in on this as a potential throttle point to the
site performance, for may reasons.  Calls to RDBMS's almost always traverse a network and very often the database is in a different subnet, both those things are probable points
of bottlenecks, then there is the work needing to be done by the RDBMS and in almost all cases there will be something lacking in the installation of the RDBMS, for instance hard drive arrays with everything on one array, data logs TempDB etc, shared SAN's and in a worse case scenario the RDBMS resides in a Cloud.

Here is an actual example which caused a spike in busy threads and a slow-down in performance, as observed via Metrics Logging.  In one 20 second period on one web-ColdFusion server 212 requests were handled so with a ratio of 50 queries per request that is 10,600 queries in 20 seconds or 31,800 per minute or 1,908,000 per hour from a single web-CF server and there are 3 web-CF servers in a cluster so if all is being load-balanced equally that is 5.7 million queries per hour hitting the RDBMS.  That is a high number of transactions and sure enough every time the system is handling over 120 requests every 20 seconds, everything degrades.

So, we have definitive evidence that a high query to request ratio will degrade performance and it is something to watch out for right from the beginning.  As a rule of thumb, do not go beyond 10 queries per request and if possible stay well below that and do not ever have your transaction logs and TempDB and of course the data itself all on the same drive array and never put those in a Cloud.  Following these simple procedures will prevent your applications from becoming "data-bound" with inevitable performance problems.

Comments

Aaron Kocourek

Aaron Kocourek wrote on 08/04/11 1:49 PM

Thank you for providing this information, it helped us out greatly! <a href="http://aaronkocourek.net/">Aaron Kocourek</a>
hermes

hermes wrote on 09/07/11 2:43 AM

Thanks a lot for sharing this. I have never thought that surfing online can be so much beneficial and entertained in a good shape. I feel really happy and grateful for providing me with such priceless sound track. All are good here simply best. I want such article again and again
superdry uk

superdry uk wrote on 11/18/11 6:14 PM

Every superdry sale fans convinced superdry will be next huge designer. The colors of superdry uk are just amazing because they are universally flattering! It is a great alternative for people who are tired of buying out the entire superdry outlet line and are finished shopping at Our Superdry uk sale store.
jkider

jkider wrote on 11/24/11 4:10 PM

Daily meticulously shaping a hair, will make people look extra spirit [url=http://www.bestlisseurghdfr.info/][b]ghd lisseur[/b][/url] Today we introduce some friends of female beauty does not hurt the hair shaping straight hair, [url=http://www.bestlisseurghdfr.info/][b]styler ghd [/b][/url]the product uses a high temperature ceramic plates, [url=http://www.bestlisseurghdfr.info/][b]lisser ghd[/b][/url] hair can minimize the damage will be. Straight hair looks elegant design [url=http://www.bestlisseurghdfr.info/][b]ghd hair straighteners[/b][/url] Body with a high temperature ceramic plates smooth and delicate texture to prevent their hair, [url=http://www.bestlisseurghdfr.info/][b]ghd france[/b][/url] to protect the scalp healthy.
superdry sale hoodies

superdry sale hoodies wrote on 11/27/11 11:04 PM

What an inspiring article you wrote! I totally like the useful info shared in the article.
Online Business Listing

Online Business Listing wrote on 01/18/12 12:25 AM

I enjoy reading it. I have need of to learn more on this subject.. Thanks in return theme this marvellous post.. Anyway, I am gonna subscribe to your silage and I desire you post again soon.
handbags

handbags wrote on 02/07/12 9:08 PM

Thank you! You often write very interesting articles. You improved my mood.I'll be back again.

Write your comment



(it will not be displayed)



Leave this field empty: