Inside tws directory there is a folder that stores profile : dwh .... 9 characters. 1st) Edit content of nia.properties file to this: #HSQL Database Engine hsqldb.applog=0 hsqldb.script_format=0 runtime.gc_interval=0 sql.enforce_strict_size=false hsqldb.cache_size_scale=1 readonly=true hsqldb.nio_data_file=true hsqldb.cache_scale=1 version=1.8.0 hsqldb.default_table_type=memory hsqldb.cache_file_scale=1 hsqldb.log_size=1 modified=no hsqldb.cache_version=1.7.0 hsqldb.original_version=1.8.0 hsqldb.compatible_version=1.8.0 and change file attributes to read only. 2nd) Sometimes tws creates a lot of files named nia_... and when this happens it triggers the memory consumption. I wrote a simple batch program to clear this rubbish running inside amibroker: del tws.tmp /f /q del nia_*.* /f /q del *.trd /f /q del *.rul /f /q Settings are in tws.xml - Now trading with tws 895 and I'm trying 890.6 bypass version check when tws logon : -Change registry settings : [HKEY_LOCAL_MACHINE\SOFTWARE\Trader Workstation] "version"="9037" unsuccessfully -Change jts.jar\jclient\version (exchange files btw versions) unsuccessfully Gateway still takes a lot of memory and update 904 does not work with IBcontroller . tws 895 version takes 18Mb of memory and 140Mb of virtual memory , XP and java 1.6.0.18 sorry bad english Any ideas more ?
Interesting effort! I tried the gateway out of interest only and my iprssion was its memory use was in teh range of 30mb... which is very good compared to TWS. Maybe the memory use grows a lot when one streams quotes or does lots of trades.... IBcontroller here is an Amibroker autotrading connection, not a tool from yahoo groups that logs into TWS automatically and prevents auto logoff, right?
Right . IBcontroller That's a minor problem. standard error with the 904 version: Error Code 200, No Security definition has been found for the request No problem with 903 or lower.
Thank you. Your post saved me a lot of time and appears to have solved my problem with TWS crawling to a standstill have a great weekend
I was examining windows on my pc with Spy++ when I discovered that TWS keeps open many of its windows - making them invisible - when you close them. For example, if you ever open the Account window, it will be destroyed only when you close TWS. Think this eats resources...
Not sure about that. Java, and Swing in particular, are excellent at wasting resources when doing the simplest things. Consider that IB Gateway, just to open some sockets and translate from FIX to API, takes at least one million bytes of memory