Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

NT8 not using multiple cores when loading/rebuilding charts

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    NT8 not using multiple cores when loading/rebuilding charts

    Hi, I have a AMD Ryzen 7 1700X processor with 32 GB RAM on Windows 10 Pro. Whenever I run NT8 on this rig, my CPU use never really goes above 12-13% when loading charts or reloading historical data on charts. Since the CPU has 8 cores (16 threads), it seems to me NT8 only uses a single core. Isn't NT8 supposed to be using all cores even with these types of operations?

    I have also checked the Strategy Analyzer. I ran the Sample MA Crossover Strategy. Based on the settings it ran for a few minutes and while it was working the highest CPU use for NT8 I saw was 17-18%.

    Is there something I could do to remedy this?
    Is NT8 not using multiple cores on Ryzen CPUs?
    Last edited by laszlonagy; 12-14-2017, 09:13 AM.

    #2
    Hello,

    Thank you for the post.

    The way that applications interact with your CPU is completely determined by your operating system. Have you used the resource monitor to check each individual core? It will show you a graph of each CPU core as well as tell you which core each process is using.

    Please see this publicly available link on the Resource Monitor.
    Wouldn’t it be nice if you had a way of finding out what has gone wrong: whether it is the processor use, the RAM use, a program acting up, or something else? That is why the Resource Monitor exists, in Windows.


    Please let us know if we may be of any further assistance.
    Chris L.NinjaTrader Customer Service

    Comment


      #3
      NT8 not using multiple cores

      Hi Chris,

      I checked the Resource Monitor. I have created 2 screenshots.
      The first one shows NT8 CPU usage. This screenshot was taken while NT8 was running a Strategy Analysis. I am supposing it should be using all CPU resources, so it Average CPU number should be over 80, and Total CPU Usage should be around 100%:



      As you can see, its Average CPU is around 12-13, and Total CPU Usage is 14%. On the right you can also see from the green graphs that the individual cores are hardly used.

      The screenshot shows the CPU usage while doing a rendering with the rendering application called CineRender (Cinema 4D):



      Here, the rendering app is using all cores, all available CPU resources, over 77% (over processes using the rest) and Total CPU Usage is 102%. On the right you can see from the green graphs that the individual cores are used to the max.

      So this is why I am saying that no matter what I do, Ninjatrader 8 does not seem to use more than 1 core of my 8-core CPU.
      Could you guys investigate this? It is pretty disheartening that I cannot use my hardware fully with NT8.

      By the way, this is Ninjatrader 8.0.11.0 64-bit on Windows 10 Pro Fall Creators Update.
      Last edited by laszlonagy; 12-14-2017, 11:02 AM.

      Comment


        #4
        Hello,

        Thank you for the reply.

        NinjaTrader is certainly using all of your CPU cores. The multithreading code for NinjaTrader is abstracted to be independent of your computers hardware architecture. The code that is written communicates with Windows, then Windows will decide which core to use. The rendering program's time complexity is much greater than the algorithm that the Strategy Analyzer uses so this render will crank the CPU. You can see that The NinjaTrader process is running on core #7

        Please let us know if you have any questions.
        Chris L.NinjaTrader Customer Service

        Comment


          #5
          So, what I understand is that I incorrectly assumed that multi-threading in Ninjatrader would mean that it may use 100% of all cores when performing various tasks such as Strategy Analysis. There are use cases in other programs when this can happen, like when rendering an image, or when creating a video file, or when playing a game (there 100% of GPU is used). But Ninjatrader is mostly not performing such operations, even though it is multi-threaded, for example it can generate chart data for multiple charts at the same time.
          I think I get it now. Thanks for the clarification.

          Comment


            #6
            I am currently developing a strategy that uses Bloodhound and makes heavy use of third party indicators and heavy database interaction. Currently having problems with lagging and the charts freezing in NT8. Using a quad core i7 with 16 GB RAM (around 4 years old). I think there might be some issues with the code so will look at this first. Would you advise that generally more power is better so for example a state of the art core i9 machine with 10 cores , 32 GB ram, SSD drive , 11 GB graphics card etc would mean that I am less likely to experience problems with lagging/system freeze - (assuming problems with code have been ironed out)? Also is explicit use of multithreading beneficial so for example if reading/writing to multiple tables per second might benefit from asynchronous processing especially with a high spec machine?

            Comment


              #7
              Hello mballagan,

              Thank you for the post.

              The fastest CPU will handle very large workspaces well. As long as your script is optimized, any CPU from the recommended specs will work.

              https://ninjatrader.com/support/help...quirements.htm - System Requirements.

              You may also review recommended performance tips here:



              Please let me know if I can assist further.
              Chris L.NinjaTrader Customer Service

              Comment


                #8
                I'm going to add my own 2-cents here. mballagan - I confirm your results. I've tried both raw NinjaTrader strategies as well as Bloodhound/Blackbird and BT8 simply cannot use more than a few cores and threads. I've been testing on the latest Ryzen processor [AMD 2nd Gen RYZEN Threadripper 2990WX 32-Core, 64-Thread, 4.2 GHz Max Boost (3.0 GHz Base), Socket sTR4 250W YD299XAZAFWOF Desktop Processor] on Windows 10 Pro. This machine is a beast!

                I've done side by side comparisons with my trading partner... we find NT8 is not leveraging all CPU's effectively scratching about 2-3% of total CPU power available as it powers through Playback testing. We did single playback tests, multiple chart playbacks, etc.

                Needing more info than Task Manager could provide, I went to Resource Manager and viewed all 32 CPUs.
                NT8 is not using them all from what I can tell. I see 8-10 of them providing NT8 computing capacity, but again, overall machine CPU usage was in the single digits.

                Next, I went to the msi motherboard's bios to see what further tweaking I could do and ensuring all 32 CPUs were available. I am aware that other (high end games) use them, but NT8 seems to limit itself to 8-10 of then primarily from what I could tell.

                The only way I could get NT8 to move faster was to increase the clock speed from 3.0 GHz to 4.0 GHz. Sure, it increased the speed, but having a MAC with 4 CPU's (running windows through Parallels 14, now upgraded to 15) and selecting 2 of the 4 CPUs (recommended by Parallels), NT on Ryzen CPU 32 core did not significantly outperform my older 2016 MAC Pro (Cylinder shape). I can't figure out why, if NT8 truly leverages all CPUs. But then again, NinjaTrader makes no suggestions or recommendations because the recommended specs. My trading partner and I have painstakingly went through the NT8 performance tips tweaks, multiple database cleans, raw installs, only to find time and time again, similar lackluster results.

                At this time and with NT8 version 8.0.18.1 (64 bit), processor speed improved NT8 processing speed, relatively, but added CPUs did not outperform my MAC PRO using Parallels.

                If anyone else has any recommendations re: how Windows 10 Pro could be adjusted, or the CPU or Resource Manager or ??, to take advantage of all 32 CPUs, let me know! But for now, I'm sticking with the MAC PRO because it's not worth paying for a $5000 PC machine with all this power if NT8 isn't going to leverage it successfully. I'll willingly accept any other hardware/software pro's advice with regards to other things we could try.

                Don't get me wrong, I really like NT8. Just wish we had more transparency here on performance recommendations re: how to crunch numbers faster via a dedicated, non-cloud workstation.

                -- WEX

                Comment


                  #9
                  Utilizing available cores is a complex process. I suspect based on your results that the way you're utilizing NinjaTrader is 'bottlenecking' one particular thread and increasing the speed of the CPU is increasing the processing speed of the thread NinjaTrader is using for the task you've given it. I'll use an analogy to help describe how this can occur.

                  If you have a 64 lane highway and you need to get 10 cars from point A to point B, those 10 cars will use 10 lanes and get there just as fast as they would on a 10 lane highway. However, boosting their top speed from 30mph to 40mph would increase how fast they get there. (64threads, 3.0 vs 4.0 GHz).

                  Comment


                    #10
                    Originally posted by wildwex View Post
                    I'm going to add my own 2-cents here. mballagan - I confirm your results. I've tried both raw NinjaTrader strategies as well as Bloodhound/Blackbird and BT8 simply cannot use more than a few cores and threads. I've been testing on the latest Ryzen processor [AMD 2nd Gen RYZEN Threadripper 2990WX 32-Core, 64-Thread, 4.2 GHz Max Boost (3.0 GHz Base), Socket sTR4 250W YD299XAZAFWOF Desktop Processor] on Windows 10 Pro. This machine is a beast!

                    I've done side by side comparisons with my trading partner... we find NT8 is not leveraging all CPU's effectively scratching about 2-3% of total CPU power available as it powers through Playback testing. We did single playback tests, multiple chart playbacks, etc.

                    Needing more info than Task Manager could provide, I went to Resource Manager and viewed all 32 CPUs.
                    NT8 is not using them all from what I can tell. I see 8-10 of them providing NT8 computing capacity, but again, overall machine CPU usage was in the single digits.

                    Next, I went to the msi motherboard's bios to see what further tweaking I could do and ensuring all 32 CPUs were available. I am aware that other (high end games) use them, but NT8 seems to limit itself to 8-10 of then primarily from what I could tell.

                    The only way I could get NT8 to move faster was to increase the clock speed from 3.0 GHz to 4.0 GHz. Sure, it increased the speed, but having a MAC with 4 CPU's (running windows through Parallels 14, now upgraded to 15) and selecting 2 of the 4 CPUs (recommended by Parallels), NT on Ryzen CPU 32 core did not significantly outperform my older 2016 MAC Pro (Cylinder shape). I can't figure out why, if NT8 truly leverages all CPUs. But then again, NinjaTrader makes no suggestions or recommendations because the recommended specs. My trading partner and I have painstakingly went through the NT8 performance tips tweaks, multiple database cleans, raw installs, only to find time and time again, similar lackluster results.

                    At this time and with NT8 version 8.0.18.1 (64 bit), processor speed improved NT8 processing speed, relatively, but added CPUs did not outperform my MAC PRO using Parallels.

                    If anyone else has any recommendations re: how Windows 10 Pro could be adjusted, or the CPU or Resource Manager or ??, to take advantage of all 32 CPUs, let me know! But for now, I'm sticking with the MAC PRO because it's not worth paying for a $5000 PC machine with all this power if NT8 isn't going to leverage it successfully. I'll willingly accept any other hardware/software pro's advice with regards to other things we could try.

                    Don't get me wrong, I really like NT8. Just wish we had more transparency here on performance recommendations re: how to crunch numbers faster via a dedicated, non-cloud workstation.

                    -- WEX
                    WEX,

                    Thanks for the heads up.

                    I bought an 18 core corei9 machine with 64GB RAM around a year ago. This has improved performance from my old machine and I have now removed Bloodhound as everything is done directly in code. However dependent on which indicators/strategies are loaded on the charts Ninjatrader 8 still struggles at times especially during volatility. For example one of my indicators is crunching market depth (limit order) data and this seems to especially hit performance. The machine I have should be able to handle this. I have used multithreading in some of my code to optimize performance but this could be causing issues also. The CPU does get up to about 90-95% usage at times but not sure about the core utilization. I am tempted to upgrade to a 64 core Threadripper at some point but from your experience this might not be a quick fix....

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by jaybedreamin, Today, 05:56 PM
                    0 responses
                    2 views
                    0 likes
                    Last Post jaybedreamin  
                    Started by DJ888, 04-16-2024, 06:09 PM
                    6 responses
                    18 views
                    0 likes
                    Last Post DJ888
                    by DJ888
                     
                    Started by Jon17, Today, 04:33 PM
                    0 responses
                    1 view
                    0 likes
                    Last Post Jon17
                    by Jon17
                     
                    Started by Javierw.ok, Today, 04:12 PM
                    0 responses
                    6 views
                    0 likes
                    Last Post Javierw.ok  
                    Started by timmbbo, Today, 08:59 AM
                    2 responses
                    10 views
                    0 likes
                    Last Post bltdavid  
                    Working...
                    X