why size of PIPE_BUF is 4096

why size of PIPE_BUF is 4096

Post by Guillaume dubu » Thu, 12 Nov 1998 04:00:00



        Just two little question:
                1:Why the size of PIPE_BUF is 4096 and not the size of
PAGE_SIZE?(perhaps POSIX's norms?).
                2:Why the flag O_NODELAY is not implemented for pipe?(yes this flag is
not POSIX).

        thank you in advance.
        (Sorry my english is very poor...)

--
     Dubun Guillaume  

"...Unix, MS-DOS, and Windows NT (also known as the Good, the Bad, and
the Ugly)." (By Matt Welsh)

 
 
 

why size of PIPE_BUF is 4096

Post by Andi Klee » Thu, 12 Nov 1998 04:00:00




>    Just two little question:
>            1:Why the size of PIPE_BUF is 4096 and not the size of
> PAGE_SIZE?(perhaps POSIX's norms?).

That is an oversight - it should be PAGE_SIZE.  Thank you for reporting
the bug.

Quote:>            2:Why the flag O_NODELAY is not implemented for pipe?(yes this flag is
> not POSIX).

Hmm? The flag should work just fine one pipes, returning EAGAIN when the
pipe buffer is full. Do you have any evidence that it doesn't work?

-Andi

 
 
 

why size of PIPE_BUF is 4096

Post by M Sweg » Wed, 18 Nov 1998 04:00:00




: >  Just two little question:
: >          1:Why the size of PIPE_BUF is 4096 and not the size of
: > PAGE_SIZE?(perhaps POSIX's norms?).
: That is an oversight - it should be PAGE_SIZE.  Thank you for reporting
: the bug.

: >          2:Why the flag O_NODELAY is not implemented for pipe?(yes this flag is
: > not POSIX).

: Hmm? The flag should work just fine one pipes, returning EAGAIN when the
: pipe buffer is full. Do you have any evidence that it doesn't work?

: -Andi

I thought PIPE_BUF was 5120 bytes in size. However, I don't know why
it limited to such a weird number.

As for O_NODELAY, in Linux this is set to O_NONBLOCK. In Solaris
both values are different. Why is this the same?

--
        Mike,

 
 
 

1. why can't I use block size other than 4096/8192 in newfs

Dear Sir:

  For some reason, I need to make a UFS with larger block size.

  say, maybe 65536 or 32768 bytes per block.

  I can do this on my BSD box, it complained, but it worked.

  However, when I tried this on my Solaris box, it just reject my
  'newfs -b 16384 /dev/xxxxx' command and told me 'bad block size'.

  The man page did say that the block size is either 4096 or 8192.

  I just want to know, why?

  Could someone show me some lights?

  Regards.

--
Silver CHEN
2002/08/21

2. Proprietary CD-ROM drives and SCO OSRV

3. Peak at packet-size of 4096 Byte. Why?

4. Environment variable that shows current PPP address?

5. 4096 files/user and 4096 tasks/user possible?

6. Nested loops in scripts

7. Looking for the right CDRW

8. ext2 block size >4096?

9. Formatting with block size below 4096 ?

10. sun4u architecture does not support the 4096 block size?

11. Holding data in fifo file that exceeds PIPE_BUF size

12. ufs filesystem has blocksize=4096 .. what to do ?