I had another test with these parameters. With this setting, Gateway crashes after some hours as well, after memory usage gets to around 1.1 GB. For some reason, when I try to open the log file with HPjmeter, I get the failure message below.
Awesome error message. Yeah, those parameters were just in case it was a permgen issue, but I took a look at your log and it seems very much like TWS is leaking memory as you've always suggested. The oldgen is completely full, with no space to grow and none freed on collection. I can't imagine everyone is experiencing this so presumably it's a result of whatever API functions Multicharts are calling. As I said earlier, there are some things you could do to try to track down the offending API operations, but that's IB's job, not yours. I'd send them all this info and demand attention. Good luck.
ddecker, this is not a matter of API: I connect to Gateway directly with a TCP/IP socket the same way java and C++ clients do in the IB API package. I download 2000 seconds (the maximum allowed) per historical data request. regulus, if ib doesn't pay attention,post it here and I'll try to send them my results that show I have a (small) memory leak. I think you should try to convince multicharts guys to work on this problem together with ib. If you want to make another try,a good idea could be to try to do the same data downloads multicharts does,using IB java API client,and see if you can make the memory leak come out. At this point,it would be easy to convince ib.
I don't mean the API client code itself. That doesn't even run in the same process as the gateway/TWS. I'm referring to whatever gateway/TWS in-process activities result from calling specific API functions, whether by IBs API, custom client, or telneting to the socket and typing in requests manually.
today I tried 933.5 for hours: I used it to trade,then had to go away,then returned:in a total of 5 hours, memory usage is always 140-145 MB. Program is getting quotes and 1-second historical data for futures and forex. heap size being 96MB, maybe gc is sweeping memory,but I always see 0%,1% or 2% cpu utilization from gateway (sometimes 6%). So,now I'd say no memory leak.
Finally, IB has issued a fix for the Java memory leak issue with TWS beta 940.1p: http://www.elitetrader.com/vb/showthread.php?s=&threadid=222594&perpage=6&pagenumber=40.
Mine started using ~700MB & made PC fans run loud. Save settings to server in login box, close TWS, uninstall (unwise.exe), then re-install stable version. Now using 370MB. Easiest / quickest fix
"TWS is not taking enough memory" what's the best settings nowadays? i want it to utilize as much memory as possible, of course. It takes just 1gig. Sometimes too high java mem size values can be contraproductive. So I wonder who knows the good values for current tws.exe.