PDA

View Full Version : Why only 50% of load while using Strategy Optimizer


whitegun
11-04-2007, 02:37 AM
My machine has a AMD Athlon 64 X2 Dual Core Processor 4400+ and 3GB of RAM.
When I run a strategy optimizasion I get the message, please wait... and see that the remaining time for the optimizasion is 2 hours for example but the Windows Task Manager shows me that I never use more than 50% of CPU and only 400MB of RAM.!
So, if my system still has plenty of RAM why does not Ninjatrader loed the CPU 100% and do the job in half the time (1 hour)??
What is restringing Ninjatrader to do the job faster if there is still plenty of memory and CPU and no other programs open?? Eaven if there were other programs working ninja could use easily 70 or 80% of CPU (the machine is fast) but seems its capped to 50%:confused:, why??

KBJ
11-04-2007, 03:41 AM
Since your CPU is dual-core, it can process two threads at a time. If it only processes one thread, then only 50% of your CPU will be in use.

See this reference for more info on how this works: Dual Core - Software Impact (http://en.wikipedia.org/wiki/Dual_core#Software_impact)

So, unfortunately the StrategyAnalyzer runs as a single thread, so it can only use 50% of the CPU.

whitegun
11-04-2007, 05:03 AM
Hello KBJ, thanks for the replay.

I am not totaly shure if it is totaly right what you are saying (even teoreticly it is!) because the task meneger shows the load for each of the CPS and each of them has a load of 50%, not 1 100% and the other one 0% and the total is 50%.
If you are right, is there any way arround it?
I mean, I have some strategies wich I would like to optimize but like this it will take an eternity. I tought of buying a more powerful PC but now a days you get more power not from MHZ but from more cores.
This would mean that the strategy optimizer is useles for a lot of strategies because eaven if I run Ninja on a powerful cuadcore CPU or on a server sistem with 8+ cores it would still be the same slow!
I can not belive that it is so restrictet!?

NinjaTrader_Dierk
11-04-2007, 05:33 AM
KBJ is right. Same situation on my dual core here. Unfortunately there is not way around right now. We have it on our list for V7 (end of next year) though

whitegun
11-04-2007, 07:50 AM
End of next year only:( :mad:

I realy love ninja but this is a very very very big negative point.

Shure there is no wey arround it (maybe some 3 partie program wich can split the treat in 2 and use bouth cores)?

I realy hate need to loke for an other program only because of this (while I love ninja in any other aspect and already get used to it)!!:mad: :mad:

NinjaTrader_Dierk
11-04-2007, 09:15 AM
Thanks for your comments.

KBJ
11-05-2007, 12:00 AM
Please see my post (here: http://www.ninjatrader-support.com/vb/showpost.php?p=18978&postcount=5) for some ideas on how to get your optimizations done much more quickly.

Ragingbull
11-06-2007, 09:06 AM
Hello everyone,

Does the use of a Vista 64 bits operating system would not solve the problem and improve the speed in case of using a dual or a quad-core processors? As far as I understand, Vista 64 bits seems to be designed to make use of the full power of all processors. The bottleneck might be Ninja, not able to run on multiprocessors...

Does anyone have a clue if this is right?

NinjaTrader_Dierk
11-06-2007, 09:17 AM
NT does not support 64 bit windows system. NT does support 64 bit processors though.

zoltran
11-06-2007, 09:30 AM
Ragingbull

Vista 64 or any other OS cannot universally make any program use all CPU's. It's no better than XP or Win2K or Linux or whatever in this regard. This has been a classic dilemma since the earliest multiprocessor mainframes were created (yes .. I was there)

Yes, it may (or may not) be better at working with multi-processors, but the task at hand must be broken into multiple parts to be 'dispatched' to another CPU. Often this doesn't make sense.
And often.. the cycle cost to manage all these parts end up making the exercise not worth while.

Massively parallel systems with 100's or 1000's of cpu's were 'supposed' to be the next great thing a few years ago. They excel in some specialized areas ,, but you don't hear much about them as general purpose systems anymore.

In the case of a backtest .. it has to sequentially run thru every bar of data one-after-the-other-in-sequence. You can't start work on the next bar until all the work is done for the current bar.

Multiple CPU's don't help here.

The certainly do help with mutli-tasking many programs at once.

And you could see how Strategy Optimisation could be split into many threads .. one for each iteration.

woodside
11-06-2007, 03:08 PM
NT does not support 64 bit windows system. NT does support 64 bit processors though.


Does this mean that NT doesn't take advantage of 64 bit windows? NT does work, I'm running NT on vista 64 with no issues.

-Erik

NinjaTrader_Dierk
11-06-2007, 03:12 PM
We recommend not running NT on Windows 64 bit since users experienced issues.

Ragingbull
11-14-2007, 03:35 AM
Thank to all of you for your answers.

But, if I understand it well then, we better be looking for the most performant mono or dual core processor. Which is ....MHz?

I guess that this is the best that we can hope and increasing RAM above 2GiB will not be of any help to improve the performance.

Is this correct?

NinjaTrader_Dierk
11-14-2007, 05:02 AM
Processor speed matters

KBJ
11-14-2007, 11:04 PM
I've found that with enough charts, SuperDOMs, etc. open (especially with non-standard NinjaScript indicators and strategies), memory may also become an issue (especially when running non-NinjaTrader applications which use a lot of memory on the same system).

I have Vista with only 2GB, so I can only guess what might happen with more memory than this.

NinjaTrader_Chris
11-15-2007, 07:36 AM
Hello,

Thanks for your comments.

zoltran
11-15-2007, 11:32 AM
Thank to all of you for your answers.

But, if I understand it well then, we better be looking for the most performant mono or dual core processor. Which is ....MHz?
?

Bull

A dual (or other multi-CPU) machine is still of great use on a trading machine.
You will run many other programs, such as your broker interface, R/T Quote provider, etc. (For example IB TWS and Esig/IQFEED).
You'll also likely have Excel, word and a few web browser sessions open, as well as an email program.
Ninja also seems to run each chart in it's own thread... (just a guess)

So all of these separate programs/threads can be spread or 'dispatched' to any of your multi-cpu. This is a huge benefit on high volume days like we've seen..,.. .. This will cause NT and your quote provider to both get very busy :eek: .. but a dual-core box will handle this much better than a single CPU.

So... for backtesting/optimization ... the fastest CPU you can get is important.. as well as ram.
For day-day trading .. dual/quad core have many benefits

Hope this helps.

Ragingbull
11-17-2007, 10:46 AM
Thanks Zoltran, it is exactly was I was looking for confirmation.

Best regards.

fifty2aces
12-05-2007, 09:46 AM
Ninja also seems to run each chart in it's own thread... (just a guess)



Can anyone confirm this? Does NinjaTrader as a whole run on a single core, or can different elements (charts, DOMs, T+S etc) run on different cores? I'm planning to get a new PC soon, and deciding whether to go for a dualcore or quadcore.

NinjaTrader_Dierk
12-05-2007, 09:49 AM
All UI components (including charts run in the same "main" thread). This is how windows apps work.

dwt__
01-04-2008, 11:29 PM
I don't suppose it's possible to open two instances of NT, each with about half the required charts, etc?

dwt

NinjaTrader_Dierk
01-04-2008, 11:49 PM
Correct, this is not possible.

andrewdale
01-20-2008, 03:56 AM
If you were backtesting or optimising the same strategy on several different instruments, then it would just be a matter of sending the process for the calculations for each individual instrument to a seperate core.

I imagine in theory that this wouldn't be too complicated programming wise, although I do appreciate that in practice things can turn out to the contrary.

Considering practically all new PCs are dual core and an increasing number are quad core, are there any plans for future developments to incorporate this kind of functionality?

NinjaTrader_Dierk
01-20-2008, 05:48 AM
We already have this on our list for future considerations. Thanks for your suggestion.