Load balancing

  • Dear All

    Need to know can we perform load balancing among different databases located on the same server.

  • There's no real way to limit access of a given database to memory or cpu on the server. If you have a badly performing database, you'll need to isolate it from the others by moving it to a different server or a different instance of SQL Server.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

  • hi Grant Fritchey

    Have done everthing to solve the issue even moved db from 2005 to 2008 but still the issue persists

  • The point Grant is making is that if you have a 'problem' database - then in order to prevent it impacting on other databases on the server - the solution would be to move it somewhere else, like to another server. Upgrading only means you now have a badly performing upgraded database - it does onthing to solve the root problem.

    Obviously a rewrite may be an option if it's poorly designed - or the app(s) swamp it with passthrough queries - but it's obviously not a quick solution - and incurs business risk

  • I can think of 3 solutions:

    1) Hire a professional to help you tune the poorly performing database. It seems that you are not a SQL Server guru so I bet there are lots of things that could be improved. This is NOT a personal attack, just an observation based on years of experience.

    2) Upgrade (at significant expense) to SQL Server 2008 Enterprise Edition and then take advantage of the Resource Governor. Note that you cannot 'govern' IO, which is a limitation of this subsystem.

    3) Have 2 instances on the server and put the 'bad' database on one of them and then restrict that instances CPU and Memory. Expect exceedingly poor performance of that database however, but it could free up sufficient resources to allow the other database to perform acceptably.

    Note that you should try to put the 'bad' database on separate IO subsytem if at all possible in any event.

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • bmw110001 (9/29/2009)


    hi Grant Fritchey

    Have done everthing to solve the issue even moved db from 2005 to 2008 but still the issue persists

    Then I guess the core question is, what's the issue? What problems are you having?

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

  • Note that what you appear to want is not load balancing, but rather restricting the use of resources between databases.

    Using VMs will give you some control, but at the expense of other issues. As TheSQLGuru mentioned, you probably want to engage a consultant if you have no idea how to work with the load. It's not a knock, but rather it's a chance for your to learn a lot in a short period of time from someone else.

  • it's a live application the query fetches info from other srvr's the thing i got it's a query which is in loop,any idea

  • bmw110001 (9/29/2009)


    it's a live application the query fetches info from other srvr's the thing i got it's a query which is in loop,any idea

    I restate my first idea:

    1) Hire a professional to help you tune the poorly performing database. It seems that you are not a SQL Server guru so I bet there are lots of things that could be improved. This is NOT a personal attack, just an observation based on years of experience.

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • bmw110001 (9/29/2009)


    it's a live application the query fetches info from other srvr's the thing i got it's a query which is in loop,any idea

    Eliminate the loop?

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

  • Usually you do not want to do things in a looping manner in SQL Server. The db engine is optimized to do things with sets of data.

    If you don't know how to move the code, or rewrite it, we can help with small snippets. However it's unlikely that many of us want to tune hundreds of lines of code for free. If you have a lot of code, and it is impacting your company, then I would suggest you talk with your boss and hire someone with more experience for a short term to both fix things and teach you more about SQL Server so you can better maintain the system. That is likely a better investment than a training class.

    If you need to do this on an ongoing basis, I'd suggest you start reading more about SQL Server, and pick up the Inside SQL Server series and read it through to learn more.

Viewing 11 posts - 1 through 10 (of 10 total)

You must be logged in to reply to this topic. Login to reply