24.05.2014 Views

AIX Version 4.3 Differences Guide

AIX Version 4.3 Differences Guide

AIX Version 4.3 Differences Guide

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 maximum number of file descriptors per process is defined by the constant<br />

OPEN_MAX. In <strong>AIX</strong> <strong>4.3</strong>.1 it is 32767.<br />

However, this change can create certain compatibility problems with programs<br />

that were compiled with the old OPEN_MAX value of 2000. So there must be a<br />

way to enforce the old OPEN_MAX value for existing programs, yet allow new<br />

programs to exploit the new capability. This has been done with the existing<br />

resource limit functions. There was already a limit for number of available file<br />

descriptors, but it has always been set to RLIM_INFINITY. In <strong>AIX</strong> <strong>4.3</strong>.1, the<br />

setrlimit() and getrlimit() system calls can be used to maintain specific values for<br />

RLIMIT_NOFILE. By default, the soft limit will be the old value of OPEN_MAX,<br />

2000. The default and maximum hard limit will be the new OPEN_MAX value,<br />

32767. With these limits, everything should continue to work as before with no<br />

user intervention. If a user increases the soft limit, then programs written to<br />

exploit the increased table size can be used.<br />

In addition to the system calls for managing limits, the user can change their limit<br />

for number of file descriptors with the ulimit -n command. Because the hard limit<br />

is set to OPEN_MAX, any user can increase the limit, privileged access is not<br />

required.<br />

2.10 Multiple Concurrent JFS Reads (<strong>4.3</strong>.1)<br />

<strong>AIX</strong> uses a simple lock type to serialize access to the in-core inode of a file or<br />

directory on a JFS file system. This is to ensure data integrity, particularly on MP<br />

systems, where multiple threads can be accessing an inode simultaneously.<br />

When reading a file, the lock is used to serialize updates to the last access time<br />

stamp in the inode. This lock has been identified as a potential performance<br />

bottleneck in the situation where multiple threads are attempting to read the same<br />

file, particularly when migrating from UP to MP systems.<br />

This type of problem affects customers who use databases on JFS file systems<br />

and do not have a choice because their database application does not support<br />

raw partitions. Examples include Progress, and Universe, to name two. There are<br />

also some large customers who use JFS for their databases. The problem stems<br />

from the length of time the lock is held. A thread would obtain the lock and then<br />

initiate the I/O to read the required data before updating the access time field in<br />

the inode and releasing the lock. During this time, other threads would be blocked<br />

from accessing the file.<br />

To alleviate this problem, <strong>AIX</strong> <strong>4.3</strong>.1 has changed the mechanism for reads from<br />

JFS file systems to minimize the length of time the inode lock is held by a thread.<br />

When only one thread is reading the file, no change has been made. The reading<br />

thread obtains the inode lock and sets a flag in the inode to indicate that a read<br />

operation is in place. When the I/O for the read is complete, the thread updates<br />

the access time field in the inode and releases the lock.<br />

When a thread attempts to get the inode lock and determines that a read is in<br />

progress, instead of blocking on the inode lock, it calls a kernel service to<br />

pre-read the data it requires. Once the pre-read has completed, the thread will<br />

attempt to obtain the inode lock to update the access time field. This solution<br />

reduces the amount of time a thread is required to hold the inode lock when<br />

20 <strong>AIX</strong> <strong>Version</strong> <strong>4.3</strong> <strong>Differences</strong> <strong>Guide</strong>

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

Saved successfully!

Ooh no, something went wrong!