On 2016-06-23 05:42, Theo de Raadt wrote:
secondly, allocating more than 4g at a time to socket buffers is
generally a waste of memory.
and there is one further problem.
Eventually, this subsystem will starve the system. Other subsystems
which also need large amounts of memory, then have to scramble. There
have to be backpressure mechanisms in each subsystem to force out
memory.
There is no such mechanism in socket buffers.
The mechanisms in the remaining parts of the kernel have always proven
to be weak, as in, they don't interact as nicely as we want, to create
space. There has been much work to make them work better.
However in socket buffers, there is no such mechanism. What are
you going to do. Throw data away? You can't do that. Therefore,
you are holding the remaining system components hostage, and your
diff creates deadlock.
You probably tested your diff under ideal conditions with gobs of
memory...
The backpressure mechanism to free up [disk IO] buffer cache content is
really effective though, so 90 is a mostly suitable bufcachepercent
sysctl setting, right?