Memory File System (MemFS) 1.0 for HP-UX 11i v3
Introducing HP-UX Memory File System (MemFS) 1.0
Architecture of HP-UX Memory File System
Chapter 1 9
created, accessed frequently in a short span of time and then deleted. The advantage comes
from not having to update large amounts of metadata on file creation - growing the file - and
then deletion and cleanup. The write-to-swap feature of memory-based file systems efficiency
has direct correlation with the swap activity. As the swap activity increases, the file system
performance decreases.
Architecture of HP-UX Memory File System
The memory file-based system which is available as a configurable product in HP-UX 11i v3 is
more advanced when compared to the MemFS on HP-UX 11iv2. A file system has the concept
of disk layout, which refers to how information such as the superblock, inodes and the data
blocks are organized on the disk. HP-UX 11iv3 MemFS has its own new layout, which stores
file data in the UFC (Unified File Cache) and metadata in the kernel memory. It does not use
the user process address space as backing store for the files data, during memory pressure. It
has all the features needed for a basic file system. Some of the more advanced file system
features (e.g. journaling, un-buffered I/O) that some of the contemporary file systems provide
are neither required nor relevant in the context of a memory file system.
A MemFS is created from a mount (1M) command. The mount operation just creates the
necessary data structures which are part of the new layout. It neither pre-allocates the inodes
or any memory as the backing store for the file data. The following data structures are created
as part of the mount operation:
• Directory entry hash table
• Inode hash table
• The root directory of the mount instance
• VFS Structure
Subsequent to a mount, the MemFS can be used just like any other file system, with the same
commands and system calls, as used on other file systems. From an application or user
perspective there should be nothing that differentiates it from any other file system, except a
better response time.
Internally, MemFS behaves differently from other file systems. Its directory entries are
organized in the Directory entry hash table, for faster lookup. The syncer (1M)1 daemon,
which periodically flushes "dirty" file system pages to disk, does not have an effect on MemFS
pages, as MemFS pages are never added to the syncer dirty list - which is processed
periodically for flushing. The metadata of each MemFS instance is allocated from the kernel
memory which can not be swapped. MemFS files data is store in UFC. The MemFS pages in