sun java on Ubuntu with IB TWS

Discussion in 'Trading Software' started by runningdeer, Mar 29, 2011.

  1. I got this running a couple months ago with out a hitch, but dont remember much of the details..
     
    #11     Apr 4, 2011
  2. I did some investigating and what I said about the 64 bit Java requiring the extra parameter is not entirely accurate, it is only needed if you have a auto log-in setup using IBController. Apparently it's only when the extra IBController classes are loaded along with the TWS classes you start having the problems I describe. Starting up TWS normally in Ubuntu the way IB says works fine without the extra parameter. At least I couldn't get it to screw up running every feature I could think of using the edemo/demouser account this weekend.

    On the production system that uses IBController it's a different story but we are messing around with the innards of TWS so we deserve what we get. :eek:

    Mike
     
    #12     Apr 4, 2011
  3. dlonET

    dlonET

    Many people use Linux as desktop - there are no dramas with viruses and performance is so much better.
    i run on 10.4, lucid and x64, works without any problems.
    I have increase the memory:
    java -server -cp jts.jar:hsqldb.jar:jcommon-1.0.12.jar:jfreechart-1.0.9.jar:jhall.jar:wtf:ther.jar:rss.jar -Xmx1024M jclient.LoginFrame .

    Good Luck
     
    #13     Apr 4, 2011
  4. Even though TWS runs great on Ubuntu Desktop many people MUST have Windows to run certain things. What surprised me was how well Windows runs in Ubuntu using VirtualBox (free under Applications -> Software Center). Running it full screen using the latest multi-core cpu's (Sandy Bridge especially) it's indistinguishable from using Windows dedicated on an older machine a few years ago, maybe faster. It's also a hundred times easier to restore from backup when you want to "start fresh" for whatever reason, just keep the backup updated with the latest Windows Updates and you're good to go.
     
    #14     Apr 4, 2011
  5. dlonET

    dlonET

    I agree, i used VirtualBox for while but now I use only wine, a bit faster than VBox, as it runs 'more natively' . I use SierraCharts - a fantastic, for a dollar value, trading application. I did loose some functionality though ( its worksheets do not work in this mode which is very powerful feature).
    So i do not use windows right now at all, hoorey.
    I run only 4 core AMD and still very solid performance.
    Thanks
    DL
     
    #15     Apr 4, 2011
  6. Yes, VirtualBox is a must... Not only for Windows but it lets you test other OSs without touching the configuration of your host computer. I love running Windows under it because it boots so fast and you can change things so quickly versus a real Windows box. Ironically, one of the only apps left that I really need Windows for is iTunes! Everything else either runs with Wine or there is an equivalent or better open-source app with the exception of my trading software, Sierra Charts.

    It is a shame that Sierra Charts hasn't jumped on Linux yet. I feel like they are leaving a whole audience out that may be interested in a non-MS charting app especially with QuoteTracker in a sunset status. They were flirting with a scaled down Linux version awhile back with prodding from some users in their community forum but they haven't committed any resources to it at all. SC runs ok in Wine but worksheets are a big feature to lose for me so I am still forced to run in Vbox for now.

    There was a documentary called "Triumph of the Nerds" made during the 90s where Larry Ellison predicted Windows and PCs being replaced by an "information appliances". Larry was a little early but you have to admire his vision of the future from back when the Internet wasn't even in a majority households and broadband was just a dream for most Internet users at that time. It is happening faster than I ever thought now with the smart phones, tablets and all other forms of non-Windows powered devices. Heck, a year ago, all of my computers ran some version of Windows as the base OS. Now, none! :)
     
    #16     Apr 4, 2011
  7. Testing my first 64bit Linux installation, Oracle/Sun java 64 bit 1.6.0.u25 as well.

    using IB original starting scripts:
    java -cp jts.jar:hsqldb.jar:jcommon-1.0.12.jar:jfreechart-1.0.9.jar:jhall.jar:wtf:ther.jar:rss.jar -Xmx512M jclient.LoginFrame .

    after hours running, IB TWS starting freezing up with OutOfMemoryError problem. this happened only with java 64 bit version, i haven't seen this on 32 bit before, and I think it isn't hardware problem. Anyway, I add both -XX:MaxPermSize=128M and -XX:+AggressiveHeap into starting script, hoping it will help remedy this outofmemory problem.
     
    #17     May 26, 2011
  8. If you are using IBController to start up TWS then on 64 bit CPU's you definitely need MaxPermSize=128M or you will get the out of memory error you describe. At least that has been my experience. I'm not sure that using -XX:+AggressiveHeap is a good idea. It overrides your -Xmx512M parameter and actually makes it easier to run out of memory in some cases. Here is snippet from the Sun documentation:

     
    #18     May 26, 2011
  9. Totally offtopic, but do you guys have a solution in Ubuntu to automatically close those annoying "Too late to cancel - order already filled" type dialogs? I can't autotrade and get real work done with this dialog popping up.
     
    #19     May 26, 2011
  10. Thanks for the notes, I will test it without -Xmx. There are couple of options I will try to test out, such as -XX:-UseParallelGC, -XX:MaxHeapFreeRatio=70 and -XX:MinHeapFreeRatio=40.

    I run tws from xterm, don't use IBController.

    http://www.oracle.com/technetwork/java/javase/tech/vmoptions-jsp-140102.html
     
    #20     May 26, 2011