In NuoDB, an archive is a collection of entities called atoms persisted on a file system. Atoms can be any kind of data, such as metadata about a table or the user data in table rows. There are several types of atoms, such as catalog, schema, and data atoms. Each Storage Manager (SM) governs an archive. When multiple SMs are present in a NuoDB domain, all the SMs are synchronized. Thus, any modifications made to an atom in one archive are reflected across all other archives that serve that atom’s storage group.

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).