CONFIG_LEGACY_PTY_COUNT=256 vs CONFIG_LEGACY_PTY_COUNT=0
On the suggestion of Kay Sievers (udev upstream) we changed
CONFIG_LEGACY_PTY_COUNT from 256 to 0. The rationale is that software
should not be using these ptys anymore, instead using UNIX98 ptys; and
that each legacy PTY costs us: 2 mknod() calls, 2 stat() calls and 4
fork()/exec() calls for each device.
So what difference does it make?
To do this, I built a kernel on Intrepid with the change - then realised
it was 2.6.27-11 from proposed that was on GIT HEAD; so the numbers
include the current Intrepid kernel (2.6.27-9), the proposed Intrepid
kernel (2.6.27-11) and the proposed Intrepid kernel with the config
First up, differences in the average time between the kernel sending a
uevent and udev finishing processing it.
2.6.27-9 2.6.27-11 PTY_COUNT=0
MEAN 6.88s 6.95s 4.83s
MEDIAN 8.07s 8.16s 5.54s
MODE 8.13s 8.74s 8.08s
STDDEV 2.44s 2.46s 2.86s
So the mean time for event processing drops to under 5s; this is
probably because udev throttles its own queue, so events were appearing
to take longer due to the larger number of events being processed first
(the pty ones).