NexusFi: Find Your Edge


Home Menu

 





NinjaTrader with 16+ cores


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one Big Mike with 37 posts (33 thanks)
    2. looks_two JohnnyB with 17 posts (9 thanks)
    3. looks_3 NetTecture with 13 posts (2 thanks)
    4. looks_4 Eubie with 3 posts (0 thanks)
      Best Posters
    1. looks_one wavey with 1 thanks per post
    2. looks_two Big Mike with 0.9 thanks per post
    3. looks_3 JohnnyB with 0.5 thanks per post
    4. looks_4 NetTecture with 0.2 thanks per post
    1. trending_up 44,177 views
    2. thumb_up 52 thanks given
    3. group 26 followers
    1. forum 102 posts
    2. attach_file 20 attachments




 
Search this Thread

NinjaTrader with 16+ cores

  #21 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Frequency: Every few days
Duration: Weeks
Posts: 50,463 since Jun 2009
Thanks Given: 33,236
Thanks Received: 101,661


NetTecture View Post
BUT: All that would be execution time, it would NOT show up in lower CPU utilization. Example HyperThreading - it may have to wait on "thread 2" for resources, but it would still show up 100% cpu utilization properly.

You can Google HyperThreading and learn that in many situations disabling it will offer superior performance. I asked him to time the tests with HT on and HT off. Not to measure CPU difference between the two tests.

Mike

We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor
Searching for trading reviews? Review this list
Lifetime Elite Membership: Sign-up for only $149 USD
Exclusive money saving offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on Twitter Visit my NexusFi Trade Journal Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Quant vue
Trading Reviews and Vendors
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
REcommedations for programming help
Sierra Chart
MC PL editor upgrade
MultiCharts
Trade idea based off three indicators.
Traders Hideout
 
  #22 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Frequency: Every few days
Duration: Weeks
Posts: 50,463 since Jun 2009
Thanks Given: 33,236
Thanks Received: 101,661

Quick test:

With HT enabled = 54 seconds
With HT disabled = 42 seconds, a 25% improvement in speed

This is the first time I loaded NinjaTrader in well over two years!

Video attached. Strategy attached.

This is on my Chicago dedicated trading box, a single X3450. I can't test on my i7 home workstation right now, too much going on to reboot and disable HT.

Mike

We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor
Searching for trading reviews? Review this list
Lifetime Elite Membership: Sign-up for only $149 USD
Exclusive money saving offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Attached Files
Elite Membership required to download: CPUTest.cs
Elite Membership required to download: Nt1-1-1.mp4
Follow me on Twitter Visit my NexusFi Trade Journal Started this thread Reply With Quote
Thanked by:
  #23 (permalink)
 NetTecture 
Szczecin
 
Experience: Intermediate
Platform: Ninja, writing own now
Posts: 211 since Mar 2010



Big Mike View Post
Quick test:

With HT enabled = 54 seconds
With HT disabled = 42 seconds, a 25% improvement in speed

This is the first time I loaded NinjaTrader in well over two years!

Video attached. Strategy attached.

This is on my Chicago dedicated trading box, a single X3450. I can't test on my i7 home workstation right now, too much going on to reboot and disable HT.

Mike


I never said it would not be slower. I said it would not cause lower CPU utilization.

See, HyperThreading shares ressources of teh CPU between two threads. CPU utilization says how busy the CPU is. A CPU waiting for the other thread to release resources is busy.

So, if the CPU is fully used, it may FINISH testing faster iwhtout hyper threading, but both scenario should show the CPU utilization in task manager clsoe to 100%. Task amnager does not show some magical "operations per second" it basicalyl show "time CPU is busy dealing with threads scheduled from the operating system" comapred to "time CPU core is not used by operating system". Again, whether or not "1 core with 1 thread" is faster in cycles per second than "1 core with 2 threads" is totally irrelvant for the CPU utilization graph. It simply does not know WHAT the cpu is busy with.

The fact that NInja does not manage to get the CPU up to 90% upward - regardless of how fast the backtests actually execute - show it is not scheduling effectively.

Inosfar your comments are irrelevant - they do not address my comment at all, instead talking about how many seconds it takes. Fact is, NinjaTrader does not schedule enough threads efficiently enough to keep all visible cores busy most of the time. I personalyl set 90% as the minimum for effective use (it is very hard to get 16+ threads properly organized in many applications) with 95% as "full use" limti (mostly because it is sometimes VERY hard to get the view to 100%).

Ninja should have no problem getting the CPU pretty much hit the top of the line (100%) most of the time. Backtesting is a perfectly scalable algorithm, every backtest is totally independant, only returning to the coordination system when it is finished to write the resutls back to the manager. As Ninja seems to build all price data in memory during a prep phase (disc IO is very low during backtests) this also can not be the limit.

Reply With Quote
  #24 (permalink)
 
NJAMC's Avatar
 NJAMC 
Atkinson, NH USA
Market Wizard
 
