Search code examples
graphdb

GraphDB 8.9 query monitoring: nsTotalSpentInNext not showing


I'm using GraphDB 8.9 to benchmark some software I wrote and want to find out about query performance through JMX as presented here: http://graphdb.ontotext.com/documentation/8.9/free/query-monitoring.html

While accessing the SailIterationMonitor MBean via JControl as well as programmatically works fine and I have access to the TrackRecords attribute, I don't get a value for nsTotalSpentInNext; the value remains -1 regardless the query.

I then switched to GraphDB 7.0 to check whether the problem is version-related. Alas, trying the same queries on the same dataset allowed me to observe values for nsTotalSpentInNext.

I'm using the GraphDB server package on a Linux system, pretty much out of the box. The only bit of configuration I changed was in %GRAPHDB_HOME%/bin/graphdb.in.sh to enable remote access to JMX. Otherwise, I didn't change anything in the configurations.

Has the nsTotalSpentInNext attribute been removed in recent versions of GraphDB?

If not, do I need to enable monitoring of the nsTotalSpentInNext attribute? Possibly upon creation of the repository?


Solution

  • In GraphDB 8.4 the SailIterationMonitor which previously provided support for the query monitoring was replaced with a new implementation - RepositoryMonitor. The old implementation was able to only monitor the queries and not the updates. Now you can see the queries against a list, number of the query and a way to abort it. As a part of the refactoring getNsTotalSpentInNext was deprecated and now return -1 every time as it was a cumulative time spent in the (has)Next calculation. I guess we decided this isn't helpful as it is a total global value. You can take a look at the RepositoryMonitor MBean, which is the new implementation and use msSinceCreated and state instead. We are going to update the documentation, since it's misleading at best right now.