tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

re: pty(4) 1024 bytes buffer limit

> I've been wondering if it was possible to change the pty(4) internal
> buffer size, as I noticed that ppp tunnels cannot use a larger frame
> size.  Because of this, it seems that the optimal MTU be 856, which is
> so small that context switches become the bottleneck.
> It would be nice to for instance be able to use an MTU of 3000 so that
> there are less context switches, but unfortunately tracing the
> processes show that 1024 bytes are read from the pty devices at most.
> I looked at the various tty(4) termios(4) and pty(4) without finding an
> option to change the buffer size.  Is there a way at all to change it?

there's no option.  infact, it's all hard coded as magic 1024 constants
in about 4 places in sys/kern.  i kept meaning to fix that, but haven't
gotten around to it.

i used to bump it to 10K avoid the xterm vs. size problem but that was
fixed a while ago by christos, and i think that patch has been removed
from my source trees.


Home | Main Index | Thread Index | Old Index