Running GraphDB as a Standalone Server¶

The default way of running GraphDB is as a standalone server. The server is platform-independent, and includes all recommended JVM (Java virtual machine) parameters for immediate use.

Note

Before downloading and running GraphDB, please make sure to have JDK (Java Development Kit, recommended) or JRE (Java Runtime Environment) installed. GraphDB requires Java 11 or greater.

Running GraphDB¶

2. Start GraphDB by executing the graphdb startup script located in the bin directory of the GraphDB distribution.

A message appears in the console telling you that GraphDB has been started in Workbench mode. To access the Workbench, open http://localhost:7200/ in your browser.

See the supported startup script options here.

Configuring GraphDB¶

Paths and network settings¶

The configuration of all GraphDB directory paths and network settings is read from the conf/graphdb.properties file. It controls where to store the database data, log files, and internal data. To assign a new value, modify the file or override the setting by adding -D<property>=<new-value> as a parameter to the startup script. For example, to change the database port number:

graphdb -Dgraphdb.connector.port=<your-port>

The configuration properties can also be set in the environment variable GDB_JAVA_OPTS, using the same -D<property>=<new-value> syntax.

Note

The order of precedence for GraphDB configuration properties is as follows: command line supplied arguments > GDB_JAVA_OPTS > config file.

The GraphDB home directory¶

The GraphDB home defines the root directory where GraphDB stores all of its data. The home can be set through the system or config file property graphdb.home.

The default value for the GraphDB home directory depends on how you run GraphDB:

• Running as a standalone server: the default is the same as the distribution directory.

• All other types of installations: OS-dependent directory.

• On Mac: ~/Library/Application Support/GraphDB.

• On Windows: \Users\<username>\AppData\Roaming\GraphDB.

• On Linux and other Unixes: ~/.graphdb.

GraphDB does not store any files directly in the home directory, but uses several sub-directories for data or configuration.

Java Virtual Machine settings¶

We strongly recommend setting explicit values for the Java heap space. You can control the heap size by supplying an explicit value to the startup script such as graphdb -Xms10g -Xmx10g or setting one of the following environment variables:

• GDB_HEAP_SIZE: environment variable to set both the minimum and the maximum heap size (recommended);

• GDB_MIN_MEM: environment variable to set only the minimum heap size;

• GDB_MAX_MEM: environment variable to set only the maximum heap size.

For more information on how to change the default Java settings, check the instructions in the bin/graphdb file.

Note

The order of precedence for JVM options is as follows: command line supplied arguments > GDB_JAVA_OPTS > GDB_HEAP_SIZE > GDB_MIN_MEM/GDB_MAX_MEM.

Tip

Every JDK package contains a default garbage collector (GC) that can potentially affect performance. We benchmarked GraphDB’s performance against the LDBC SPB and BSBM benchmarks with JDK 8 and 11. With JDK 8, the recommended GC is Parallel Garbage Collector (ParallelGC). With JDK 11, the most optimal performance can be achieved with either G1 GC or ParallelGC.

Stopping the database¶

To stop the database, find the GraphDB process identifier and send kill <process-id>. This sends a shutdown signal and the database stops. If the database is run in non-daemon mode, you can also send Ctrl+C interrupt to stop it.