Sponsored Content
Full Discussion: Named pipe performance
Top Forums Shell Programming and Scripting Named pipe performance Post 302554751 by alister on Tuesday 13th of September 2011 01:39:05 AM
Old 09-13-2011
To my knowledge, increasing the size of pipe and fifo (named pipe) buffers requires tweaking a header file and recompiling the kernel. The parameter in question is PIPE_BUF.

If you're using a recent linux, it's probably 64K. On an older linux, I believe it's 4K. On some other UNIX systems, it may be as low as 512 bytes (I believe this is the minimum allowed by POSIX).

You should be able to check the value with getconf PIPE_BUF pathname, where "pathname" is the path to the named pipe or the directory in which the named pipe will be located.

Regards,
Alister

Last edited by alister; 09-13-2011 at 02:54 AM..
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

IPC using named pipe

Hi All, I am facing a vague issue while trying to make two process talk to each other using named pipe. read process ========= The process which reads, basically creates FIFO using mkfifo - ret_val = mkfifo(HALF_DUPLEX, 0666);) func. It then opens the pipe using open func - fd =... (1 Reply)
Discussion started by: sharanbr
1 Replies

2. Programming

IPC using named pipe

Hi All, I am facing a vague issue while trying to make two process talk to each other using named pipe. read process ========= The process which reads, basically creates FIFO using mkfifo - ret_val = mkfifo(HALF_DUPLEX, 0666) func. It then opens the pipe using open func - fd = open... (2 Replies)
Discussion started by: sharanbr
2 Replies

3. UNIX for Advanced & Expert Users

named pipe with persistent buffer

Hey folks, i need communicate between 2 processes in a reliable manner. The information delivery has to be guarenteed. I thought about proc 2 sending a signal to proc 1 when information has being written to disc and wirte() has been verified (sync/flush). The IPC method for the data is named... (4 Replies)
Discussion started by: heck
4 Replies

4. UNIX for Dummies Questions & Answers

Named PIPE

Gurus, I've a File Transaction Server, which communicates with other servers and performs some processing.It uses many Named PIPE's. By mistake i copied a named PIPE into a text file. I heard that PIPE files shouldn't be copied.Isn't it? Since it's a production box, i'm afraid on... (2 Replies)
Discussion started by: Tamil
2 Replies

5. UNIX for Advanced & Expert Users

will a named pipe always be size 0 on filesystem?

I did cat < myFile >> myPipe I was hoping that if I did ls -l, myPipe would now be holding the contents of myFile, and would be the same size. But it was 0. Also strange was that when I did the command above, cat did not return control back to the shell. Why? thanks (4 Replies)
Discussion started by: JamesByars
4 Replies

6. UNIX for Dummies Questions & Answers

Filtering mail into a named pipe

Hello, On my machine, all mail is stored in my /var/spool/mail. IS there a way to direct all mail that goes there into a namep pipe? Thank you, Dado (4 Replies)
Discussion started by: dadoprso
4 Replies

7. Shell Programming and Scripting

pipe to file named with date

I would like to pipe (redirect ? - what is the right term?) the output of my script to a file named with the current date. If I run this at a command prompt: date +'%Y%m%d" ...it returns "20110429" OK, that's good... so I try: ./script.sh > "'date +%Y%m%d'.csv" I get a file... (1 Reply)
Discussion started by: landog
1 Replies

8. Programming

Named pipe behavior in Linux

Hi All ! I try to collect importent events from syslog and in my syslog conf, there is something like this: *.* |/logs/ipes/SLpipe1 I have a program, which opens this pipe and reads the messages from it. But how this pipe works ? Where can I probably read something about the details,... (3 Replies)
Discussion started by: mabra
3 Replies

9. UNIX for Dummies Questions & Answers

Named pipe hanging?

Ok, I can't seem to figure this out or find anything on the web about this. I'm on Sun Solaris, UNIX. I have the following test script: #!/bin/ksh touch test.file LOG=./tmp.log rm -f ${LOG} PIPE=./tmp.pipe mkfifo ${PIPE} trap "rm -f ${PIPE}" EXIT tee -a ${LOG} < ${PIPE} & ... (17 Replies)
Discussion started by: Ditto
17 Replies

10. Shell Programming and Scripting

How to test named pipe file?

Hi ALL, How can I test a given file name exists and if it is a named pipe file in shell script ? Thanks............ (2 Replies)
Discussion started by: mycode.in
2 Replies
STRUCT 
PIPE_INODE_IN(9) pipes API STRUCT PIPE_INODE_IN(9) NAME
struct_pipe_inode_info - a linux kernel pipe SYNOPSIS
struct pipe_inode_info { struct mutex mutex; wait_queue_head_t wait; unsigned int nrbufs; unsigned int curbuf; unsigned int buffers; unsigned int readers; unsigned int writers; unsigned int files; unsigned int waiting_writers; unsigned int r_counter; unsigned int w_counter; struct page * tmp_page; struct fasync_struct * fasync_readers; struct fasync_struct * fasync_writers; struct pipe_buffer * bufs; }; MEMBERS
mutex mutex protecting the whole thing wait reader/writer wait point in case of empty/full pipe nrbufs the number of non-empty pipe buffers in this pipe curbuf the current pipe buffer entry buffers total number of buffers (should be a power of 2) readers number of current readers of this pipe writers number of current writers of this pipe files number of struct file refering this pipe (protected by ->i_lock) waiting_writers number of writers blocked waiting for room r_counter reader counter w_counter writer counter tmp_page cached released page fasync_readers reader side fasync fasync_writers writer side fasync bufs the circular array of pipe buffers COPYRIGHT
Kernel Hackers Manual 3.10 June 2014 STRUCT PIPE_INODE_IN(9)
All times are GMT -4. The time now is 07:01 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy