Welcome!

Weblogic Authors: Yeshim Deniz, Elizabeth White, Michael Meiner, Michael Bushong, Avi Rosenthal

Related Topics: Recurring Revenue, Java IoT, Machine Learning

Recurring Revenue: Article

How to Monitor Oracle Database Performance

What metrics are we interested in?

An Oracle database provides several v$ views to query information about the database instance, including statistical information that can be used for monitoring and problem analysis purposes. Rene Nyffenegger wrote a nice Summary on Oracle’s v$ views that gives an overview of all available views.

The following illustration shows a dashboard with key metrics that we pull out from an Oracle database when doing performance management with our clients:

dynaTrace Dashboard showing key performance metrics queried from an Oracle Database via v$ tables

dynaTrace Dashboard showing key performance metrics queried from an Oracle Database via v$ tables

In this article I provide a quick overview on what these metrics tell us and how to get them. If you run dynaTrace in your environment you can also download the [DL:Oracle Monitor Plugin] from our Community Portal .

I also appreciate feedback from all Oracle experts out there. I am sure there are many more metrics that are interesting and important for performance analysis, so please add those here.

What metrics are we interested in?
Every time you start up an Oracle instance the system allocates memory for its System Global Area (SGA) (Read more on Oracle SGA Concepts). A very interesting area involves internal data buffers. These buffers hold data in memory and are first searched when a request comes in before fetching data from disk. Buffering obviously saves on I/O and speeds up database requests. There is a great article that explains the different buffer pools, how they can be configured and it also gives recommendations on sizing: Using the dynamic SGA Features of Oracle 9i.

Buffer, Execution and I/O metrics
There are several great blogs that explain metrics such as Buffer Cache Hit Ratio, In Memory Sort Ratio,Parse to Execute Ratio or talk about I/O metrics and how to tune your database based on metrics retrieved from v$buffer_pool_statistics.

The metrics that we query therefore are Buffer Cache Hit Ratio, In Memory Sort Ratio, Parse to Execute Ratio, SQL Area Get Ratio, Buffer Busy Wait, Free Buffer Waits, Write Complete Wait, Consistent Gets, DB Block Gets and Physical Reads.

Connection and User Count
The number of connections and user sessions are key system and performance indicators. The number of connections is usually configurable via connection pool settings on the application server. The more connections the more resources you need on the database - on the other hand you can serve more concurrent users that request data from the database. The blog v$license view tipsgives a good overview of values exposed by this view.

The metrics that we query from this view are Maximum Concurrent User Sessions, Current Concurrent User Sessions, Highest Concurrent User Sessions and Maximum Named Users

Connection Time
Additionally to the metrics that we query from the system tables, we also monitor how long it takes to actually establish a physical connection to the database. Our monitors use the Oracle Database driver and measure the time it takes to get a connection. This metric gives us a good indication on how good the database can deal with new incoming connection requests.

How to query them
Querying these values is pretty straight forward. [Our monitor] is implemented in Java. We load the Oracle JDBC Driver and establish a connection to the Oracle Database Instance when we initially launch the monitor. Check out the following blog with an example on How To connect to Oracle with JDBC. Then we simply execute the SQL statements to retrieve the actual measures on a scheduled interval (e.g.: every 30 seconds).

Most of the statements we execute are explained in the blogs I linked to earlier in this article, e.g.: Buffer Cache Hit Ratio, In Memory Sort Ratio,Parse to Execute Ratio

How to run a monitor and how to read the values
We run our monitors on the dynaTrace APM Platform . This means that these monitors are executed on a scheduled interval, e.g.: every 30 seconds. A monitor itself is a Java OSGI plugin with an execute method that queries and returns the metrics from the database views. The monitored values can then be displayed in a dashboard (as seen in the screenshot in the top) or can trigger alerts, e.g.: notify my admins in case Buffer Cache Ratio drops under a defined threshold.

If you implement your own monitor you need to figure out how granular you need the data and you have to figure out how to display and process the individual measure points.

How to read these values?
The most important thing to understand is to not only look at individual metrics but really look at your system - and with that I mean looking at measures from all application components that are involved to process individual transactions. A low Buffer Cache Hit Ratio doesn't mean that your DBA's should run off right away trying to increase this value by tweaking the db_cache_size. The business function of the application largely dictates the way it interacts with its backend datastore.  For example, if the application is more Decision Support oriented, effective use of the Buffer Cache may be impractical or impossible due to the large data sets that are being analyzed.  On the other hand, if the application is OLTP oriented, the Buffer Cache should be highly utilized and the behaviour of the Hit Ratio with respect to transaction mixes, peak concurrencies, etc ... becomes a critical measure to understand.  Nonetheless, even in these cases, you need to look at overall Transaction Response Times and see if you actually have a problem that affects the end-user.

