Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Optimizer and threads

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

    Optimizer and threads

    Optimizer doesnt always use all threads available...why is this?

    #2
    Are you using a bool or enum in your code with the GA? Then it would be limited to one thread only unfortunately - to remove this limitation you can use the regular optimizer or instead switch to int inputs for example.
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Bertrand, i knew of that limitation and no i am not using either. I dont know what the issue is.

      Comment


        #4
        Please clarify what you attempt doing exactly - what kind of system are you using? How many cores are available? Are you working with the GA or default exhaustive optimizer here?
        BertrandNinjaTrader Customer Service

        Comment


          #5
          Simple system. I have one long entrance, and 2 exits, a stop and a limit. Managed Exits.

          Genetic Optimizer, i have 4 cores available. (physical)

          Comment


            #6
            It should use all available cores then, if there's no bool / enum input in your strategy used - do you see the same when optimizing the SampleMaCrossOver from us?

            How do you exactly determine it would use less cores?
            BertrandNinjaTrader Customer Service

            Comment


              #7
              I just ran the Sample and it only is using ~~15% of CPU on a 8 core machine, which is 1 core.

              Taskmanager

              Comment


                #8
                On a 8 core CPU you would see 8 iterations / threads working at the same time to complete the full optimization result needed - that does not have to mean that your CPU / core load shown in the task manager is at 100% all the time.
                BertrandNinjaTrader Customer Service

                Comment


                  #9
                  Right but one core in the performance monitor goes to 100% usage, which is 15% of the total. So only one core is being accessed. During a long optimization the # usage should rise above 15%, to 30% for 2 cores, etc.

                  Comment


                    #10
                    We could unfortunately not reproduce your observation here - the GA used all 4 real (non hyperthreading) cores available as we ran SampleMACrossOver in our testing. Do you have another strategy script installed that would perhaps trigger the bool / enum limitation we already spoke about?
                    BertrandNinjaTrader Customer Service

                    Comment


                      #11
                      So if another strategy exists on my machine that uses bool or enum then it disables multithreading for all other scripts?

                      I cant verify if i do now but its possible. I never use enum. But i might have a bool parameter somewhere, although i have been replacing them with variables anywhere i can.

                      Comment


                        #12
                        I think we can rule that idea out, I tested and the bool in another script did not influence the currently tested one - can you please send me your config.xml file to support at ninjatrader dot com and my Attn? You can find it under MyDocuments > NinjaTrader 7.

                        Thanks,
                        BertrandNinjaTrader Customer Service

                        Comment


                          #13
                          I too have stumbled on this behaviour. I recently upgraded to an AMD Phenom II X6 1100T on my desktop (among other upgrades) specifically to significantly improve optimisation times over my old Intel Core 2 Duo laptop, by introducing new cores at a greater speed.

                          I find only one thread running at a time in while performing genetic optimisations (I am using a gadget on Windows 7 that informs me constantly of my core usage. It seems NT is just using random core for one thread at a time.) no bools or enums either. Exhaustive optimisations multithread perfectly, with one thread per core and all cores in near 100% use.

                          Now, my strategy hooks into DLLs (64 bit and threadsafe) etc, which I know is completely outside what you can support, although I'm confident this is not the root of the issue (especially as it multithreads fine with an exhaustive optimisation). My modifications confirm that I only ever have one instance of the strategy running at any one time with genetic optimisations, as I have it specifically reporting this in the log.

                          In terms of what you CAN support, this behaviour is reflected while optimising SampleMACrossover.

                          Any clues? I hope the genetic optimiser isn't using proprietary 'hyperthreading' (i.e. only working for some Intel CPUs)? Stab in the dark there...

                          Comment


                            #14
                            JustCallMeDan, thanks for the report and post - I'm still chasing this issue you also experienced - could you please contact me via Help > Mail to Support and also include your config.xml file from the MyDocuments > NinjaTrader 7 folder in addition to the trace / log files?

                            Are you on latest NT7 R2 as you see this outcome?
                            BertrandNinjaTrader Customer Service

                            Comment


                              #15
                              Hi Bertrand,


                              Will do. Yes, this is using NT7 R2 (64-bit 7.0.1000.2)

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by judysamnt7, 03-13-2023, 09:11 AM
                              4 responses
                              57 views
                              0 likes
                              Last Post DynamicTest  
                              Started by ScottWalsh, Today, 06:52 PM
                              4 responses
                              36 views
                              0 likes
                              Last Post ScottWalsh  
                              Started by olisav57, Today, 07:39 PM
                              0 responses
                              7 views
                              0 likes
                              Last Post olisav57  
                              Started by trilliantrader, Today, 03:01 PM
                              2 responses
                              19 views
                              0 likes
                              Last Post helpwanted  
                              Started by cre8able, Today, 07:24 PM
                              0 responses
                              9 views
                              0 likes
                              Last Post cre8able  
                              Working...
                              X