Experience: Intermediate
Platform: NinjaTrader 8/TensorFlow
Broker: NinjaTrader Brokerage
Trading: Futures, CL, ES, ZB
Posts: 1,970 since Dec 2010
Thanks Given: 3,037
Thanks Received: 2,395


Big Mike View Post

This is the first time I loaded NinjaTrader in well over two years!


Mike

Welcome back to the dark side....

Nil per os
-NJAMC [Generic Programmer]

LOM WIKI: NT-Local-Order-Manager-LOM-Guide
Artificial Bee Colony Optimization
Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #25 (permalink)
 JohnnyB 
Chicago, IL
 
Experience: Advanced
Platform: prop
Trading: Options
Posts: 38 since Jan 2012
Thanks Given: 23
Thanks Received: 18


Quoting 
And for comparison sake, you might try just the built-in MA Cross Over strategy and post the same screenshots? To see if a simpler strategy has better CPU utilization.

I'll run the tests using the built-in MA Cross Over strategy tonight, w/o HT.


Quoting 
If you are really wanting to increase the performance, I think you could eliminate the SMA, EMA, ADX and DMI calls externally, and just build them in as internal functions to return Double's since you likely only need the current value, or perhaps the current value and the 1 prior value.

Great tip! Thanks! Can you point me to an example?


Quoting 
Are you using genetic or brute force exhaustive optimization?

I'm new to NT7 and not familiar with using genetic or brute force exhaustive optimization in NT7. Are these options in the standard optimizer or do I need to use a custom optimizer?


As for HT On or Off, I've seen it go both ways. It depends too much on the activity, code, load, and systems architecture. One really needs to test it both ways...


BTW, great forum software! really like the features. Thanks! JB

Reply With Quote
  #26 (permalink)
 NetTecture 
Szczecin
 
Experience: Intermediate
Platform: Ninja, writing own now
Posts: 211 since Mar 2010

Actualy attempt done today. It looks with the brute force optimizer it uses all cores, the genetic one is not that efficient in scheduling. Trying to play with parameters to see whether i can get it to execute more parallel optimizations. Non-Generic uses up the CPU nicely.

Btw., Hyper-Threading is likely less efficient - Ninja seems to use double a lot, and the one item that is not shared (i.e. a scarce resoruce) betwen the two threads is the FPU. hyper-Threading is pretty much designed for scenarios where math is not "the primary operation" of the threads. Need to look up details, though. What I wonder is though is that it is SLOWER.

Reply With Quote
  #27 (permalink)
 JohnnyB 
Chicago, IL
 
Experience: Advanced
Platform: prop
Trading: Options
Posts: 38 since Jan 2012
Thanks Given: 23
Thanks Received: 18


JohnnyB View Post
I'm new to NT7 and not familiar with using genetic or brute force exhaustive optimization in NT7. Are these options in the standard optimizer or do I need to use a custom optimizer?

Found the answers to this question! Great site and I need to search before I ask!

Thanks - JB

Reply With Quote
Thanked by:
  #28 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Frequency: Every few days
Duration: Weeks
Posts: 50,463 since Jun 2009
Thanks Given: 33,236
Thanks Received: 101,661


JohnnyB View Post
Great tip! Thanks! Can you point me to an example?

The strategy I attached a couple posts back has the EMA built in to it, as an example -- instead of calling EMA().

Mike

We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor
Searching for trading reviews? Review this list
Lifetime Elite Membership: Sign-up for only $149 USD
Exclusive money saving offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on Twitter Visit my NexusFi Trade Journal Started this thread Reply With Quote
  #29 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Frequency: Every few days
Duration: Weeks
Posts: 50,463 since Jun 2009
Thanks Given: 33,236
Thanks Received: 101,661

Daddy wants.

AnandTech - The Xeon E5-2600: Dual Sandy Bridge for Servers

Mike

We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor
Searching for trading reviews? Review this list
Lifetime Elite Membership: Sign-up for only $149 USD
Exclusive money saving offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on Twitter Visit my NexusFi Trade Journal Started this thread Reply With Quote
Thanked by:
  #30 (permalink)
 JohnnyB 
Chicago, IL
 
Experience: Advanced
Platform: prop
Trading: Options
Posts: 38 since Jan 2012
Thanks Given: 23
Thanks Received: 18


Here are the Task Manager screens on my workstation. HT off was faster. CPU usage still averaged on 40%.

Attached Thumbnails
Click image for larger version

Name:	BruteForceSimpleMA.JPG
Views:	203
Size:	325.1 KB
ID:	65199   Click image for larger version

Name:	BruteForceSimpleMAHToff.JPG
Views:	209
Size:	361.2 KB
ID:	65200   Click image for larger version

Name:	GenericSimpleMAHToff.JPG
Views:	205
Size:	357.7 KB
ID:	65201   Click image for larger version

Name:	GeneticSimpleMA.JPG
Views:	195
Size:	313.8 KB
ID:	65202  
Reply With Quote
Thanked by:




Last Updated on October 1, 2014


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts