don't call setbuf, use optimal size.