Archive

Data in a database is stored in one or more archives. Each archive is provisioned exclusively for a specific database. The data in an archive is stored in the archive location specified during the provisioning of the archive. Archive location includes the following:

  • The type of archive which defines the organization of data within the archive. For more information, see Types of Archives.

  • The path of the directory on a file system where the data is stored.

Once provisioned, an archive has a corresponding archive object in the domain. To inspect the archives in a domain or provisioned for a database, use nuocmd show archives.

For more information, see Provision an Archive and Deprovision an Archive.

The path must be accessible to a running Admin Process (AP).

Storage Managers (SMs) and Archives

When a database starts, an SM is started on every archive provisioned in that database. At any given time, only one SM can run on an archive. In Kubernetes environment, there must be an Admin Process (AP) running on each host with a provisioned archive in that database.

Types of Archives

There are two types of archives:

For more information, see nuocmd create archive and nuocmd start sm.

File Archive

In a file archive, each atom is represented as a single file on the file system. Most atom files are relatively tiny in size, and archives can have millions of these tiny files. NuoDB’s performance is constrained by the limitations of the underlying Operating System (OS), and the OS has to constantly interact with the file system. Writing tiny files to disk is less efficient causing heavy performance costs at the OS level.

To create a file archive using nuocmd, use:

nuocmd create archive --db-name <db_name> --server-id <server id> --archive-path </file/path>

Log-Structured Archive (LSA)

In Log-Structured Archive (LSA), instead of storing every atom as its own file, multiple atoms are concatenated into fewer files called LSA files. The SMs will all have the same set of atoms, but the concatenated files may appear different. This method of archiving significantly reduces disk operations, thus dramatically increasing the underlying write performance while having minimal impact on read performance. However, there are a few limitations.

  • LSA files can become fragmented, thus taking up more disk space than necessary (and more space than a traditional file archive would take). To manage this, 'compaction' process is used to consolidate these files.

  • LSA consumes more memory than traditional file archives.

To create an LSA archive using nuocmd, use:

nuocmd create archive --db-name <db_name> --server-id <server id> --archive-path lsa:</file/path>

To configure the database options for LSA, see Database Options.

For the steps to migrate from File Archive to LSA, see Migrate from File Archives to Log-Structured Archives (LSA).