Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!cs.utexas.edu!chinacat!balkan!crcaus!john From: john@crcaus.cactus.org (John R. Miller) Newsgroups: comp.unix.aix Subject: Re: run-time settting of PIPE_BUF Summary: pipe size is 32k Message-ID: <320@crcaus.cactus.org> Date: 12 Jun 91 06:30:22 GMT References: <1991Jun10.165521.10248@murdoch.acc.Virginia.EDU> <1991Jun10.185820.8120@rice.edu> Reply-To: john@crcaus.UUCP (John R. Miller) Organization: home Lines: 35 In article <1991Jun10.185820.8120@rice.edu> zdenko@katzo.rice.edu (zdenko tomasic) writes: >Does anybody know how to change the pipe buffer PIPE_BUF? It can't be changed. >... I suspect >that it has a value of 512 bytes (POSIX conformance?), nope >... but according >to /usr/include/sys/limits.h, it can be increased to 32KB at >run-time. I was not able to find out from info how to achieve that. It's always 32k. You can demonstrate this by doing a blocking write of 32k to a pipe that has one byte in it already. The write will block because AIX guarantees it will deliver writes of less than 32k atomically, but it can't because there isn't enough room in the pipe. If the pipe is empty the write will succeed, because there is enough room to write it all at once. If the write is larger than 32k the write will succeed but it won't be delivered to the pipe (and thus readers) atomically. Atomic writes aren't guaranteed for writes larger than 32k. >Default pipe behavior in AIX is rather inefficient with too many >context switches. If you are seeing too many context switches, I don't think it's caused by pipe buffers filling up. disclaimer: I've been wrong before. -- John R. Miller 13102 Briar Hollow Dr. Austin, Texas 78729 hm: 512/331-0155 john@crcaus.cactus.org or ..cs.utexas.edu!bigtex!crcaus!john wk: 512/823-3867 john@glasnost.austin.ibm.com