18.07.2013 Views

HP-UX VxFS tuning and performance - filibeto.org

HP-UX VxFS tuning and performance - filibeto.org

HP-UX VxFS tuning and performance - filibeto.org

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

The read flush behind feature has the advantage of preventing a read of a large file (such as a<br />

backup, file copy, gzip, etc) from consuming large amounts of file cache. However, the disadvantage<br />

of read flush behind is that a file may not be able to reside entirely in cache. For example, if the file<br />

cache is 6 GB in size <strong>and</strong> a 100 MB file is read sequentially, the file will likely not reside entirely in<br />

cache. If the file is re-read multiple times, the data would need to be read from disk instead of the<br />

reads being satisfied from the file cache.<br />

The read flush behind feature cannot be disabled directly. However, it can be tuned indirectly by<br />

setting the <strong>VxFS</strong> flush behind size using write_pref_io <strong>and</strong> write_nstream. For example, increasing<br />

write_pref_io to 200 MB would allow the 100 MB file to be read into cache in its entirety. Flush<br />

behind would not be impacted if fcache_fb_policy is set to 0 (default), however, flush behind can be<br />

impacted if fcache_fb_policy is set to 1 or 2.<br />

The read flush behind can also impact <strong>VxFS</strong> read ahead if the <strong>VxFS</strong> read ahead size is greater than<br />

the write flush behind size. For best read ahead <strong>performance</strong>, the write_pref_io <strong>and</strong> write_nstream<br />

values should be greater than or equal to read_pref_io <strong>and</strong> read_nstream values.<br />

Note<br />

For best read ahead <strong>performance</strong>, the write_pref_io <strong>and</strong> write_nstream<br />

values should be greater than or equal to read_pref_io <strong>and</strong> read_nstream<br />

values.<br />

Buffer sizes on <strong>HP</strong>-<strong>UX</strong> 11i v2 <strong>and</strong> earlier<br />

On <strong>HP</strong>-<strong>UX</strong> 11i v2 <strong>and</strong> earlier, cached I/O is performed through the <strong>HP</strong>-<strong>UX</strong> buffer cache. The<br />

maximum size of each buffer in the cache is determined by the file system tunable max_buf_data_size<br />

(default 8k). The only other value possible is 64k. For reads <strong>and</strong> writes larger than<br />

max_buf_data_size <strong>and</strong> when performing read ahead, <strong>VxFS</strong> will chain the buffers together when<br />

sending them to the Volume Management subsystem. The Volume Management subsystem holds the<br />

buffers until <strong>VxFS</strong> sends the last buffer in the chain, then it attempts to merge the buffers together in<br />

order to perform larger <strong>and</strong> fewer physical I/Os.<br />

Figure 7. Buffer merging<br />

8K<br />

more<br />

8K<br />

more<br />

8K<br />

more<br />

8K<br />

more<br />

8K<br />

more<br />

8K<br />

more<br />

8K<br />

more<br />

The maximum chain size that the operating system can use is 64 KB. Merged buffers cannot cross a<br />

“chain boundary”, which is 64 KB. This means that if the series of buffers to be merged crosses a 64<br />

KB boundary, then the merging will be split into a maximum of 2 buffers, each less than 64 KB in<br />

size.<br />

If your application performs writes to a file or performs r<strong>and</strong>om reads, do not increase<br />

max_buf_data_size to 64k unless the size of the read or write is 64k or greater. Smaller writes cause<br />

the data to be read into the buffer synchronously first, then the modified portion of the data will be<br />

updated in the buffer cache, then the buffer will be flushed asynchronously. The synchronous read of<br />

the data will drastically reduce <strong>performance</strong> if the buffer is not already in the cache. For r<strong>and</strong>om<br />

reads, <strong>VxFS</strong> will attempt to read an entire buffer, causing more data to be read than necessary.<br />

8K<br />

64K<br />

11

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!