Memory and Java Options

DbSchema comes with its own Java, and runs on it. Two Java settings matter most: how much memory DbSchema may use, and how it draws the window. The memory limit is set in a text file in the installation folder. How DbSchema draws the window is a setting in DbSchema itself.

SystemFile with the Java options
WindowsDbSchema.vmoptions, next to DbSchema.exe, usually in C:\Program Files\DbSchema
macOSDbSchema.app/Contents/vmoptions.txt
LinuxDbSchema.vmoptions, next to the DbSchema launcher

Each line of the file holds one Java option. A line that starts with # is ignored.

See how much memory DbSchema has

Choose Help → About DbSchema. Under Runtime, the Memory line shows two values. The first is how much of the Java heap DbSchema uses now: the memory where Java keeps the data of DbSchema. The second is the largest size of the heap, which the -Xmx option sets.

The Runtime section of the About DbSchema dialog, with Java, JavaFX and Memory showing 507 MB of 5844 MB

In the picture, DbSchema may use at most 5844 MB. That DbSchema was started without the -Xmx8G line that the installer writes.

Edit the Java options file

  1. Close DbSchema.
  2. Open the file in a text editor. On Windows, start the editor as administrator. The file is in Program Files, which only an administrator can change.
  3. Change the line, and save the file.
  4. Start DbSchema again. From now on, DbSchema uses the new value.
-Xms128M
-Xmx8G

A new installation writes these memory settings into the file. Java keeps the data of DbSchema, such as your models and diagrams, in an area of memory called the Java heap. -Xmx sets the largest size of the Java heap, here 8 GB. -Xms sets the size that the heap starts with. You don't need to change it.

Raise the memory limit

If DbSchema shows a Java heap space error, it needs more memory. This happens with very large schemas and diagrams.

  1. Find the line that starts with -Xmx in the Java options file.
  2. Raise the value, for example to 12 GB:
    -Xmx12G
    
  3. Save the file and start DbSchema again.

Set the value below the memory (RAM) of your computer. Leave enough memory for the other programs.

A new installation of DbSchema writes -Xmx8G. An update keeps your existing DbSchema.vmoptions. If you updated from an older version, your limit may still be lower, such as -Xmx1024m.

Fix slow graphics and Remote Desktop problems

DbSchema uses the graphics card to draw its window. The window can draw slowly over Windows Remote Desktop, in some virtual machines, and with some graphics drivers. Tooltips may flicker, or the window may freeze after a graphics driver reset. If DbSchema detects slow drawing, it shows a Slow Rendering Detected notification. The notification points to the setting below.

Software rendering draws the window with the processor instead of the graphics card. It is slower, but it avoids the freezes after a graphics driver reset.

  1. Choose Edit → Settings.
  2. Click Graphics in the list on the left.
  3. Tick Use Software Rendering and press OK.
  4. Close DbSchema and start it again. The setting takes effect when DbSchema starts again.
The DbSchema Settings dialog on the Graphics page, with the Use Software Rendering check box and its description

If a -Dprism.order line in DbSchema.vmoptions does not start with #, DbSchema follows that line and ignores this setting. For example, with -Dprism.order=sw, DbSchema uses software rendering whether the box is ticked or not. In a new installation, this line starts with #, so DbSchema ignores it.

Find the log files for a support ticket

DbSchema writes its log to .DbSchema/logs/logs.txt in your home folder.

  • To read the log, choose Help → Output Logs.
  • To send it, choose Help → Report a Bug and keep Application logs ticked. Show files opens the folder.
The Attached to the report section of the DbSchema Report a bug dialog, with Screenshot of the DbSchema window and Application logs ticked, and the Show files link

Common problems

DbSchema says it ran out of memory, but my computer has plenty

The -Xmx line limits the Java heap, even if your computer has more memory. Check the limit in Help → About DbSchema, then raise it.

I changed the file, but nothing changed

DbSchema reads the file only when it starts. Close every DbSchema window and start it again. On Windows, check that the editor saved the file. Without administrator rights, it may fail to write into Program Files.

Next steps