Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

NT8B10 32bit: System OutOfMemoryException

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

    NT8B10 32bit: System OutOfMemoryException

    Hello,

    While testing Optimization using SA Window, I received this exception from the 32bit version of NT.

    I usually use the 64bit version, but I wanted to also get a feel for how the 32bit version performed. The 64bit version however, so far has not given me the error before, only the 32bit version.

    I`ve upload a screen print.

    Thank you
    Attached Files

    #2
    Hello rayko, and thank you for your question.

    If you are using your own strategy, you will want to review this publicly available MSDN page on troubleshooting System.OutOfMemory exceptions.



    There are a few additional caveats to keep in mind

    • NinjaTrader 7 can only fully utilize your first processor core. If you are at or above 25% CPU usage, NinjaTrader is consuming all the resources it can
    • Remember to investigate your memory usage, not just your CPU
    • Remember too that programs use managed memory, which is significantly less than total available memory. I would strongly suggest reviewing this publicly available page, https://en.wikipedia.org/wiki/Memory...ory_allocation

    If your strategy is causing Ninja to run out of memory, it is likely that it would not trade as quickly as you would like in real time. I would highly recommend using the Log("variableName : " + variable, LogLevel.Information) method frequently to debug, especially inside nested for and while loops, as these tend to be very memory intensive locations.



    If you are using a NinjaTrader strategy during backtesting, such as the SampleMACrossover strategy, and you are receiving the Out of Memory message in your log, please let us know which of our provided strategies was causing this message, and please send your log and trace files for the day to platformsupport[at]ninjatrader[dot]com.


    You will find the log file on your PC in the (My) Documents > NinjaTrader (7 or 8) > Log folder.
    • The log file will be named "log.YYYYMMDD.txt"

    You will find the trace file on your PC in the (My) Documents > NinjaTrader (7 or 8) > Trace folder.
    • The trace file will be named "trace.YYYYMMDD.txt"
    Jessica P.NinjaTrader Customer Service

    Comment


      #3
      Hello Jessica,

      Thanks for the MSN Link. I read through it I just wanted to clarify my understanding.

      Firstly, you mentioned NT7 in your reply. This exception is only occurring when I use NT8 beta 10 32bit version. It does not occur when using NT8 beta 10 64bit version.

      So, when I run an optimization using 64bit and monitoring memory consumption using the taskmgr, I note the greatest level of memory usage is approx. 12gig out of 16gig and the optimization completes normally.

      And when I run an optimization using 32bit, the memory consumption alternates between 4 to 6gig before the memory exception occurs.

      The optimization has "keep best # results" set to default 10, timeframe of a year and dataseries set to 30 minutes.

      So if I understand this correctly, assuming the strategy is not reading large datasets, not creating excessive cache entries, etc.

      The 32bit or 64 bit versions may experience OutOfMemoryException if the demand placed on the memory resources are great enough to cause it, due to normal operation.

      This is fine. I just want to be sure I understand your meaning.

      And by the way. NT did not crash following the exception, which I thought was good. I was able to do a controlled shutdown.

      Please let me know.

      Thank you.

      Comment


        #4
        Hello Rayko,

        I'm not sure if I follow your meaning, but your results are as expected. 32 bit programs can not access more than 2^32 or 4 GiB of memory at a time, which means that your reported crashes in the 4 to 6 GiB range are to be expected; your other programs and operating system would likely be using resources beyond the 4 GiB.
        Jessica P.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by WHICKED, Today, 12:56 PM
        1 response
        8 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by cre8able, Today, 01:16 PM
        0 responses
        1 view
        0 likes
        Last Post cre8able  
        Started by chbruno, 04-24-2024, 04:10 PM
        2 responses
        47 views
        0 likes
        Last Post chbruno
        by chbruno
         
        Started by WHICKED, Today, 12:45 PM
        1 response
        11 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by samish18, Today, 01:01 PM
        0 responses
        5 views
        0 likes
        Last Post samish18  
        Working...
        X