SQL server 2014 is very slow

  • Based on this report(performance monitor)  can any one tell why the Sql server is running slow. many application have slow performance.. What could be the reason and what would be probable solution to overcome this slowness

  • Nope, nothing useful there.
    Most of those counters are only useful if you know what normal is for that server and workload and are looking for the difference from normal.

    Usual process, look at wait stats (change over an hour or two at the most, not the total since SQL started), identify the slow queries, tune then.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • These are the wait type

    These query are in execution. So how to find the issue for slow performance.

    total memory use:
    SELECT (physical_memory_in_use_kb/1024) AS Used_Memory_By_SqlServer_MBFROM from sys.dm_os_process_memory
    --1024
    So how to understand what is the real bottleneck.?

  • I didn't say look at the queries currently executing, and are those the waits over max an hour of busiest time? Can you filter the meaningless waits out and post the results in some form other than a screenshot?

    Usual process, look at wait stats (change over an hour or two at the most, not the total since SQL started), identify the slow queries, tune them.


    Old, but still mostly valid: https://www.simple-talk.com/sql/performance/finding-the-causes-of-poor-performance-in-sql-server,-part-1/

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • I am pasting it in different format for your perusal. 

    Wait typeWait task CountsWait time msmax wait time mssignal Wait time ms
    CLR_AUTO_EVENT9246791901233862012
    SLEEP_SYSTEMTASK1353731212772963681349157
    QDS_SHUTDOWN_QUEUE355212404036000617
    DIRTY_PAGE_POLL21111821240224461103
    LOGMGR_QUEUE17063921239835663342
    LAZYWRITER_SLEEP224482123816712601034
    REQUEST_FOR_DEADLOCK_SEARCH424821237093519821237093
    SQLTRACE_INCREMENTAL_FLUSH_SLEEP53092123401840301
    XE_TIMER_EVENT548321224773504921224773
    HADR_FILESTREAM_IOMGR_IOCOMPLETION42315211990976272233
    XE_DISPATCHER_WAIT177211110241200250
    FT_IFTS_SCHEDULER_IDLE_WAIT351210003286003864
    SP_SERVER_DIAGNOSTICS_SLEEP515542100004730000121000047
    CHECKPOINT_QUEUE1522084145111692551271
    SLEEP_TASK483361060142611072873
    BROKER_TO_FLUSH10343105999091102437
    ASYNC_NETWORK_IO34842452755420235614
  • Are those the waits over max an hour of busiest time?
    Or is that just an unfiltered query again os_wait_stats?

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • I have filtered it only those where wait time is more than 1hr. What is the probable cause of slow performance.

    wait_typewaiting_tasks_countwait_time_msmax_wait_time_mssignal_wait_time_ms
    SLEEP_SYSTEMTASK1997420313859453681388802
    DIRTY_PAGE_POLL31160331349282461183
    LOGMGR_QUEUE25268131348760663566
    REQUEST_FOR_DEADLOCK_SEARCH627031347932519831347932
    LAZYWRITER_SLEEP331253134634512601881
    SQLTRACE_INCREMENTAL_FLUSH_SLEEP78363134292240302
    XE_TIMER_EVENT809531334544504931334544
    QDS_SHUTDOWN_QUEUE523313205826000626
    XE_DISPATCHER_WAIT262313109981200250
    HADR_FILESTREAM_IOMGR_IOCOMPLETION62492313081806274081
    SP_SERVER_DIAGNOSTICS_SLEEP655123120005030000331200050
    FT_IFTS_SCHEDULER_IDLE_WAIT5183102050860038106
    CHECKPOINT_QUEUE1592688463711692551272
    CLR_AUTO_EVENT9246791901233862012
    ASYNC_NETWORK_IO575901574627420808662
    SLEEP_TASK739401565687411074566
    BROKER_TO_FLUSH15274156551871102922
  • That is not what I asked for. Please read what I'm asking.

    Filter out the meaningless waits. There are plenty of references online as to which ones are not important. Start with Glenn Berry's scripts.
    Get the waits over an hour or two interval, at most, during busy and/or slow times. The cumulative waits since SQL started, which is what you're posted multiple times now, are nearly useless because there's too much noise.

    And did you read the article I referenced?

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Another train of thought:
    1 - how much CPU/RAM does the system have?
    2 - when did the slowdown first become noticable?  Has it always been slow or is it gradually getting worse?
    3 - how frequently do you update statistics and rebuild/reorganize indexes?
    4 - how much memory is the max memory for SQL vs how much is the total memory for the system?
    5 - how frequently does it autogrow and (heaven forbid) autoshrink?
    6 - do you manually shrink the database?  
    7 - are the slow applications in house or 3rd party?
    7b - if they are 3rd party, have you contacted support?

    I would follow Gail's advice, but just a few other things to throw into the "why is it slow" troubleshooting pot.
    I'd recommend hiring a consultant.  They are experts in their field.  They will be a lot faster and more focused support than a free forum.

    That being said, your available MB in your first screenshot looks a tad low.  I imagine putting more RAM into the system and/or configuring the max memory for SQL will have a noticable benefit.

    The above is all just my opinion on what you should do. 
    As with all advice you find on a random internet forum - you shouldn't blindly follow it.  Always test on a test server to see if there is negative side effects before making changes to live!
    I recommend you NEVER run "random code" you found online on any system you care about UNLESS you understand and can verify the code OR you don't care if the code trashes your system.

  • Max memory is set to 4096 MB.Auto growth is set to 10%.Manually shrinking of the data base is being done.

    RAM is 6GB and in task manager it is showing 50% is usage but the windows admin is saying RAM usage is 25%.

    10% of the CPU is being utilised

    What wait type is causing the problem . What is solution  for this? any kind of assistance is really appreciable.

    Thanks all of you for responding and viewing the use

  • pranabpal - Wednesday, May 31, 2017 1:16 AM

    Max memory is set to 4096 MB.Auto growth is set to 10%.Manually shrinking of the data base is being done.

    RAM is 6GB and in task manager it is showing 50% is usage but the windows admin is saying RAM usage is 25%.

    10% of the CPU is being utilised

    What wait type is causing the problem . What is solution  for this? any kind of assistance is really appreciable.

    Thanks all of you for responding and viewing the use

    Two things immediately stand out. First don't set your autogrowth to be a percentage, set it at a fixed size e.g 512MB. Secondly why are you shrinking your database? Please don't do this as it is unnecessary and will fragment you indexes and cause performance problems.

    Thanks

  • pranabpal - Wednesday, May 31, 2017 1:16 AM

    Max memory is set to 4096 MB.Auto growth is set to 10%.Manually shrinking of the data base is being done.

    RAM is 6GB and in task manager it is showing 50% is usage but the windows admin is saying RAM usage is 25%.

    10% of the CPU is being utilised

    What wait type is causing the problem . What is solution  for this? any kind of assistance is really appreciable.

    Thanks all of you for responding and viewing the use

    Did you miss the (heaven forbid) part? Autoshrink fragments your indexes to make the database smaller. REALLY bad idea. Turn that OFF.

  • pranabpal - Wednesday, May 31, 2017 1:16 AM

    Max memory is set to 4096 MB.Auto growth is set to 10%.Manually shrinking of the data base is being done.

    RAM is 6GB and in task manager it is showing 50% is usage but the windows admin is saying RAM usage is 25%.

    10% of the CPU is being utilised

    What wait type is causing the problem . What is solution  for this? any kind of assistance is really appreciable.

    Thanks all of you for responding and viewing the use

    Use activity monitor or Perfmon to get accurate value of memory usage .
    What your DB is for ?
    Is it used heavily?
    Did you check for blocking or deadlocks?
    Are you observing slowness all the time or at any particular time?

    As Gail said observe your server and filter out the most used queries or waits.
    Enable Data collection which will help pinpoint the issues.

  • pranabpal - Wednesday, May 31, 2017 1:16 AM

    What wait type is causing the problem . What is solution  for this?

    I don't know, because you still haven't posted what I've asked for multiple times.

    Get a script that filters out the useless waits
    Save the wait information to a table every hour
    Work out the differences between two sample periods (in busy times) and post that (the top 25 useful ones, not the whole list)

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • pranabpal - Wednesday, May 31, 2017 1:16 AM

    Max memory is set to 4096 MB.Auto growth is set to 10%.Manually shrinking of the data base is being done.

    RAM is 6GB and in task manager it is showing 50% is usage but the windows admin is saying RAM usage is 25%.

    10% of the CPU is being utilised

    What wait type is causing the problem . What is solution  for this? any kind of assistance is really appreciable.

    Thanks all of you for responding and viewing the use

    4GB isn't much more than the minimum required for SQL Server to function properly. Expect dire performance.
    Get more RAM.

    “Write the query the simplest way. If through testing it becomes clear that the performance is inadequate, consider alternative query forms.” - Gail Shaw

    For fast, accurate and documented assistance in answering your questions, please read this article.
    Understanding and using APPLY, (I) and (II) Paul White
    Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden

Viewing 15 posts - 1 through 15 (of 48 total)

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