java using 200 MB of memory with only tws

Discussion in 'Trading Software' started by Cdntrader, Aug 16, 2006.

  1. I have 1 Gig + swapfile , which should be more than enough. Getting more memory would just be a bandaid, as cheap as it might be.


    I have to kill the TWS on many occasions, because for some reason, possibly related to this memory issue, it refuses to close on its own. You select close, and it just sits there, won't do it.
     
    #31     Aug 18, 2006
  2. def

    def Sponsor

    Do you have "-xmx256M" in your start command? If not, it may help:

    C:\WINDOWS\system32\javaw.exe -cp jts.jar;jcommon-1.0.0.jar;jfreechart-1.0.0.jar;jhall.jar;other.jar;rss.jar -Dsun.java2d.noddraw=true -Xmx256M jclient/LoginFrame C:\Jts
     
    #32     Aug 18, 2006
  3. Thanks dcraig for your input. Does it make sense to you that even with the fragmentation, that TWS would eat up 250 meg of memory?

    What could that much memory be used for? I have to think its a memory management issue within TWS, possibly api related.
     
    #33     Aug 18, 2006

  4. def, I had mine set at 160M (might have been an earlier setting TWS used, that I retained)

    The other day I bumped it up to 200M. Still had the problem , though it might have been delayed by the extra memory.

    I'll change to 256M and see what happens.
     
    #34     Aug 18, 2006
  5. stock,

    Can you try maximizing then minimizing tws a few seconds later and let us know what affect it has on tws size?
     
    #35     Aug 18, 2006
  6. \\

    I have tried that , and it does not clear this particular problem. Once tws starts to act badly , minimizing appears to have no effect.
     
    #36     Aug 18, 2006
  7. That's a hard question to answer. Without being familiar with the TWS code I couln't even take a reasonable guess. I know from being a developer and also working in third level tech support in the past, that one's first reaction is "Nah !! Couldn't be" but on investigation whatever the issue is turns out to be so.

    As for the API, I use it extensively. At the moment on my Linux box, TWS is shown using 105 Mbyte Real and 337 MByte virtual memory. This is not the whole truth however, as I believe libraries shared with other applications are included in this total so it's not fair to attribute all of that usage to java. Whether this is the case on Windows, I couldn't say. I know it's a bit of a PITA, but jconsole is by far the best way to get a true handle on Java memory use.
     
    #37     Aug 18, 2006
  8. usage pattern?
     
    #38     Aug 18, 2006
  9. thanks for the tip. Your right when I minimize then maximize tws the memory usage drops back to 20 mb. Nice. Surprised I never ran across that before. Problem solved I guess.
     
    #39     Aug 18, 2006
  10. fader

    fader

    #40     Aug 18, 2006