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.

Concurrent I/O<br />

The main problem addressed by concurrent I/O is <strong>VxFS</strong> inode lock contention. During a read() system<br />

call, <strong>VxFS</strong> will acquire the inode lock in shared mode, allowing many processes to read a single file<br />

concurrently without lock contention. However, when a write() system call is made, <strong>VxFS</strong> will attempt<br />

to acquire the lock in exclusive mode. The exclusive lock allows only one write per file to be in<br />

progress at a time, <strong>and</strong> also blocks other processes reading the file. These locks on the <strong>VxFS</strong> inode<br />

can cause serious <strong>performance</strong> problems when there are one or more file writers <strong>and</strong> multiple file<br />

readers.<br />

Figure 9. Normal shared read locks <strong>and</strong> exclusive write locks<br />

In the example above, Process A <strong>and</strong> Process B both have shared locks on the file when Process C<br />

requests an exclusive lock. Once the request for an exclusive lock is in place, other shared read lock<br />

requests must also block, otherwise the writer may be starved for the lock.<br />

With concurrent I/O, both read() <strong>and</strong> write() system calls will request a shared lock on the inode,<br />

allowing all read() <strong>and</strong> write() system calls to take place concurrently. Therefore, concurrent I/O<br />

will eliminate most of the <strong>VxFS</strong> inode lock contention.<br />

15

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

Saved successfully!

Ooh no, something went wrong!