: Is there any danger in increasing the size of
: include/net/route.h:RT_CACHE_SIZE_MAX in a 2.0.30 kernel???
No danger. This number MUST be greater than number of simultaneously
existing sockets to different destinations, otherwise garbage collector
will only uselessly spend CPU time; it cannot purge destinations
bound to socket.
>From the other hand, it should not be much larger than 256,
otherwise hashing with modulus 256 will be not efficient.
2048 is on the edge.
: Reason: I've a machine (PPro 200) that's spending 12% of kernel CPU
: time garbage collecting the rt_cache. The machine is handling a LOT of IP
: traffic to diverse destinations ( more than 1000 TCP flows is normal),
: and it looks like the route cache is thrashing badly.
It is the thing that I see in my nightmares :-)
Alexey Kuznetsov.