On Sat, Sep 26, 2020 at 07:50:14PM +0200, Harald Welte wrote:
One idea would be to play with setvbuf(3) to increase stderr buffering inside libc.
I just tried; at least for gnome-terminal it did not at all change the results, even if a 1MByte buffer was used in setvbuf(). I thoght this could be related to our use of fflush() in stderr logging. But even when removing the fflush() I could still see those 64..128ms stalls when running the test program via gnome-terminal. Not sure what's going on, but definitely we can stop looking at setvbuf() as a solution.