If that is the case you need to figure out whether the time is spent in the Application Layer (bad performing code), the Network (too much data being sent between components) or the Database (inefficient settings or non optimized indices, ...). If it turns out that the problem is mainly caused by the Database Layer you can check whether your connection pools are exhausted. If that is the case you actually want to talk with the application developers and see whether they can optimize the usage of connections. If you have too much traffic on the network because too much data is requested from the database you want to look into optimizing the application code to really only query the data that is needed. If it then turns out that the problem is on the database you have to observe the metrics discussed in this article. There are ways to tweak database settings to improve buffer usage. I am not the expert on Oracle but if you follow the links that I've posted throughout you will find many good recommendations on what to do in various scenarios.

The database is most often not the root cause of transactions that perform poorly from and end-user’s perspective. Too often it is the application that is e.g.: keeping connections open for too long or is querying more data than needed. I recommend reading Top 10 Performance Problems taken from Zappos, Monster, Thomson and Co. Problem Patterns #1, #4 and #7 often lead people to point to the DBA's first instead of identifying these problems in the application layer. That being said - there are of course scenarios where it really is the database that slows down transaction response times. And in these cases it is important to have enough information available to analyze the root cause of the problem. Correlating the database metrics with other metrics from the underlying operating system, network, application server, web server, ... will make it easier to find a solution to your performance problems.

What's your strategy on database monitoring?
This is one example on monitoring your database. I am interested in getting your feedback on which tools and approaches you use to monitor your Oracle, SQL-Server, MySql, ... databases. Let us know (via comments - login required) which measures you monitor and you consider important. Thanks

Related reading:

  1. Lessons Learned: How we Monitor our Community Portal from the Cloud Our dynaTrace Community Portal is our gateway to our users....
  2. Apache Web Server Status Monitoring with a dynaTrace Plugin provided by MCG Systems The extensible plugin architecture of dynaTrace opens many doors for...
  3. Automated Performance Analysis: What’s going on in my ASP.NET or ASP.NET MVC Application? I’ve spent some time in the last weeks playing with different...

More Stories By Andreas Grabner

Andreas Grabner has been helping companies improve their application performance for 15+ years. He is a regular contributor within Web Performance and DevOps communities and a prolific speaker at user groups and conferences around the world. Reach him at @grabnerandi

