Operating System - HP-UX
1847614 Members
3718 Online
110265 Solutions
New Discussion

streampipes kernel parameter

 
Brian_71
Occasional Advisor

streampipes kernel parameter

What are the implications of setting the streampipes kernel parameter to 1. Oracle email server needs it, just wonder why it's defaulted to 0
4 REPLIES 4
A. Clay Stephenson
Acclaimed Contributor

Re: streampipes kernel parameter

I will admit right up front that I am speculating but I suspect that the reason the value is set to 0 by default is that streambased pipes almost certainly impose a small overhead on the vast majority of pipe operations which don't need them. The main use of streams is to 'push' modules either through
an ioctl(I_PUSH) call or using the autopush command. These modules typically perform a transformation (e.g. encryption, compression) on the data stream as is passes through the module. These modules serves as filters. When the modules are no longer needed they are generally removed from the IO stream with an ioctl(I_POP) system call.


In any event, you need them. I spent a few minutes regenning the kernel on my 11.11 sandbox and I could not observe any noticable delays associated with typical pipe operations - I did a few pipe commands using dd before and after setting streampipes to 1 and the performance values did not differ significantly. There is almost some additional overhead but the effects appear top be small.

Regards, Clay
If it ain't broke, I can fix that.
Brian_71
Occasional Advisor

Re: streampipes kernel parameter

Do you know the details as to what the system uses when steampipes is not enabled? Do you see any applications working while it is disabled having an issue with enabling it?
A. Clay Stephenson
Acclaimed Contributor

Re: streampipes kernel parameter

Hi Brian:

Again, I am speculating as I don't have HP-UX source code but I suspect that the behavior of stream-based pipe will be identical to non-stream based pipes unless modules have been pushed on the stram. This essentially gives the application developer greater flexibility in approaching what is otherwise a difficult task. The only downside that I envision is perhaps just a tiny bit of overhead each time a process opens a pipe; the kernel has to do a little bit extra to allow for the module 'hooks'. I assume that if no modules are pushed what you get are in essence plain, vanilla pipes. I've run a few more operations on my sandbox since enabling the feature and so far I see no difference in behavior and no noticeable difference in performance. The bottom line is that your application has got to be able to push modules so if you want the application, you've got to enable streampipes.
If it ain't broke, I can fix that.
James Murtagh
Honored Contributor

Re: streampipes kernel parameter

Hi Brian,

There is in fact a (small) overhead in some cases using stream based pipes over file system pipes. Basically the code will delay the hangup of the pipe 10 times before closing to ensure there is no more data to be passed. In real terms this translates to ten context switches or 10 * timeslice, which for most systems will be 0.1 secs. So if your shell script is using lots of pipes, expect the execution time to increase.

This is due to be revised at HPUX 11.23 (11i v 2.3) when the PA-64 and IA-64 systems converge.

Hope this helps.