java using 200 MB of memory with only tws

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

  1. One further comment -

    There are actually two garbage collectors. It seems that the one that releases memory back to the OS (ie calls free () or sbrk ()) is called MarkSweepCompact. It defragments the heap. It is 'expensive' to run, so is rarely called. But if the memory requirements of the application approach the -Xmx limit, it will be frequently run. This will adversely affect performance of the application, so setting -Xmx too small is not a good idea. Unless there is good reason not to, I would leave -Xmx to at least the IB setting.
     
    #51     Aug 21, 2006
  2. no longer latest, 1.5.08 is out
     
    #52     Aug 22, 2006
  3. bad programming.
     
    #53     Aug 22, 2006
  4. alanm

    alanm

    Quote from dcraig:
    There are actually two garbage collectors. It seems that the one that releases memory back to the OS (ie calls free () or sbrk ()) is called MarkSweepCompact. It defragments the heap. It is 'expensive' to run, so is rarely called. But if the memory requirements of the application approach the -Xmx limit, it will be frequently run. This will adversely affect performance of the application, so setting -Xmx too small is not a good idea. Unless there is good reason not to, I would leave -Xmx to at least the IB setting.


    But don't you agree that, as expensive as GC might be, having the OS swap to disk is probably far worse? If you are silly enough to run a machine with 256Mb of memory, and use TWS at all with a setting of -Xmx256M, it will almost certainly cause Commit Charge to exceed physical memory, and cause swapping. Even a machine with 512Mb may not have enough memory to run with -Xmx256M.

    For example, I have an older machine with 768Mb, running two older instances of TWS (with -Xmx128M) and a number of other usual trading things. It's sitting at 646Mb commit charge right now. Clearly, TWS cannot be set to -Xmx256M on this machine, with only another 120Mb headroom.
     
    #54     Aug 22, 2006
  5. Im seeing less instabilty with a 256k max mem setting, but why is the VM Size Usage running up to 270 meg??? This reading from Task Manager.

    Doesn't seem right at all.
     
    #55     Aug 22, 2006
  6. alanm

    alanm

    There are other things besides heap that use memory. Heap is just the largest of them in this case. Probably leave yourself another 30Mb (+/- 20 Mb) headroom in addition to heap for total memory usage. It also gets more complicated since some of that VM space is not actually "dirty" and can be easily reclaimed by the OS, but that's way too much depth for most of us to deal with. Just buy more memory :)
     
    #56     Aug 22, 2006
  7. POS software programs which always seem to cause more trouble than they're worth:

    *Java
    *iTunes
    *Enternet 300
    *Realplayer

    Anyone have additions for this list?
     
    #57     Aug 22, 2006

  8. I have *never* seen that VM usage tick down, so I'm not sure what you mean by reclaim. I'm not 100% sure, but my 'impression' is that the high reported usage does actually bog down things and create instability.

    I mean , thats a HUGE amount of memory. What the blazes is in there? If its used, what's it used for, if it's not 'really' used, why is it being reported as used.
     
    #58     Aug 22, 2006
  9. alanm

    alanm

    It's really not huge in the current environment of bloated libraries and the nature of Windows' memory model. This isn't the place for, and I'm not qualified to explain, the nature of this model. Sun and ORA do a decent job of explaining the Java memory model, and many publishers, including MSFT's Knowledge Base and MSDN, have decent writeups on Windows'.
     
    #59     Aug 23, 2006
  10. Windows Media Player is my vote
     
    #60     Aug 23, 2006