Translators/performance/io-cache

From GlusterDocumentation

Translator performance/io-cache

The IO-Cache translator is useful on both the client and server sides of a connection.

If this translator is loaded on the client side, it may help reduce the load on both the network and the server when the client is accessing files just for reading (and the files are not edited on the server between reads). This would, For example, greatly improve the compilation of a kernel where header files are accessed over and over.

If this translator is loaded on the server side, it will allow the server to keep data that is being accessed from multiple clients simultaneously fresh in its cache.


A sample IO-Cache config:

volume io-cache
  type performance/io-cache
  option cache-size 64MB             # default is 32MB
  option priority *.h:3,*.html:2,*:1 # default is '*:0'
  option cache-timeout 2             # default is 1 second
  subvolumes <x>
end-volume


  • priority

Values must comprise of comma-separated <pattern>:<prio> tuples, where <pattern>s are like *.mpg format and <prio> is an integer.|| Assigns priority to filenames with specific patterns so that when a page needs to be ejected out of the cache, the page of a file whose priority is the lowest will be ejected earlier.

  • cache-timeout (force-revalidate-timeout)

If the cached page for a file is greater than 'cache-timeout' seconds old, io-cache translator forces a re-validation of the page. However the cached page is verified against the mtime whenever possible and cache is refreshed. Default is 1 second.

  • cache-size

Size of the IO cache. Specifies how much of read data can be cached. Default is 64MB.

 

Copyright © Red Hat, Inc. All Rights Reserved.