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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

specified socket. The system call dynamically caches the data in the NBC, thus<br />

improving performance for files that are sent frequently across the network, and<br />

which do not change often. This feature can be disabled on a file by file basis.<br />

The application sending the data will need to be altered to use the send_file call.<br />

The greatest improvement in performance can be gained by using direct I/O to<br />

read the file that is to be transmitted. This can be achieved simply by opening the<br />

file using the O_DIRECT flag. This flag enables send_file to bypass the JFS<br />

cache when reading the file, thus further reducing the number of data transfers<br />

required.<br />

The size of the NBC, and various cache tuning parameters can be altered using<br />

the no command. The options that can be changed are:<br />

nbc_limit<br />

nbc_max_cache<br />

Maximum size of the NBC. Specifies in KB the maximum<br />

amount of memory that can be used for the NBC. The<br />

default value is derived from the size of the mbuf pool<br />

(thewall), which in turn, is determined from the amount of<br />

physical memory. If a system has less than 512 MB of<br />

memory, the default value of nbc_limit is 0.<br />

Maximum size of a cache object in the NBC. Specified in<br />

bytes, default value is 131072 (128 KB) bytes.<br />

nbc_min_cache Minimum size of a cache object in the NBC. Specified in<br />

bytes, default value is 1.<br />

send_file_duration Specifies the cache validation duration for all the file objects<br />

that system call send_file accessed in the Network Buffer<br />

Cache. This attribute is in number of seconds, the default is<br />

300 for 5 minutes. 0 means that the cache will be validated<br />

for every access.<br />

Cache statistics can be viewed using the command netstat -c. Sample output is<br />

shown in Figure 9.<br />

Figure 9. Sample Output from netstat -c Command<br />

Application Development and Pthreads 81

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

Saved successfully!

Ooh no, something went wrong!