Page 1 of 1

CPU usage only 25%

Posted: Thu Sep 01, 2011 3:53 pm
by mnasra
hi,

I just realized that my TM1sd is only taking 25% of the CPU- I have a lot memory left, but it is not using it.
Is there a parameter that was set by default?

thanks
micheline

Re: CPU usage only 25%

Posted: Thu Sep 01, 2011 4:11 pm
by qml
That is unfortunately expected. One TM1 thread cannot use more than one CPU core. More cores will still pay off if you have more threads running in parallel, e.g. more users reporting simultaneously or, say, multithreaded cube loads.
As far as memory goes - what do you mean it's not using it? TM1 will only use as much RAM as it needs (but it will not make it available to the OS if it doesn't need it anymore). At some point throwing more memory at TM1 if your model does not require it will not bring any gain at all.

Re: CPU usage only 25%

Posted: Thu Sep 01, 2011 7:31 pm
by mnasra
Thank you very much qml-
So if I understand well (and I am not techy at all), I have 4 processors- (each has 25% of the CPU usage), and I have 32GB of physical memory- When I open a view (1 user) it takes 3 minutes and when I look at the Task Manager, it says CPU usage 25% and Physical memory 27%-
So the only way to increase the spead if nothing in Tm1 changes, is to change the CPU (because the memory is not going to give me anything new).

Re: CPU usage only 25%

Posted: Thu Sep 01, 2011 10:40 pm
by qml
mnasra wrote:So if I understand well (and I am not techy at all), I have 4 processors- (each has 25% of the CPU usage), and I have 32GB of physical memory-
You most likely have 1 CPU with 4 cores, which for most practical purposes can be thought of as having 4 single-core processors. And yes, each core working at full speed represents 25% of the total processing power of that chip.
When I open a view (1 user) it takes 3 minutes and when I look at the Task Manager, it says CPU usage 25% and Physical memory 27%-
So the only way to increase the spead if nothing in Tm1 changes, is to change the CPU (because the memory is not going to give me anything new).
I would say adding more memory will not improve performance in any way in this particular scenario. A faster processor, where faster means faster clock, not more cores, might improve performance somewhat, but probably not by enough to bring your refresh times down to acceptable levels. Say - using a huge simplification - you have a 2GHz processor and replace it with a 3GHz processor. That means your report might refresh in roughly 2 minutes instead of 3. Is that really a game changer? I honestly doubt it.
I'd say your best option is to actually look at what can be done to optimise your model and reports themselves. I've seen cases where letting someone who knows what they are doing make a few changes in your environment can turn 3-minute reports into 1-second reports. There is a plethora of possible things to look at. Quality of rules, right usage of feeders, dimension ordering, usage of stargate views, cube "materialisation" and smart report design - to name just a few.
Without knowing anything about your model it's hard to say if there is much that can be improved in terms of performance, but it is definitely the case for a lot of models out there.

Re: CPU usage only 25%

Posted: Fri Sep 02, 2011 2:22 pm
by mnasra
Thanks a million- This really helps.
Micheline

Re: CPU usage only 25%

Posted: Thu Oct 13, 2011 5:15 pm
by pmakulski
QML, as this is a fairly current discussion, I'd like to jump in. I have been wondering the same thing, re my 16 cpu server.
Mostly things run well. But I recently added a rule that looks trivial, but has had a terrible impact on my response time.
I'll descibe my rule in another thread, but for this thread ...
When I ask for a view, the response is taking 600 seconds. 10 minutes, absolutely gross.
But when I ask my IT support to look at the server, they say it isn't doing anything. One of the 16 cpus is pegged at 100%, the rest are doing nothing.
I had been led to believe that the server would provide all the power it had. Your comment above says that I'm limited to one cpu, if I've underestood you correctly.
(Sorry for the vague language, but I'm from the user side, not the tech side.)

Re: CPU usage only 25%

Posted: Thu Oct 13, 2011 5:21 pm
by jim wood
Did you add a feeder for the rule? Also if the rule is not precise it will have an impact as it will cause a memory explosion and will (as you have seen) increase response times. I think you are seeing a different issue here. I would start a new thread (You said you will anyway) with the rule.

Re: CPU usage only 25%

Posted: Thu Oct 13, 2011 6:15 pm
by tomok
pmakulski wrote:One of the 16 cpus is pegged at 100%, the rest are doing nothing.
I had been led to believe that the server would provide all the power it had. Your comment above says that I'm limited to one cpu, if I've underestood you correctly.
I can't speak for version 9.5 (but I'm pretty sure there is no change) but for 9.4 and earlier versions, there is no parallel processing in TM1 for a single user thread. If you ask for a number TM1 is only going to use one processor to calculate it. Assuming you are the only person on the server, the only way to increase the speed of a calculation is to either 1) improve your model so that the calculation is done more efficiently, or 2) buy a faster mhz processor. Additional processors on a box make response times faster only when there are more users asking for data than there are processors, i.e., someone is always waiting in line for an avaalabe processor.

