Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Memory efficiency

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

    Memory efficiency

    Hi,

    I noticed that NT can be quite a memory hog in some situations.
    In particular, when you load a lot of historical data, NT seems to allocate a lot of memory.
    (And when I say a lot, I mean it can blow up until it crashes)

    If I had to guess, I would say you try to download all the data to memory and then dump it to disk afterwards (as is done in other places as well, e.g. when exporting data).
    Now, I don't know if this is done by design or mistake, but clearly, fillling a limited-size buffer and dumping it to disk every once in a while when it fills would be a better strategy (especially considering the sequential nature of the data.

    redwoood

    #2
    Thank you for the suggestion.

    Here are some performance tips that may help:
    JessicaNinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_Jessica View Post
      Thank you for the suggestion.

      Here are some performance tips that may help:
      http://www.ninjatrader-support.com/H...anceTips1.html
      Thanks, but that really doesn't apply in this case.

      Just for clarification: when I say loading historical data, I mean from the tools, not inside a chart.
      i.e. I just want to get the historical data from my data provider into NT's database.

      Of course I could limit the size of my historical data requests, but
      a) I don't have an accurate way of telling what request translates to what size
      b) There really should be no reason for NT to keep all this data in memory. Buffering is quite
      a standard technique in such a case.

      So just a suggestion for Ray et al to look into the way historical data is handled. Shouldn't be all that much work to improve the implementation.

      Thanks

      redwoood
      Last edited by redwoood; 04-04-2008, 09:39 AM.

      Comment


        #4
        Thanks Redwood,

        Sorry those tips weren't of much help in your situation, but I will forward your suggestion for our list of future considerations.

        Enjoy your weekend and happy trading.
        JessicaNinjaTrader Customer Service

        Comment


          #5
          Originally posted by NinjaTrader_Jessica View Post
          [...] I will forward your suggestion for our list of future considerations. [...]
          Uhm, I'm not sure if this has become clear or not, but this is a bug report, not a feature request.
          NT can crash when historical data requests exceed RAM size. That's a bug in my book.
          My "suggestion" is how to fix the bug.

          redwoood

          Comment


            #6
            >> NT can crash when historical data requests exceed RAM size
            Unfortunately there is no fix, since you always could overload your system by requesting too large a series.

            Comment


              #7
              Originally posted by NinjaTrader_Dierk View Post
              >> NT can crash when historical data requests exceed RAM size
              Unfortunately there is no fix, since you always could overload your system by requesting too large a series.
              Sorry, if an application crashes, it's a bug not a feature ;-)
              You need to handle this more gracefully.

              In the use case described above, ie reloading historical data through the tools menu, it should never have to run out of memory,

              redwoood

              Comment


                #8
                Thanks for your suggestion. We'll add it to the list of future considerations.

                Comment


                  #9
                  Dierk, I think there is more to it than that. I have tried everything I can think of to avoid the repeated crashes by NT due to out of memory overflow errors.
                  I have discovered that by increasing RAM and processing power I get little incremental benefit. I find that typically when NT reaches a RAM usage of approx 1.3-1.5 Gb it will crash regardless of the system it is running on and the available memory resources. (this was the case running on a machines with 1-4gb of RAM).

                  Installed now on a machine running 8gb of RAM in a 64 bit OS, it will still crash at the same point (Ram usage/#instruments and look-back bars).

                  Is NT limiting itself in some way, regardless of the resources available to it? My machine is hardly breaking a sweat but still NT crashes due to insuffuicient memory. Or, maybe could the error message in the log/trace that is always referring to the memory issue, be misguided and it is isn't a memory problem after all?

                  thanks

                  Nick

                  Comment


                    #10
                    >> I find that typically when NT reaches a RAM usage of approx 1.3-1.5 Gb
                    Correct, since no 32bit process can allocate more than 1.5GB or so. I read something to that effect recently (since I checked). Unfortunately don't have a link at hand right now.

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by Aviram Y, Today, 05:29 AM
                    3 responses
                    10 views
                    0 likes
                    Last Post NinjaTrader_ChelseaB  
                    Started by algospoke, 04-17-2024, 06:40 PM
                    3 responses
                    26 views
                    0 likes
                    Last Post NinjaTrader_Jesse  
                    Started by bmartz, 03-12-2024, 06:12 AM
                    3 responses
                    30 views
                    0 likes
                    Last Post NinjaTrader_Zachary  
                    Started by gentlebenthebear, Today, 01:30 AM
                    1 response
                    8 views
                    0 likes
                    Last Post NinjaTrader_Jesse  
                    Started by cls71, Today, 04:45 AM
                    1 response
                    7 views
                    0 likes
                    Last Post NinjaTrader_ChelseaB  
                    Working...
                    X