Search Rocket site

Third mode in Universe 12.2.1

August 16, 2022

UniVerse 12.2.1 includes a new mode named “third mode” and you’re going to love it. Keep reading for the story and details of this “new mode”.

Background

If you’ve been hesitant to upgrade to UniVerse 12 because of the System Buffer, UniVerse 12.2.1 is the release you’ve been waiting for. If you work with UniVerse at a technical level, you may be aware that file manipulation at the OS level can cause the System Buffer cache memory and the physical disk content to become out of sync; this is very different from previous UniVerse versions.

Solution

UniVerse 12.2.1 includes a “third mode” making it possible for you or your UniVerse Administrator to decide whether UniVerse File I/O will be processed through the System Buffer or not. We added a new parameter named “SYSTEM_BUFFER” to “uvconfig”, making it easy for you to enable/disable the new mode. When you install UniVerse 12.2.1, it defaults to 1, which means the System Buffer is enabled. In total, UniVerse 12.2.1 offers three modes that you can use through different configuration combinations (using SYSTEM_BUFFER and RFS_MODE in “uvconfig”).

SYSTEM_BUFFER RFS_MODE MODE Description
0 0 No System Buffer and no Recoverable File System (RFS) protection. This is the new mode that is comparable with previous UniVerse versions (also referred to as “third mode”).
0 1 This configuration is not valid and will report an error when executing “uvregen”.
1 0 System Buffer is on, but there is no RFS protection. This is the default mode.
1 1 System Buffer is on and RFS protection is enabled. This this the full protection mode leveraging RFS.

UniVerse 12.x architectural review

Two-proc mode is the term we use to describe the implementation of the System Buffer along with the architecture changes in UniVerse release 12.x. The System Buffer includes two core components:

  • AFT (Active File Table): shared by all the UniVerse sessions (uvsh) and tracks all the data files that have been opened. When a UniVerse file is opened, an AFT entry is populated with the file name and file header information. If files are moved around at the OS level, inconsistencies between the physical file and the information in the System Buffer results in problems. Usually, an AFT entry is associated with a physical file.
  • PUT (Page Unit Table): Each PUT entry is logically associated with a System Buffer page (page size configurable). The Buffers’ job is to cache the content of UniVerse files by groups. The PUT entries are also used to maintain group locks. So, at the user-level, the file operation modifies the Buffer pages (rather than the physical files organized by PUT).

UniVerse 12.2.1 uses AFT, even when the System Buffer is off. In this case, AFT contains only the items detailed below:

  • Reuses the AFT entries, but skips saving file headers in the AFT entry, only keeping some key elements like inode number of UniVerse files associated with the PUT.
  • PUT (Page Unit Table): Each PUT entry is logically associated with a System Buffer page (page size configurable). The Buffers’ job is to cache the content of UniVerse files by groups. The PUT entries are also used to maintain group locks. So, at the user-level, the file operation modifies the Buffer pages (rather than the physical files organized by PUT).

UniVerse 12.2.1 uses AFT, even when the System Buffer is off. In this case, AFT contains only the items detailed below:

  • Reuses the AFT entries, but skips saving file headers in the AFT entry, only keeping some key elements like inode number of UniVerse files associated with the PUT.
  • Reuses the PUT entries for locking purposes (instead of performing file I/O directly on physical files) but does not allocate actual Buffer pages to cache the UniVerse filegroups.

Behavior changes when the System Buffer is off

Compared to other modes in UniVerse 12.2.1, when UniVerse runs in the new third mode with the System Buffer off, the user will not notice behavioral changes, except for the following:

  • UniVerse will run in one-proc mode.
  • All System Buffer-related daemons will be disabled. All the resources used by the System Buffer will not be allocated.
  • In UniVerse 12.2.1 with the System Buffer off, the AFT entry for the file is automatically unloaded when the reference count reaches 0. Further, the “uvunload listall” command will never list the filename when its open count equals 0.

You may be asking, why is this important for me to understand. Simply put, when you change UniVerse to run from two process mode to single process mode, this cuts processes in half when managing user processes. The fact that the file is unloaded automatically when the open count is 0 is important when you move files around at the OS level, since it removes the potential for problems related to inconsistencies between the physical file and the information in the System Buffer.

Terminology

For more details on the following terminologies ̶ AFT, PUT, two-proc-mode, and uvunload, please refer to: