10

I want to use SQLDeveloper with files that are fairly large. However, performance is sluggish (at best) due to a lack of memory.

Assuming that it is a Java app, how can I increase the size of memory allocated to the VM?

4 Answers4

14

Adding

AddVMOption  -Xmx1024M 
AddVMOption  -Xms512M

only to sqldeveloper/ide/bin/ide.conf may not work. It's also not recommended(please see comments on the top of the sqldeveloper\ide\bin\ide.conf file). In newer version of SQL developer(for sure after version 4.x) the settings in sqldeveloper/ide/bin/ide.conf can be overridden in

WINDOWS:

C:\Users\${WINDOWS_USER_NAME}\AppData\Roaming\sqldeveloper\${SQL_DEVELOPER_VERSION}\product.conf

LINUX:

/home/${USER_NAME}/.sqldeveloper/${SQL_DEVELOPER_VERSION}/product.conf

Note: You can find path to product.conf file in SQLDeveloper->Help->About->Properties ->Propertie name "user.conf"

You need to change

AddVMOption  -Xmx1024M 
AddVMOption  -Xms512M

in configuration files above.

5

Edit your sqldeveloper/ide/bin/ide.conf file and change the following two lines:

#
# If you are getting the 'Low Memory Warning' Message Dialog while running
# JDeveloper, please increase the -Xmx value below from the default 768M to
# something greater, like 1024M or 1250M.  If after increasing the value,
# JDeveloper is no longer starting up because it fails to create a virtual
# machine, then please reduce the modified -Xmx value.
#
AddVMOption  -Xmx1024M
AddVMOption  -Xms512M

The other answer regarding use of -XX:MaxPermSize in sqldeveloper/bin/sqldeveloper.conf is outdated and would not work in the recent versions of sqldeveloper. Using that would result in following sqldeveloper message on startup:

Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=1024M; support was removed in 8.0

Kshitiz Sharma
  • 689
  • 2
  • 10
  • 20
2

This post has useful details on where to tweak the JVM settings.

Essentially, look for ~/sqldeveloper/bin/sqldeveloper.conf and in that, look for:

AddVMOption -XX:MaxPermSize=128M

0

Another Cause For This Problem
I found another reason SQL Developer will limit maximum allotted memory that is not described in the pre-existing answers.

I experienced this problem with SQL Developer:

  • On a Windows 10 computer with 32GB of RAM
  • With the latest version of SQL Developer @ the time (23.1.1)
  • With the previous version and the version before that
  • After having changed the product.conf Xmx to many different various numbers (in: [local users AppData path]/Roaming/sqldeveloper/23.1.1 (and 22.2.1 etc...)
  • After having changed the jdk.conf in [path to sql developer executable]/sqldeveloper/sqldeveloper, and the ide.conf (in the same location as the executable)

I spent a few hours trying out different values and representations of memory (from kilobytes to megabytes to gigabytes and using upper and lower, setting very low Xss settings then higher Xmx settings).
I even interspersed values like the above with garbage I knew was wrong so I could verify that the files were being read.
The point is, nothing documented in all the standard places worked.

The Fix
Turns out there was an environmental variable set which was winning against all other settings.

_JAVA_OPTIONS -Xmx512M

I changed the above and, FINALLY, SQL Developer had a max memory allocation size larger than 512M. Previously it was always set to that value, regardless of what was set in any .conf.

FINAL FIX
Do one of the following:

  • Remove the environmental variable (making sure the .conf files are setup correctly)
  • Change the environmental variable to a larger value (when testing I tried 2048M ... as the orignal was 512M...
MER
  • 101