Hi,
I use rsyslog for sending data to Sagan (approx 15k messages per second). There are a lot of fifo errors according to rsyslog impstats module counters. After a quick research I thought about fifo buffer capacity.
According to
http://man7.org/linux/man-pages/man7/pipe.7.htmlSince Linux 2.6.35, the default pipe capacity is 65536 bytes, but the capacity can be queried and set using the fcntl(2) F_GETPIPE_SZ and F_SETPIPE_SZ operations (up to a maximum capacity which defaults to 1048576 bytes, but can be changed via
/proc/sys/fs/pipe-max-size).
Below is a sample Python code
# python
>>> import fcntl
>>> fifo = open('/var/log/sagan/sagan.fifo')
>>> fcntl.fcntl(fifo, 1032)
65536
>>> fcntl.fcntl(fifo, 1031, 4096)
4096
>>> fcntl.fcntl(fifo, 1031, 1048576)
1048576
>>> exit()
The results confirmed the theory
Can Sagan set the pipe capacity after opening fifo file?
Regards,
Aleksey