About the NPAM
The Teradata Named Pipe Access Module provides an inter-process communication link between a writer process (such as FastExport) and a reader process (such as FastLoad).
Where it started:
One of our customers reported a performance problem when data is transferred via Named Pipes access module (NPAM) using non-blocking Named Pipe. In non-blocking mode, the data is read from the pipe until end-of-file (EOF) is received. In order to fix the performance problem, a new feature was implemented in the NPAM where “pipe_wait” parameter was introduced.
The following picture depicts how the NPAM polls the pipe when the data is transferred using Named Pipe in non-blocking mode.
How it happens:
The NPAM functionality before introducing this feature
The sleep interval for polling the pipe when Named Pipe is operated in non-blocking mode was 1 second or 1000 milliseconds (not user configurable). The disadvantage of this behavior is that it increases the waiting time and thereby hinders the performance of the data transfer activity.
The NPAM functionality after introducing this feature
The sleep interval for polling the pipe when Named Pipe is operated in non-blocking mode is made user configurable by introducing a new parameter “pipe_wait”. This parameter takes the time interval value (in milliseconds) which is used for sleep operation while polling the pipe for the availability of the data to be transferred in non-blocking mode. The default value of this parameter is 10 milliseconds. Please note that the value to this parameter is passed by the user in the initialization string while invoking the NPAM library.
The dynamic incremental sleep interval has been implemented (whose logic is depicted in below diagram) to reduce the wait time during the pipe polling activity.
Examples for dynamic incremental sleep interval (based on the logic implemented):
Benefits of this feature: