This link says:
The buffer size must not exceed the size of an atomic write to a disk file. For FreeBSD this size is unlimited.
How can I find size of atomic write on my server? Is there any command to check this?
Server Fault is a question and answer site for system and network administrators. It only takes a minute to sign up.Sign up to join this community
I was trying to find out size of an atomic write in Linux myself and the most helpful reading was from this Unix Stack Exchange answer
But in summary
This is from man 7 pipe.
POSIX.1-2001 says that write(2)s of less than PIPE_BUF bytes must be atomic: the output data is written to the pipe as a contiguous sequence. Writes of more than PIPE_BUF bytes may be nonatomic: the kernel may interleave the data with data written by other processes. POSIX.1-2001 requires PIPE_BUF to be at least 512 bytes. (On Linux, PIPE_BUF is 4096 bytes.)
So in Linux the size of an atomic write is 4096 bytes.
You can find a nice table of the PIPE_BUF size for different OS'es here http://ar.to/notes/posix#pipe-buf.