@ThingsExpo Stories
Widespread fragmentation is stalling the growth of the IIoT and making it difficult for partners to work together. The number of software platforms, apps, hardware and connectivity standards is creating paralysis among businesses that are afraid of being locked into a solution. EdgeX Foundry is unifying the community around a common IoT edge framework and an ecosystem of interoperable components.
"MobiDev is a software development company and we do complex, custom software development for everybody from entrepreneurs to large enterprises," explained Alan Winters, U.S. Head of Business Development at MobiDev, in this SYS-CON.tv interview at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
In his session at 21st Cloud Expo, Carl J. Levine, Senior Technical Evangelist for NS1, will objectively discuss how DNS is used to solve Digital Transformation challenges in large SaaS applications, CDNs, AdTech platforms, and other demanding use cases. Carl J. Levine is the Senior Technical Evangelist for NS1. A veteran of the Internet Infrastructure space, he has over a decade of experience with startups, networking protocols and Internet infrastructure, combined with the unique ability to it...
"Space Monkey by Vivent Smart Home is a product that is a distributed cloud-based edge storage network. Vivent Smart Home, our parent company, is a smart home provider that places a lot of hard drives across homes in North America," explained JT Olds, Director of Engineering, and Brandon Crowfeather, Product Manager, at Vivint Smart Home, in this SYS-CON.tv interview at @ThingsExpo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
"IBM is really all in on blockchain. We take a look at sort of the history of blockchain ledger technologies. It started out with bitcoin, Ethereum, and IBM evaluated these particular blockchain technologies and found they were anonymous and permissionless and that many companies were looking for permissioned blockchain," stated René Bostic, Technical VP of the IBM Cloud Unit in North America, in this SYS-CON.tv interview at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Conventi...
"Akvelon is a software development company and we also provide consultancy services to folks who are looking to scale or accelerate their engineering roadmaps," explained Jeremiah Mothersell, Marketing Manager at Akvelon, in this SYS-CON.tv interview at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
Coca-Cola’s Google powered digital signage system lays the groundwork for a more valuable connection between Coke and its customers. Digital signs pair software with high-resolution displays so that a message can be changed instantly based on what the operator wants to communicate or sell. In their Day 3 Keynote at 21st Cloud Expo, Greg Chambers, Global Group Director, Digital Innovation, Coca-Cola, and Vidya Nagarajan, a Senior Product Manager at Google, discussed how from store operations and ...
Large industrial manufacturing organizations are adopting the agile principles of cloud software companies. The industrial manufacturing development process has not scaled over time. Now that design CAD teams are geographically distributed, centralizing their work is key. With large multi-gigabyte projects, outdated tools have stifled industrial team agility, time-to-market milestones, and impacted P&L stakeholders.
Gemini is Yahoo’s native and search advertising platform. To ensure the quality of a complex distributed system that spans multiple products and components and across various desktop websites and mobile app and web experiences – both Yahoo owned and operated and third-party syndication (supply), with complex interaction with more than a billion users and numerous advertisers globally (demand) – it becomes imperative to automate a set of end-to-end tests 24x7 to detect bugs and regression. In th...
"Cloud Academy is an enterprise training platform for the cloud, specifically public clouds. We offer guided learning experiences on AWS, Azure, Google Cloud and all the surrounding methodologies and technologies that you need to know and your teams need to know in order to leverage the full benefits of the cloud," explained Alex Brower, VP of Marketing at Cloud Academy, in this SYS-CON.tv interview at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clar...
"There's plenty of bandwidth out there but it's never in the right place. So what Cedexis does is uses data to work out the best pathways to get data from the origin to the person who wants to get it," explained Simon Jones, Evangelist and Head of Marketing at Cedexis, in this SYS-CON.tv interview at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
SYS-CON Events announced today that CrowdReviews.com has been named “Media Sponsor” of SYS-CON's 22nd International Cloud Expo, which will take place on June 5–7, 2018, at the Javits Center in New York City, NY. CrowdReviews.com is a transparent online platform for determining which products and services are the best based on the opinion of the crowd. The crowd consists of Internet users that have experienced products and services first-hand and have an interest in letting other potential buye...
SYS-CON Events announced today that Telecom Reseller has been named “Media Sponsor” of SYS-CON's 22nd International Cloud Expo, which will take place on June 5-7, 2018, at the Javits Center in New York, NY. Telecom Reseller reports on Unified Communications, UCaaS, BPaaS for enterprise and SMBs. They report extensively on both customer premises based solutions such as IP-PBX as well as cloud based and hosted platforms.
It is of utmost importance for the future success of WebRTC to ensure that interoperability is operational between web browsers and any WebRTC-compliant client. To be guaranteed as operational and effective, interoperability must be tested extensively by establishing WebRTC data and media connections between different web browsers running on different devices and operating systems. In his session at WebRTC Summit at @ThingsExpo, Dr. Alex Gouaillard, CEO and Founder of CoSMo Software, presented ...
WebRTC is great technology to build your own communication tools. It will be even more exciting experience it with advanced devices, such as a 360 Camera, 360 microphone, and a depth sensor camera. In his session at @ThingsExpo, Masashi Ganeko, a manager at INFOCOM Corporation, introduced two experimental projects from his team and what they learned from them. "Shotoku Tamago" uses the robot audition software HARK to track speakers in 360 video of a remote party. "Virtual Teleport" uses a multip...
A strange thing is happening along the way to the Internet of Things, namely far too many devices to work with and manage. It has become clear that we'll need much higher efficiency user experiences that can allow us to more easily and scalably work with the thousands of devices that will soon be in each of our lives. Enter the conversational interface revolution, combining bots we can literally talk with, gesture to, and even direct with our thoughts, with embedded artificial intelligence, whic...
SYS-CON Events announced today that Evatronix will exhibit at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Evatronix SA offers comprehensive solutions in the design and implementation of electronic systems, in CAD / CAM deployment, and also is a designer and manufacturer of advanced 3D scanners for professional applications.
Leading companies, from the Global Fortune 500 to the smallest companies, are adopting hybrid cloud as the path to business advantage. Hybrid cloud depends on cloud services and on-premises infrastructure working in unison. Successful implementations require new levels of data mobility, enabled by an automated and seamless flow across on-premises and cloud resources. In his general session at 21st Cloud Expo, Greg Tevis, an IBM Storage Software Technical Strategist and Customer Solution Architec...
To get the most out of their data, successful companies are not focusing on queries and data lakes, they are actively integrating analytics into their operations with a data-first application development approach. Real-time adjustments to improve revenues, reduce costs, or mitigate risk rely on applications that minimize latency on a variety of data sources. In his session at @BigDataExpo, Jack Norris, Senior Vice President, Data and Applications at MapR Technologies, reviewed best practices to ...
An increasing number of companies are creating products that combine data with analytical capabilities. Running interactive queries on Big Data requires complex architectures to store and query data effectively, typically involving data streams, an choosing efficient file format/database and multiple independent systems that are tied together through custom-engineered pipelines. In his session at @BigDataExpo at @ThingsExpo, Tomer Levi, a senior software engineer at Intel’s Advanced Analytics gr...