Tuesday, June 24, 2014

Why we need and have workload management

While working in your office a rare visitor from another location stops by. Time for a break to connect on the latest gossip, but not too long. On the way back to your office your boss asks you to call someone from the client team to clarify some technical issues and you have to squeeze it in between two important customer calls. And you just received a text message that your wife cannot pick up the kids and you need to leave on time this afternoon to do it. Workload Management (WLM) in real life. Everybody seems to be doing WLM, some better, some not so well. And there are many unwritten rules.

In a database system like DB2 there is also a built-in Workload Management. If you are using BLU Acceleration, it is activated by default and some rules have been defined, else it is switched off. Why turn it on and use it? Same reasons as in real life:
  • A "fair" allocation of time and resources between different work items/applications is needed ("work / life balancing"?).
  • Response time for critical tasks or some type of work is important and needs to be protected against less important tasks ("your mother-in-law visits, take care of her").
  • Implementation of rules to control and regulate the system behavior ("kids in bed by 8pm means time for you to watch soccer").
  • Deal with rogue queries that threaten regular operations ("kids bring over the entire neighborhood").
  • The system (sometimes) is overloaded and you have to set priorities ("no party this weekend").
All this can be done with the DB2 Workload Manager. It allows to identify different types of activities (work), manage them based on rules that govern available resources and set controls, and to monitor the system behavior. The database workload manager can be integrated with the operating system (OS) workload manager on AIX and Linux. This is especially useful when more than a single database is active and resources need to be controlled on a higher level ("sync your family calendar with the grandparents").

Does Workload Management help? Yes, it does. However, similar to family life it is possible that because of resource shortage not all planned tasks can be performed. Maybe time for an upgrade ("hire some help, do not get more kids... :)").

I plan to discuss DB2 WLM details in future articles, workload permitting...