

Tuning Linux IPv4 route cache (2011) - luu
http://vincent.bernat.im/en/blog/2011-ipv4-route-cache-linux.html

======
click170
This post says the route cache was removed. This leads me to the question:
What replaced it?

Surely if it was simply removed, network performance would drop, which leads
me to think caching must have been added somewhere else as it was removed
here? Can anyone clarify?

~~~
donavanm
The dst/route cache has effectively been replaced by the TCP metrics cache.
Values like MSS, SRTT, and cwnd are still useful to preserve across streams
between peers. See ip-tcp_metrics(8) for a decent summary.

David Miller has a summary of the route cache removal in
[http://vger.kernel.org/~davem/columbia2012.pdf](http://vger.kernel.org/~davem/columbia2012.pdf).
The cache exhaustion argument was .. odd. As I recall the cache entry was
created on handshake and was keyed off of src ip, dst IP, dst port. Given that
the attacker can (effectively) only vary the src ip thats a _lot_ of addresses
to control. The other argument was that not hitting a cache was "only" 10%
slower in microbenchmarks.

Personally Im dubious of the route cache removal, though I havent tested. The
10% hit rate, as I recall, was from Google front end servers which Id expect
to have a high cardinality of peers along with a simplistic route table. For
servers with multiple interfaces, variable route properties, multiple tables,
etc and a high packet rate a fast cache should be quite valuable.

~~~
vbernat
For the 10% hit, I agree with you. For one large French site (but with a
national audience only), the efficiency of the route cache was more than 95%.

------
markatto
Wasn't the route cache removed a while back?

~~~
infogulch
This post is 2 years old.

~~~
vezzy-fnord
From the footnotes:

    
    
         1. The content of this article should be valid
         for Linux 2.6.38, 2.6.39, 3.0 and 3.1. There are some
         clues for Linux 2.6.35, 2.6.36 and 2.6.37 as well
         as for Linux 3.2, 3.3, 3.4 and 3.5. Starting from
         Linux 3.6, the whole route cache has been removed.

