Database Configuration for a Particular Host (nuodb.config)


The nuodb.config file is a standard configuration file, which one could optionally supply to the NuoDB config database option. It contains a list of database options, presented as key/value pairs, where the key is separated from its value by whitespace, and each key/value pair is on its own line. Database options that are a switch can either be supplied as just a key or with the values true or false.

The nuodb.config file is installed in NUODB_HOME/etc.

Stopping and starting a database is required to cause changes in nuodb.config to be read.

Default nuodb.config

By default, when NuoDB is installed, nuodb.config contains the following:

verbose error,flush,warn

Database Options Precedence

By default, any NuoDB database process will read database options specified in NUODB_HOME/etc/nuodb.config.

These can be overwritten by specifying the config database option and pointing at an alternate configuration file.

Furthermore, these can all be overwritten, by specifying database options in when starting the process. For more information, see nuocmd start process.

Specifying SM Versus TE Database Options

There is only one nuodb.config file per host. This means that you need to specify database options that might only apply to a Storage Manager (for example, all the journal-* options) in addition to database options that might only apply to a Transaction Engine (for example, jvm-lib). This is fine because Storage Managers (SMs) ignore options for Transaction Engines (TEs) and TEs ignore options for SMs. In other words, you can specify all options in the one nuodb.config file.

Useful Database Option Settings

The nuodb.config file is most useful for setting database options that are specific to the particular host where a TE or SM is running. There are some common cases where this would be helpful.

Pointing at the Local JVM

If a value is set for jvm-lib, that location is searched first. If jvm-lib is not set, or a JVM is not found in that location, then JAVA_HOME is searched. If JAVA_HOME is not set or a JVM is not found, then:

On Linux: standard paths are searched.

On Windows: the Windows registry is checked and then common paths are checked.

If on a physical host in the domain, the JVM is installed in a non-default location, not pointed to by the JAVA_HOME environment variable, then specifying jvm-lib in the nuodb.config file is useful.

Sample jvm-lib setting in nuodb.config:

jvm-lib /home/joey/myjvm

Setting Journal Options

See the options beginning with journal- at Database Options. It might be ideal to set these per physical host in the domain. In particular, journal-sync-method specifies the filesystem synchronization mechanism when the journal needs to ensure the durability of a commit. The sync mechanism has been specifically tuned for each supported OS. The kernel sync method is the fastest but requires a battery backed disk controller. The kernel method on Linux also requires the filesystem to support fallocate, that is, ext4. The disk sync method is the most durable but slowest method. The osync method is available for copy-on-write filesystems, a.k.a. ZFS.

Sample journal setting in nuodb.config:

journal-sync-method osync
Options related to journaling, for example --journal-buffer-size-bytes are configurable. The exception to this is --journal which is enabled by default and cannot be disabled. For more information on using options related to journaling, see Database Options.