[Last Call] Learn how to a build a cloud-first strategyRegister Now


Sybase checking cpu usage

Posted on 2012-09-12
Medium Priority
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

by:Jan Franek
Jan Franek earned 1000 total points
ID: 38393807
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

Joe Woodhouse earned 1000 total points
ID: 38394492
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!)

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft Office Picture Manager was included in Office 2003, 2007, and 2010, but not in Office 2013. Users had hopes that it would be in Office 2016/Office 365, but it is not. Fortunately, the same zero-cost technique that works to install it with …
This shares a stored procedure to retrieve permissions for a given user on the current database or across all databases on a server.
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Suggested Courses

831 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