Canceling Threads and Disconnecting Users in Planning Analytics

If you are new to IBM Planning Analytics or particularly to administrating with Planning Analytics Workspace, then the following information may be of interest. Keep in mind that we’re focusing here on just a few administrative tasks and functions, while there are plenty of others you’ll want to explore.

Assuming you’re running Planning Analytics Local, let’s verify which version of Planning Analytics Workspace you are using (if you are running in the IBM Cloud, most likely the version is current – or close). The reason for doing this is because the look and feel of the workspace may vary depending upon which version you are using. In addition, some newer features may not be available in older versions and, occasionally, some features may be decommissioned in favor of others in later versions of the software (it also helpful to know your version when referring to IBM documentation or submitting a support request to a support team).

  1. Launch the PAW website
  2. Click “About IBM Planning Analytics” (shown below):
  3. The exact version (for example 0.89) is shown at the lower-right corner:

Upgrading

It goes without saying that, if you find that you are more than a few versions behind, you should consider upgrading your Planning Analytics Workspace. Why? Because IBM is continually developing the product, adding new features and reported “bug fixes” typically are included with each new version. Don’t be concerned that an upgrade will require your team to be retrained, as typically “material functionalities” will continue to work in the same manner allowing you to learn to use any new features as time permits (in fact, when some new features are introduced to Planning Analytics Workspace, you can choose to enable or disable those features in your environment). Tight schedule? Upgrading PAW is not a huge undertaking, if best practices are followed, however, you should plan on performing the upgrade during a system maintenance window because services will need to be stopped (and PAW will be unavailable until restarted).

Starting Point

First, it’s important to understand how Planning Analytics Workspace uses security objects, specifically roles, to provide or limit what a user or “client” can perform. There are four roles available in Planning Analytics Workspace, with the “default” role being the Analyst role. You can learn more about PAW roles here. To perform administrative tasks, you’ll need to be “assigned” the Administrator role. By default, the administrator role is assigned to the first user in your organization’s Planning Analytics Workspace account, but of course you can have multiple users assigned to the administrator role. Not sure if you are an administrator? Here is a quick way to find out: you access the Administration page from the Administration tile on the Planning Analytics Workspace home page. If you are not an administrator, you will not see the Administration tile on the Planning Analytics Workspace home page.

Planning Analytics Admin vs Planning Analytics Workspace Admin

To be clear, you can run Planning Analytics (PA) without Planning Analytics Workspace (PAW) and therefore there is a difference between a user who has admin access in PA versus a user with admin access in PAW (note that a user can have both but might not). You can use Planning Analytics administration clients to administer your data and models, while a Planning Analytics Workspace administration client can be responsible for managing PAW users and assets, such as a book, view, folder, modeling workbench, application, or plan). As previously noted, workspace automatically assigns the very first account that logs in as the “PAW Admin account”, then the user of that account can assign the PAW admin role to any existing PAW user through the Administration panel (and then clicking on “Users and Groups”). From there, you check/select the user and then select the “Administrator” role from the drop-down list. Multiple users should have PAW Admin privileges, but you should limit and monitor who you grant this access to. The default PAW user role for all users is Analyst.

Moving On

Once you have confirmed that you are a Planning Analytics Workspace Administrator (not a PA Administrator), you can move on to trying out some of your “administrator abilities”, such as monitoring and managing activity. Activity within a Planning Analytics database is typically tracked and measured with “threads”. A thread is a request to the Planning Analytics server to do some work; typically, a query such as a user opening a view of data, or it could be a TurboIntegrator process performing some sort of processing, rule calculation refreshes, or even a user logging in, etc. Users active within Planning Analytics Workspace also show as threads.

Threads are identified with an ID, Type (user, worker, chore, system) and Name. Thread IDs are (system assigned) unique numeric IDs for each thread. The Thread Name is the actual name of the “user” who initiated the thread (in some cases it may be a Planning Analytics initiated request such as “Pseudo” or other name).

Threads will “pass through” various states, such as Idle, Wait, Running, Commit, Rollback and Login. Each state has a different meaning:

  • Idle: An idle thread is not using resources. This may be a user who has successfully logged in but is currently not performing any activity.
  • Wait: A waiting thread is, in fact, “waiting” on other threads and cannot complete its work. We say this thread is currently ‘blocked”.
  • Running: A running thread is happily performing its request.
  • Commit: A thread that is in a “commit” state is one that has just completed an update action (like changing data values) and is now “committing” those updates. In other words, the changes are being “finalized”. Even though a change has been applied to a data value, it is not 100% complete until it is “committed”. Changes applied but not yet committed can be “rolled back” to their original value.
  • Rollback: A thread in a rollback state is just that; in the process of “rolling back” to a state before an update or change was applied.
  • Login: This thread simply indicates that a user is logging into Planning Analytics.

A “blocked thread” is bad, mostly, because the Planning Analytics server cannot complete the request for some reason and the thread is “waiting”. Typically (hopefully!) blocks eventually “clear” and the thread completes within an acceptable period of time, however in some cases, due to a variety of reasons, blocked threads can cause more threads to become blocked, and you’ll have a problem. Some blocking is normal, but if you see an upsurge of “wait” threads or blocked threads becoming more routine, or notice that “wait times” are becoming longer, you have to determine the root cause (QueBIT has plenty of experience in this area and is ready to help – contact us for more information!).

Occasionally you will encounter a thread in a rollback state. This indicates the thread “encountered some sort of conflict” while performing a commit and could not proceed. The thread will automatically “re-try” until the conflict is resolved. Normally, this is a good thing, ensuring that the threads’ work is completed but a “commit-rollback-commit” scenario has the potential to quickly “roadblock” other threads which in turn can impact performance.

Detailed Threads Report

As an administrator, you have access to the Threads report (example shown below). The report is displayed in a table format showing the details on every thread in the database. This will look familiar to anyone who used the TM1TOP utility with older versions of IBM Planning Analytics or IBM Cognos TM1. The Threads report includes many insightful data points each displayed as individual columns within the report. You can click on the Manage Columns icon (circled in the image) to selectively hide or show any of the available columns in the report. Note that your column selections are saved as your preferences for the next time you access and/or refresh the report. Hint: fewer columns selected to be displayed in the report may allow the report to display faster as well as increase readability. The Threads Report also provides you with a Total Thread Count (at the bottom of the report).

Some of the more interesting or “quick info” data points in this report include:

  • ID: the unique numeric ID of the thread.
  • Name: the name of the user who initiated the thread.
  • State: current thread “state”.
  • Type: system generated, or user generated.
  • Function: The API function being executed by the thread.
  • Wait: displays the length of time, in seconds, the thread has been in a wait state.
  • Elapsed: indicates the total elapsed time of the thread in its current state.
  • W/R/Ix Locks: if a thread is currently blocked, this field displays the Thread ID of the thread that is blocking the waiting thread.
  • Context: Can be used to determine context of a thread, for example “Workspace” or “Architect”.

Note: You can read the particulars of every column (data point) in the threads report in the “Monitor and manage database activity” section of the IBM Knowledge Center by clicking here.

Actions based upon the Threads Report

In addition to monitoring the current activity (in threads) in your Planning Analytics database, from the Threads report, you can also cancel any non-system thread by clicking on any thread’s ellipsis icon (the 3 vertical dots), then clicking Cancel thread:

You can also disconnect any user by clicking any non-system thread’s ellipsis icon and then clicking Disconnect user.

Conclusion

The PAW administration role can be very useful as with it you can easily manage activity and some key environmental configurations within PA and PAW without resorting to utilizes such as TOP or having to log into the PA host server.