TWS Java Bloat or do you have any other ideas?

Discussion in 'Retail Brokers' started by patch227, Mar 6, 2007.

  1. RedDuke

    RedDuke

    Wow, and here I am mistakenly thinking that I know few things about computers. Thanks for this info.

    I had TWS minimized last night, but the size of javaw.exe did not increase even a bit. There were several files with this name, and their size was about 50kb.

    I only trade 1 product at a time.

    redduke
     
    #11     Mar 7, 2007
  2. TGM

    TGM

    Someone mentioned a bug in 1.6. I have been using 1.6 and it seems a lot faster. Is there an upgrade coming to fix this bug?


    By the way, any IB customers know if there is any difference between using the automatic upgrade procedure via the 'check for ib upgrade' or just manually installing the latest version over of an older version from the website? There is a newer version out and my automatic upgrade is NOT working. LOL. I go to log in and IB TWS tells there is an upgade availible then I go to automatic upgade and it tells me I am running the latest version.......
     
    #12     Mar 7, 2007
  3. GTG

    GTG

    Glad this isn't only me! Automatic update loads every single day when I start any of my 3 PC's now, instead of every few days like it used to. This is really annoying, and has been going on for at least a month. Furthermore, it doesn't appear to actually be upgrading TWS. I had to manually upgrade TWS to the last update, even though the stupid automatic upgrade is running every day.


    Is this how it is working for you?

    Upgrading TWS manually didn't seem to cause any problems for me. I also upgraded TWSAPI at the same time, and this did have an incompatibility with my own software. If your not using TWSAPI, I don't think it will be a problem.
     
    #13     Mar 7, 2007

  4. I went back to Java 1.5 about a month ago after major slowness using 1.6. Much better performance since then.
     
    #14     Mar 7, 2007
  5. patch227

    patch227

    Thanks to all who contributed to this thread. IDS from IB sent me a solution which seems to have worked. here it is:


    Java will try to use as much memory as it needed in limits set from the command line. Even if the memory is released, it will not be visible in the Task manager. Java garbage collector releases this memory. If you minimize, you will be able to see how much is really allocated.
    The TWS hanging is really bad thing but I am not sure it happens because of the memory leak. Meanwhile, try to right click on TWS icon, pick properties, target, and change value of

    -Xmx256M (or whatever your value is)
    to
    -Xmx512M
    or even
    -Xmx768M

    Restart TWS after that and see if it helps to give more memory to TWS and fix your problem at least this rough way.

    Thanks,
    ids
     
    #15     Mar 8, 2007
  6. Sounds like good advice to me. Java applications can get very slow or appear to hang if the memory heap is close to being completely used up (eg if there is a significant memory leak). Under these circumstances the JVM keeps running garbage collection in an attempt to stay in business. This chews up CPU cycles.

    The -Xmx parameter is the maximum heap size allowed for your Java app. Making it bigger may provide a work around for an app with a serious memory leak, or simply may be necessary for an app that uses a fair bit of memory.

     
    #16     Mar 8, 2007
  7. The approach I take to garbage collection is simply to restore a minimized TWS and then minimize it again a few hundred milliseconds later. If its already restored then just minimizing it will do it.

    After doing that you can observe the drop in memory usage.

    When I only had 384k of ram I had a little macro routine that did it every half hour on the hour (so I wasn't surprised) but now that I'm running 2G I haven't needed it.
     
    #17     Mar 8, 2007
  8. The Xms and Xmx arguments / property settings will most likely be eventually deprecated....see the post (attached) on the new memory control parameters.
     
    #18     Mar 8, 2007