You are here: Price/Risk Analytics > IB Risk NavigatorSM > Increase Memory Size for TWS

Increase Memory Size for TWS

Advanced users who manage large portfolios (over 500 stock or 100 options positions) or who simultaneously use more than 15 chart windows may need to manually increase the amount of memory allotted to TWS to accommodate the higher demands needed by both TWS and the Risk Navigator to handle this kind of heavy load.

You can modify the memory size in Global Configuration. From the Mosaic File menu, select Global Configuration. Choose General in the left pane, and enter an updated value in the Memory Allocation field. You will need to shut down and restart TWS for this change to take effect.

Alternatively, modifying the memory size requires that you open, edit and save the tws.vmoptions file.

Find the tws.vmoptions File

Standard Download: If you downloaded standard TWS software (Latest, Beta or stable) you will find this file in the Jts folder which is typically in the C:\ directory on Windows/Linux machines, and in ~/ on the Mac.

Note:  If you didn't specifically find and download the Offline TWS, you are using the standard TWS software.

For example, you will likely find the file in C:\Jts\tws.vmoptions (Windows and Linux) and in ~/Jts/tws.vmoptions (Mac). If you are having trouble finding this file among all of the "tws" files in Windows file explorer, look in the "Type" column for VMOPTIONS File in all uppercase letters.

Offline Download: If you downloaded the Offline TWS software, you will find this file in a sub directory of the Jts folder, named for the build version you downloaded.

For example, if you installed Offline TWS Latest when the latest version was 955.4, you will likely find the file in C:\Jts\955\tws.vmoptions (Windows and Linux) and in ~/Jts/tws-955.vmoptions (Mac).

Edit the tws.vmoptions File

1.  Open the file, and find the line that looks like: -Xmx768m. This defines the memory size currently being used by TWS. In this example, it is 768 MB.

Note:  If you're running Window 10, consider opening and editing the file directly in Notepad. To open Notepad, right-click the Start button and select Run. Type "notepad." Use the File>Open menu in Notepad and in the Files of Type field change the filter to All Files. Navigate to C:/jts and find the tws.vmoptions file. Make edits as shown then Save the file.

2.  Modify the size (in MB). We recommend not to go above 2 GB (or 2000 MB) as this will likely degrade your machine's overall performance.

3.  Move this memory size line BELOW the line that says: ### keep on update. Otherwise, the setting will revert to the default value when the version is updated.

The body of the file will look something like the below when you're done (note the highlighted lines at the bottom of the file):

4.  Save the file.

Check that the memory has been upgraded the next time you log into TWS. From the Help menu select About and check the max heap size in the Java Version section.

Important Disclosures