java using 200 MB of memory with only tws

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.
 
Quote from stock777:

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.

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
 
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.
 
Quote from def:

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


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.
 
Quote from kiwi_trader:

stock,

Can you try maximizing then minimizing tws a few seconds later and let us know what affect it has on tws size?
\\

I have tried that , and it does not clear this particular problem. Once tws starts to act badly , minimizing appears to have no effect.
 
Quote from stock777:

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.

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.
 
Quote from dst:

To stock777 and Cdntrader - would you please PM me your usage pattern and I'll investigate your problems. What you are experiencing seems to be very abnormal. Thank you.

usage pattern?
 
Quote from kiwi_trader:

Stock, Cdn,

Try doing what I do. Observe memory use to see how it affects your machine.

I normally run TWS minimized with Sierrachart and ZLT accessing it. It will grow hugely if I let it.

To prevent it I restore it (to show it), wait a couple of seconds, and minimize it. This process seems to force a clean up.


It then starts to grow back but takes a while (not as long as older versions used to do). Note that backfill will blow it out quickly.

I have a macro that does this to SC and ZLT at the same time and hit it every half an hour or so to keep my pc running cleanly. SC is tidy but ZLT like TWS becomes a resource hog if you give it a chance.

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.
 
Back
Top