File Access Caching with Local Disk

Accessing a file on disk or over a network is hundreds of times slower than reading a cached copy from memory. Many types of cache exist to speed up file accesses. Changing your workload to make it more “cache friendly” can result in very significant performance benefits.

We’ll start by looking at the simplest configuration, the open, fstat, read, write, and mmap operations on a local disk with the default UFS file system, as shown in Figure 12-2.

Figure 12-2. File Access Caches for Local Disk Access

There are a lot of interrelated caches. They are systemwide caches, shared by all users and all processes. ...

Get Sun Performance and Tuning: Java™ and the Internet, Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.