Re: CPU usage only 25%

Posted: Thu Oct 13, 2011 7:37 pm
by lotsaram
Calculation is single threaded per request so your calculation will happen on only one core. If your calculation time is that slow might be worth posting the rule in a separate thread.

Re: CPU usage only 25%

Posted: Wed Oct 19, 2011 10:23 am
by Gabor
Please keep in mind, you need to turn off Hyperthreading on your server, since this simply devides 1 physical processor into 2 virtual samples with 50 % power.
This is a general recommendation for TM1, because even if you have a lot of parallel threads, it's better to have full power for each calculation.

Lets say 8 parallel user on 4 cores (each thread shall take 10 s with 100% of a CPU):
Using HT provides 8 cores
- all threads can start at same time
- but processing time is 20 s for each thread (due to 50% CPU with HT)

Disabling HT provides 4 cores
- first 4 threads can start immediately and show results after 10 s (due to 100% CPU without HT), much faster
- last 4 threads start now and need again 10 s, not slower than with 8 cores and HT

Also,
please have a look at your CPU architecture, last upgrades offer internal overclocking and other features which can boost your calculation(s), but your MHz clock speed does not really tell this.
Floating point benchmarks (=> Specmark) are a good indicator of what you can expect from an upgrade.

Regards
Gabor

Re: CPU usage only 25%

Posted: Wed Oct 19, 2011 11:03 pm
by mattgoff
Gabor wrote:Please keep in mind, you need to turn off Hyperthreading on your server, since this simply devides 1 physical processor into 2 virtual samples with 50 % power.
No offense, but that is completely wrong. You have a fundamental misunderstanding of what hyperthreading (SMT) is and how it works. It does NOT "simply divide" a processor into two. It takes a single physical processor and makes it appear to be two logical processors to the OS by using extra registers (and a few other bits) in hardware. If one thread is idle, the other will run at full speed with all the resources of the physical core. If both threads are active, the hardware scheduler will optimize execution to allow the greatest utilization of the execution units.
Gabor wrote:This is a general recommendation for TM1, because even if you have a lot of parallel threads, it's better to have full power for each calculation.

Lets say 8 parallel user on 4 cores (each thread shall take 10 s with 100% of a CPU):
Using HT provides 8 cores
- all threads can start at same time
- but processing time is 20 s for each thread (due to 50% CPU with HT)

Disabling HT provides 4 cores
- first 4 threads can start immediately and show results after 10 s (due to 100% CPU without HT), much faster
- last 4 threads start now and need again 10 s, not slower than with 8 cores and HT
Nope. Technically, the random thread that gets scheduled first on a non-HT processor would finish faster than it would have on an HT-enabled processor (at the expense of the other thread). But the combined processing time is absolutely lower on average if HT is enabled. This is due to dramatically superior execution unit utilization. It's not 10s + 10s = 20s, it's 10s & 10s = 14s. On average, this means that users will see faster results with HT enabled. The exception to this is if both threads are fighting over SSE, and it's unclear if/how TM1 makes use of this. I've never seen it benchmarked either.
Gabor wrote:Also, please have a look at your CPU architecture, last upgrades offer internal overclocking and other features which can boost your calculation(s), but your MHz clock speed does not really tell this.
Floating point benchmarks (=> Specmark) are a good indicator of what you can expect from an upgrade.
If you overclock a production database, you're asking for all the trouble you're going to get. The cost of better hardware is practically nothing when compared to TM1's and personnel cost.

Matt

Re: CPU usage only 25%

Posted: Thu Oct 20, 2011 10:18 am
by qml
mattgoff wrote:If you overclock a production database, you're asking for all the trouble you're going to get. The cost of better hardware is practically nothing when compared to TM1's and personnel cost.
I'm pretty sure Gabor meant the Intel Turbo Boost technology which provides dynamic, hardware-driven overclocking, which results in a significant peak speed gain for single threaded tasks. This has nothing to do with the more traditional meaning of processor "overclocking".

Re: CPU usage only 25%

Posted: Fri Oct 21, 2011 1:17 pm
by Gabor
@ qml: Thank you for the clarification, that's what I was talking about.

@ mattgoff: I made my comments in reference to extensive testing, not the HT booklet.

Re: CPU usage only 25%

Posted: Fri Oct 21, 2011 2:25 pm
by mattgoff
Gabor wrote:@ mattgoff: I made my comments in reference to extensive testing, not the HT booklet.
Yes, testing is always better than theory. Unfortunately, the results you describe are not possible-- if they were, enabling HT (or SMT by any vendor) would cut single-threaded performance in half.

Matt