Dismiss
InnovationQ will be updated on Sunday, Oct. 22, from 10am ET - noon. You may experience brief service interruptions during that time.
Browse Prior Art Database

Adaptive Mapped File Read Ahead Algorithm

IP.com Disclosure Number: IPCOM000120113D
Original Publication Date: 1991-Mar-01
Included in the Prior Art Database: 2005-Apr-02
Document File: 2 page(s) / 84K

Publishing Venue

IBM

Related People

Chang, A: AUTHOR [+5]

Abstract

The approach of using memory mapped files vs. unmapped files invalidates some of the previous methods of enhancing file system performance. For example, with unmapped files, some read ahead decisions were made at the logical file system level. With the mapped file approach, using load and store instructions to read and write files, the logical layer disappears. This article describes an approach to generating file system read ahead at the Virtual Memory Management (VMM) layer that works in the mapped environment.

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 52% of the total text.

Adaptive Mapped File Read Ahead Algorithm

      The approach of using memory mapped files vs. unmapped
files invalidates some of the previous methods of enhancing file
system performance.  For example, with unmapped files, some read
ahead decisions were made at the logical file system level.  With the
mapped file approach, using load and store instructions to read and
write files, the logical layer disappears.  This article describes an
approach to generating file system read ahead at the Virtual Memory
Management (VMM) layer that works in the mapped environment.

      An additional concern is that generating read aheads to a file
system may result in wasted CPU path length and unnecessary disk I/O
operations.  Thus, it is important not to generate spurious read
ahead requests.  This approach carefully discriminates between random
and sequential accessing patterns in order to achieve the benefits of
reading ahead for sequentially accessed files while not penalizing
random accessing patterns.

      The VMM "sees" file accesses via page faults when a file page
is first accessed.  In order to establish sequentially, some state
information must be preserved.  We maintain two pieces of information
for each file.
      1) LAST.  This variable takes on two different meanings. When
we are not reading ahead, LAST has the value of the last page fault
address in this file. After entering read ahead mode, it has the
address of the most recently hidden page.
      2) The present read ahead size (SIZE).  In addition, there is a
parameter (MAX) that sets the maximum number of pages that can be
read ahead.  The value of MAX is a trade-off based on the
characteristics of the disk adapter, the disk control-ler and its
buffering, the disk characteristics, as well as the relative speed of
the CPU.  A typical value of MAX is eight pages, which allows
sufficient read ahead of pages to minimize I/O wait time.

      Entering read ahead mode: Initially LAST and SIZE are zero.
When a page fault occurs, LAST is set to that address.  If we are not
in re...