This page discusses best practices for operating and administering Stardog, including capacity planning and some common pitfalls Stardog operators run into.
We strongly recommend not running other processes on the same machine Stardog is running on. Doing so can reduce the amount of memory available to Stardog.
For complete production setup including memory configuration, OS-level tuning, and Docker settings, see Server Configuration.
Review the Disk Usage section for guidance on allocating sufficient disk space.
Stardog requires adequate disk space both in $STARDOG_HOME and java.io.tmpdir. See Scratch Space for more information.
Some queries may keep large amounts of intermediate results in memory.
$STARDOG_HOME/.spilling directory). This location can be modified by the server configuration option spilling.dir in the stardog.properties file.spilling.max.file.length. The default value is 10G.spilling.dir has at least enough space to accommodate a file of size spilling.max.file.length (default is 10G). This value should be higher because (as stated in b) Stardog will continue to spill data to another file if a spilling file reaches its max size.The database configuration option
query.memory.exceeds.strategycan be modified from its default option ofSPILL_TO_DISKtoFINISH_QUERY_EXECUTIONto prevent a query from spilling when the memory allocated to the query is exceeded. This effectively kills the query, similar to a timeout.The database configuration option
query.memory.limitcan also be modified from its default option of9223372036854775807B(Bfor bytes) to determine the memory limit used by an individual query.
Most UNIX-like operating systems provide a way to limit and control the usage of system resources (e.g. files, threads, etc). We recommend providing a limit of 100k for open file handles. We've seen successful deployments using limits as low as 10k and as high as 1m. See the ulimit manual page for more information.
Use monitoring software on particularly important servers to produce alerts when memory or disk usage is approaching unacceptable thresholds.
| Metric Name | Description |
|---|---|
dbms.memory.heap.used | The current amount of used heap. |
dbms.memory.heap.max | The maximum amount of memory allowed for the Java heap. Equivalent to -Xmx settings. |
dbms.memory.native.max | The amount of available native memory. |
dbms.memory.system.rss | The current RSS size for Stardog (that includes all kinds of memory). |
dbms.memory.system.rss.peak | The peak RSS. This is often more important than current RSS because the current value may not be representative of what the workload requires. |
dbms.memory.system.usageRatio | The ratio of currently used memory to the total amount available to the process. It is highly recommended to configure an alert to fire when this ratio exceeds 0.9. |
We highly recommend testing your production load in your development and test environments to ensure you have adequate resources to run Stardog safely and efficiently.
admin superuser entirely. Absolutely change the admin user's default password of admin to something more secure.$STARDOG_HOME directory. This will result in data corruption. Stardog uses a file lock to prevent two instances of Stardog from running on the same home directory. If Stardog fails to start because of the lock file, you should not manually remove the file to start Stardog without first verifying that any Stardog processes configured to use that directory have been stopped as well as creating a complete backup of $STARDOG_HOME.Not all Docker volume drivers respect the file locking mechanism. This means if you have Stardog running outside of Docker and use Docker to start another instance of Stardog that maps to the same $STARDOG_HOME, they will both start and cause data loss.