Page 1 of 1

MTQ Question - Not using more CPU

Posted: Mon Mar 19, 2018 8:41 pm
by crichter
Hello all,

I have a question regarding MTQ, where it seems that MTQ is in effect, but CPU usage isn't increasing compared to MTQ=1. Running a TI process uses by definition 1 thread corresponding to 1/16=~6% CPU use:
ATT00003.png
ATT00003.png (7.23 KiB) Viewed 4906 times

When querying a cube using MTQ=-1 I would expect the query to use (16-1)/16 = ~94 % of the CPU, but it never exceeds the 6% above. In TM1Top we can see that MTQ is running on 15 threads however:
ATT00004.png
ATT00004.png (45.71 KiB) Viewed 4906 times

Please advice why the MTQ setting doesn't utilize the full CPU capacity?

(Virtual) Machine Info:
Windows Server 2012 R2 Standard
Processor: Intel Xeon CPU E5-2660 v4 @ 2.00 GHz - 16 Virtual Processors
RAM: 64GB (~50% used)
TM1 Version: PA 11.1.0.30

Re: MTQ Question - Not using more CPU

Posted: Tue Mar 20, 2018 9:34 am
by Steve Rowe
Hi,
Difficult to answer this exactly but unless you are on a very current release then MTQ does not work on views that are the datasource for a TI, you need to pre-calculate the view first (ViewConstruct) and then use it as the source.

Re: MTQ Question - Not using more CPU

Posted: Tue Mar 20, 2018 9:50 am
by RSK
Running TI's are single threaded, the MTQ setting is specifically for opening views.

There was mention of making TI's multithreaded at the IBM update I was at last year, not sure what the update currently is.

Re: MTQ Question - Not using more CPU

Posted: Tue Mar 20, 2018 10:02 am
by crichter
Hi and thank you for your answers!

I think I may have stated my question a bit wrong. I'm asking the more general question "why doesn't MTQ use the full capacity of the processor?" (regardless of TI processing). I.e. when opening a cube view or a Websheet we see that it's splitting the query on 15 threads but it's still only using 6% of the CPU when i would expect it to use (16-1)/16 = ~94% with MTQ set to -1.

Are there any server prerequisites that needs to be in place in order for MTQ to work properly? (I've searched but haven't found any info on this).

Re: MTQ Question - Not using more CPU

Posted: Tue Mar 20, 2018 11:14 am
by tomok
Why would you expect TM1 to use 94% of CPU capacity. I don't know of many programs that would use all the available capacity on a computer when processing something. Does Excel use 100% of the CPU on your machine when you calculate a workbook? MTQ splits the query among the available cores. TM1 is still going to use only as much computing capacity of each of those cores as it needs to render the result

Re: MTQ Question - Not using more CPU

Posted: Tue Mar 20, 2018 11:22 am
by Steve Rowe
A complete guess from your screen shot..
The view and cube you are working with is rule based and the rule dependency with the attribute cube was not built at the time the view was requested. This forces the system single threaded when the dependency is added.

Does anything show in the logs? You can probably turn the logging up as well to see what's going on under the hood. (https://www.ibm.com/support/knowledgece ... 60693.html)

I'm not aware of anything on the hardware / cfg side required to activate MTQ.

My belief (its a long time since I tested) is that heavy rule based views are less able to benefit from MTQ than pure numbers.

Re: MTQ Question - Not using more CPU

Posted: Tue Mar 20, 2018 10:17 pm
by crichter
Why would you expect TM1 to use 94% of CPU capacity
Ok, I see your point that TM1 shouldn't need to use the full capacity of the MTQ setting for all querys, but in this case the query had been running for up toward a minute and still it's only using the equivalent of one thread of the CPU. I'm trying to figure out if I can make it more efficient.
The view and cube you are working with is rule based and the rule dependency with the attribute cube was not built at the time the view was requested. This forces the system single threaded when the dependency is added.
You are completely right! I've tried enabling more detailed logging and will continue down this path to see if I can find anything of use. I will also attempt to pre-establish cube dependencies to see if this will improve performance.

The reason I asked my original question is that we're experiencing a situation where the response times in our web sheets used in TM1Web is lightning fast (<1s), until suddenly a query can start running for >60s without warning and I always see the MTQ working but CPU use not increasing and thought this might a possible area of improvement. I'd really appreciate any other ideas on what could be done to resolve this.

Thank you again for your responses!