HP-UX Memory File System (MemFS) 2.0 Administrator’s Guide Second Edition Manufacturing Part Number: 5992-2360 August 2007 © Copyright 2007 Hewlett-Packard Development Company L.P.
Legal Notices Confidential computer software. Valid license from HP required for possession, use or copying. Consistent with FAR 12.211 and 12.212, Commercial Computer Software, Computer Software Documentation and Technical Data for Commercial Items are licensed to the U.S. Government under vendor’s standard commercial license. The information contained herein is subject to change without notice.
Contents 1. Introducing HP-UX Memory File System (MemFS) Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 Need for a Memory-Based File System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 Architecture of HP-UX Memory File System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 MemFS User Process Backing Store . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Contents 4
About This Document The HP-UX Memory File System (MemFS) 2.0 Administrator’s Guide describes how to install, configure, and tune the HP-UX MemFS 2.0. Intended Audience This document is for system administrators responsible for installing and configuring MemFS on HP-UX 11i v2. Readers are expected to have knowledge of: • HP-UX System administration concepts • UNIX operating system concepts • UNIX File system concepts Document Organization The HP-UX Memory File System (MemFS) 2.
Table 2 Typographic Conventions (Continued) Typeface Usage Examples italic New terms, book titles, emphasis, variables replaced with a name or value See the HP-UX Memory File System (MemFS) 1.0 Administrator’s Guide for details.
1 Introducing HP-UX Memory File System (MemFS) This chapter introduces you to the HP-UX implementation of Memory File System (MemFS). The following topics are discussed: • Overview • Architecture of HP-UX Memory File System • Application Areas for HP-UX Memory File System • Design Limitations • Known Problems • Other Limitations Overview A Memory-based File System (MemFS) is a file system that resides in memory. It does not normally write data out to stable storage.
Introducing HP-UX Memory File System (MemFS) Overview Need for a Memory-Based File System A memory-based file system is typically used as storage for temporary files. By keeping as much data as possible in memory, it avoids having to perform disk I/O and the associated overhead. Traditional file systems manage two types of data. One is the file content (called data), which an application accesses through the read, write and mmap mechanisms.
Introducing HP-UX Memory File System (MemFS) Architecture of HP-UX Memory File System 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.
Introducing HP-UX Memory File System (MemFS) Architecture of HP-UX Memory File System Internally a MemFS behaves differently from other file systems. The syncer (1M)1 daemon, which periodically flushes "dirty" file system pages to disk, does not have an effect on MemFS buffers, as MemFS buffers are never added to the syncer dirty list - which is processed periodically for flushing. Periodically the VM paging algorithm reallocates the less used pages from the buffer cache and user address spaces.
Introducing HP-UX Memory File System (MemFS) Application Areas for HP-UX Memory File System Figure 1-1 MemFS Backing Store Application Areas for HP-UX Memory File System Applications that will benefit most from HP-UX MemFS are those that perform mostly metadata intensive operations like creating and deleting small files and directories. For example compilers, editors and sorting applications. MemFS never writes metadata for files to disk, so directory and file manipulation is always a performance gain.
Introducing HP-UX Memory File System (MemFS) Design Limitations Design Limitations MemFS uses the Hierarchical File System (HFS) as its base, and, as a result, inherits several HFS functions that increase usage overhead. This includes the overhead of a disk based file system structure, static allocation, and pre-initialization of inodes. Also, lack of kernel pageable memory in HP-UX 11i v2 creates a requirement to pre-allocate user memory at mount time, increasing memory requirements for MemFS.
Introducing HP-UX Memory File System (MemFS) Other Limitations Since MemFS uses the buffer cache, it has some of the same limitations with regards to many processes accessing a single buffer. This may have performance implications when many processes access the same file at the same time. These limitations will be the focus of future versions of MemFS.
Introducing HP-UX Memory File System (MemFS) Other Limitations 14 Chapter 1
2 Installing, Configuring, Tuning, and Removing HP-UX Memory File System This chapter describes how to install, configure, tune and remove HP-UX Memory File System (MemFS). The following topics are discussed: • Installing HP-UX Memory File System • Configuring Memory File System • Tuning Memory File System • Removing Memory File System Installing HP-UX Memory File System You can install HP-UX Memory File System (MemFS) either non-interactively or interactively.
Installing, Configuring, Tuning, and Removing HP-UX Memory File System Configuring Memory File System Configuring Memory File System A MemFS instance requires allocation of a memory area to be associated with it, whose size is equal to the size of the MemFS file system instance. The mount command will fail if it cannot allocate enough memory. Sufficient disk space must be configured to the system swap device for mount to succeed.
Installing, Configuring, Tuning, and Removing HP-UX Memory File System Tuning Memory File System Tuning Memory File System Tuning the MemFS buffer cache size is very important because MemFS stores data and metadata in the buffer cache. The amount of memory in the buffer cache used for MemFS can be tuned using the following dynamic tunables on HP-UX 11i v2. These tunables can be modified without a system reboot.
Installing, Configuring, Tuning, and Removing HP-UX Memory File System Removing Memory File System If the MemFS usage is expected to be high on the system, then it is desirable to tune the buffer cache size to greater than 75% of system memory size. This can be tuned using the command kctune dbc_max_pct=. If the MemFS usage is expected to be low on the system, then the buffer cache size need not be resized.