As with relationships between people, building trust takes time and requires a series of reliable and favorable experiences. In this blog post, we'll consider when and how to best engage STMM, and discuss how to build trust with this new DB2 9 capability.
As with relationships between people, building trust takes time and requires a series of reliable and favorable experiences. In this blog post, we'll consider when and how to best engage STMM, and discuss how to build trust with this new DB2 9 capability.
STMM is DB2's scheme for dynamically adjusting memory configurations according to timely observations about database performance and fluctuations in statement workloads. STMM reacts to statement performance volatility to:
As these objectives suggest, STMM provides optimum value when a quality physical design is in place. In the absence of a quality physical design, STMM will embark on a wild goose chase that frequently shifts memory heap sizes to react to statement performance problems.
How is STMM best used? And when?
This is a topic that could take hours to discuss and teach, but we'll include some highlights and general guidelines here.
Data Warehouse Databases
Transactional (OLTP) Databases
Building trust with STMM
So, now you've taken a leap of faith and surrendered your long time bufferpool, sort heap, locklist, and package cache tuning job over to DB2, and this probably feels a little uncomfortable at first. STMM is going to make changes for you, automatically. We're probably just a few years away from every household having a servant robot to clean our floors and do our dishes too.
Let's go back to the statement "Building trust requires a series of reliable and favorable experiences". Favorable experiences, in terms of DB2, means "performance got better". Reliable means "performance didn't get worse".
In this series of blog posts, so far we've covered a number of key performance metrics that can help us detect when performance problems are present, and also help us identify if performance is improving. Some of these included:
Here's the good news (tongue in cheek). Since STMM can make configuration changes rather rapidly to quickly address statement workloads, you now have the "opportunity" (requirement) to compute SRP, IREF, BPLRTX and other key metrics on a periodic and frequent basis like every 5, 10, or 15 minutes. Store this data in a table with the host, instance, database name, partition, and a timestamp. You also need to track the changes made by STMM and put them into a table with a timestamp, host, instance, database name, and partition.
Changes made by STMM are tracked in files named stmm.#.log in the stmmlog directory. This directory is under the SQLLIB directory for the instance owner in Linux and UNIX, and under the SQLLIB\Instance directory on Windows.
But wait, there's more. Not only can STMM make changes to the database which could influence performance, but DBAs can also drop or create indexes, run utilities, change DB and DBM configuration parameters, and change registry variables too. This requires more advanced monitoring of db2diag.log, the notify log, registry variables, configuration parameters, db2 history, the DB2 catalog, and more, and is beyond the scope of today's blog.
Assuming now that you have two tables - one with performance history of key metrics, and a second that tracks STMM changes, now all you need to do is write a bit of fancy SQL to join the two and create a report. Even better if you can graph the performance trends over time and plot the STMM change events ( and all other relevant change events ) on the same graph. Think of a stock price performance chart - you will see a $ when a dividend was declared, an "S" if the stock split, or maybe a triangle if there was an information news release. Events impact performance -- for stocks and databases. Which takes us to...
The Shameless Marketing Moment
Brother-Panther™ from DBI provides the performance trend charts with correlated change events plotted on the same graph which visually and clearly show the performance consequences of change events. And, not only does Brother-Panther track, record, and plot STMM changes, but other DB & DBM CFG changes, registry variable changes, and index changes are tracked too. DBI has done all the hard work for you. Now, instead of stressing out over trusting STMM, you can enable it with confidence. As a bonus, these performance trend charts can help you identify and "lock in" the optimum configuration values for maximum performance.
Other vendors might tell you that they have performance trend charts. Run away as fast as you can - a performance trend chart that doesn't help you understand the sources of changes in performance is simply eye candy.
Just for Fun
I'm enjoying the IDUG Europe conference in Athens Greece. I've attended several very good presentations by great presenters. IDUG has a new Premier Membership level that allows Premier members to view conference presentations online. If you attended IDUG North America in San Jose, you may already have Premier member status at no extra charge. Check out the IDUG web site at www.idug.org for details and maximize the value of your IDUG relationship.
Until next time,
Cheers,
Scott Hayes
President & CEO, DBI
IBM GOLD Consultant
www.Database-Performance.info
www.Database-Auditing.info