Tuning Tips for NuoDB Configuration
For a given database, hosting each Transaction Engine (TE) and Storage Manager (SM) on a separate machine typically gives better performance despite the added network latency. You should benchmark both configurations, comparing the TE and the SM on same system versus having each on a separate machine. For an overview of NuoDB architecture, see Introduction to NuoDB.
Set NuoDB processes to have as much memory as possible (see mem
Database option), but do not set the mem
option so high that swapping occurs.
For a SM, the journal-sync-method
database option defines the file system synchronization mechanism to be used when the journal needs to ensure the durability of a transaction commit. The synchronization method has been specifically tuned for each supported operating system.
-
The
kernel
file system synchronization method is the fastest but requires a battery backed disk controller. Thekernel
mechanism on Linux requires support for thefallocate
utility. For example, use theext4
file system. -
The
disk
file system synchronization method is the most durable (but slowest) mechanism. -
The
osync
file system synchronization method is available for copy-on-write file systems, such as ZFS.
See also: Tuning Tips for Journal Performance.
Increasing SM Throughput Using archive-threads
Storage Manager (SM) write throughput to the archive can be significantly improved by increasing the archive-threads
configuration parameter.
This is important for systems with a high workload and either Cloud storage or a Storage Area Network (SAN), both of which may typically have a write sync latency in the order of 1-5ms.
By default, archive-threads
is 1.
That is, one thread writes out to the archive disk.
This is sufficient for most workloads and environments.
Increasing the archive-threads
configuration parameter enables multiple concurrent threads to write to the archive.
If there’s evidence that a Storage Manager (SM) is having difficulty writing to the archive fast enough, the recommendation is to increase the value of archive-threads
.
Increasing the archive write speed decreases the rate at which the node’s memory is consumed by the archive queue.
If the system detects that there is a risk of consuming the available memory it will automatically throttle the TE to avoid swamping the SMs.
The optimal value for a specific environment should be determined in pre-production testing under peak production representative workload.
The syntax is of the following form:
nuocmd start process --db-name ${nuodb_database} --engine-type SM --server-id ${host} --archive-id ${archiveId} --options archive-threads ${archive_threads}