Memory File System (MemFS) 1.0 for HP-UX 11i v3 Administrator’s Guide First Edition Manufacturing Part Number: 5992-5788 December 2008 © Copyright 2008 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) 1.0 Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 Need for a Memory-Based File System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 Architecture of HP-UX Memory File System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Application Areas for HP-UX Memory File System. . . . . . . . . . . . . . . . . . . . . .
Contents 4
About This Document The Memory File System (MemFS) 1.0 for HP-UX 11i v3 Administrator’s Guide describes how to install, configure, and tune MemFS on HP-UX 11i v3. Intended Audience This document is for system administrators responsible for installing and configuring MemFS on HP-UX 11i v3. Readers are expected to have knowledge of: • HP-UX System administration concepts • UNIX operating system concepts • UNIX File system concepts Document Organization The Memory File System (MemFS) 1.
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) 1.0 This chapter introduces you to the HP-UX implementation of Memory File System (MemFS). The following topics are discussed: • Overview • Need for a Memory-Based File System • Architecture of HP-UX Memory File System • Application Areas for HP-UX Memory File System • Dependencies 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) 1.0 Need for a Memory-Based File System 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) 1.0 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) 1.0 Architecture of HP-UX Memory File System UFC are not treated specially from the pages of other file systems. Periodically, the VM paging algorithm reallocates the less used pages including the MemFS pages from the UFC. When VM paging algorithm decides to reallocate MemFS pages during memory pressure, the MemFS files data will be written directly to system swap device.
Introducing HP-UX Memory File System (MemFS) 1.
Introducing HP-UX Memory File System (MemFS) 1.0 Application Areas for HP-UX Memory File System 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 of files to disk, so directory and file manipulation is always a performance gain.
Introducing HP-UX Memory File System (MemFS) 1.0 Dependencies Dependencies Following is a list of patches that are required for MemFS: • PHCO_38751 • PHCO_38752 • PHCO_39038 • PHCO_39039 • PHKL_38077 • PHKL_38949 These patches are available at the following location: http://itrc.hp.com Without these patches, MemFS cannot be installed. MemFS product should not be installed with -x enforce_dependencies=false option of swinstall(1m).
Introducing HP-UX Memory File System (MemFS) 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 can be created either through a mount(1m) command, or automatically through an entry in the /etc/fstab file or by calling mount(2m) system call.
Installing, Configuring, Tuning, and Removing HP-UX Memory File System Configuring Memory File System The size and ninode values can be modified by remounting the instance with the remount option. For example, to modify the size of the MemFS file system to 100M mounted on /tmp. # /usr/sbin/mount –F memfs -o remount,size=100M /tmp An MemFS instance can be destroyed using the umount(1m) command.
Installing, Configuring, Tuning, and Removing HP-UX Memory File System Tuning Memory File System Tuning Memory File System MemFS uses kernel memory for storing the file's metadata. Kernel memory is shared by all the subsystems in the kernel and this memory is not page-able. Over-use of kernel memory can bring down the performance of the system as well as the applications that compete for kernel memory.
Installing, Configuring, Tuning, and Removing HP-UX Memory File System Tuning Memory File System 3. A constant value: A positive whole number that represents number of bytes of kernel memory, optionally followed by a multiplier suffix, where K=1000, KB=1024, M=1000000, MB=(1024*1024), and GB=(1024*1024*1024). For example, a constant value could be 500K.
Installing, Configuring, Tuning, and Removing HP-UX Memory File System Tuning Memory File System MemFS file systems have huge data, can reduce the amount of swap space available to other applications and will negatively impact system performance or applications might fail because of low swap condition. The value of memfs_swapmax_pct may need to be raised on systems with a large amount of data used for MemFS file systems.
Installing, Configuring, Tuning, and Removing HP-UX Memory File System Tuning Memory File System • swpcnt Specifies the number of MemFS blocks in the swap. For example: # sar -z 1 10 HP-UX machine B.11.31 U ia64 15:39:59 blkcnt 15:40:00 30031 0 15:40:01 30031 0 15:40:02 30031 0 11/26/08 swpcnt GlancePlus GlancePlus, C.04.70.000 provides MemFS details similar to sar(1M) command. The Memory Report page shows the number of 4KB blocks of MemFS in memory and swap.
Installing, Configuring, Tuning, and Removing HP-UX Memory File System Removing Memory File System Removing Memory File System To remove MemFS, enter the following command: # swremove -x autoreboot=true MemFS 22 Chapter 2
Installing, Configuring, Tuning, and Removing HP-UX Memory File System Known Problems and Other Limitations Known Problems and Other Limitations Known Problems • On large memory usage of MemFS file system instances, such as when MemFS pages occupy memory equal to the total RAM, the system may experience slow responses. Other Limitations • Since many HP-UX applications store critical data in /tmp, not being able to recover /tmp can cause serious damage to the consistency of such applications.