Sybase checking cpu usage

Posted on 2012-09-12
Last Modified: 2012-09-30
How do I check cpu load for our sybase instance ? for example customer have complaint yesterday the found cpu was >90% peak and blame sybase, but how do I confirm is sybase is the one using cpu or sybase did not ?
Question by:motioneye
    LVL 14

    Assisted Solution

    You can use @@cpu_busy, @@io_busy and @@idle global variables to get basic monitoring of Sybase load. Basically you store these values, wait for some time, get updated values and then you can see, how much load was caused by CPU (including logical IO) and how much was  physical IO operations.

    However, it is just look from "inside of Sybase" - so you just see the distribution of system time, that Sybase got from OS. For example - Sybase got 50% of CPU time from OS, and this was divided for 20% CPU operations, 20% IO operations and 60% idle time inside Sybase.

    You have to use some OS tools to look at the whole system - like top in Linux or Task Manager in Windows.
    LVL 24

    Accepted Solution

    Everything Jan_Frankek says here is true - give Jan most of the points for this one. :)

    However be aware that when OS tools like top/vmstat/Task Manager report Sybase using a lot of CPU, that doesn't actually mean Sybase is. O/S tools count usage whenever a process executes an instruction in a register... even if that instruction is a NOP (No Operation) because Sybase is sitting and spinning waiting for something to happen.

    You really need to know both numbers to be able to answer these questions properly. If, say, top shows that dataserver is using 90% of the CPU, but ASE reports (via sp_sysmon or MDA) that it's only average 20% CPU busy, the correct answer to "how much CPU is Sybase using?" is 20% x 90% = 18%.

    This is not stretching a point, it's very common to see the O/S report heavy usage by Sybase while Sybase reports low usage.

    If this is a problem - if you need a mostly idle ASE to not use resources on the host - you can reduce the sp_configure parameter "runnable process search count". This says how many times ASE should sit and spin before it accepts it really is idle and gets off the CPU. The downside to setting this low is that it will take a bit longer to wake up again now. (Note! A value of zero means never go to sleep, and ASE will eat all the CPU on the box!)

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    6 Surprising Benefits of Threat Intelligence

    All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

    Suggested Solutions

    Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
    For Sennheiser, comfort, quality and security are high priority areas. This paper addresses the security of Bluetooth technology and the supplementary security that Sennheiser’s Contact Center and Office (CC&O) headsets provide.  
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now