On mar.  3 déc. 09:40:31 2019, Vincent Bernat wrote:
> So, there is 0x56 entries in the cache. Isn't that clear? :)
> 
> https://elixir.bootlin.com/linux/latest/source/net/ipv6/route.c#L6006

I did a quick test on some routers:

core01-arendal, no fullview, on my own ASN, no so much traffic, using
tunnels
        https://pix.milkywan.fr/apWaD84h.png
        core01-arendal ~ # while :; do awk --non-decimal-data '{ print 
("0x"$6)+0, "(" $6 ")" }' /proc/net/rt6_stats; sleep 120; done
        86 (0056)
        86 (0056)
        86 (0056)
        core01-arendal ~ # ip -6 r | wc -l
        64
        core01-arendal ~ # uname -a
        Linux core01-arendal.no.swordarmor.fr 4.19.86-gentoo #1 SMP Mon Dec 2 
19:02:33 CET 2019 x86_64 AMD GX-412TC SOC AuthenticAMD GNU/Linux

core02-arendal, no fullview, on my own ASN, no so much traffic, using
tunnels
        https://pix.milkywan.fr/NF3jNY9K.png
        core02-arendal ~ # while :; do awk --non-decimal-data '{ print 
("0x"$6)+0, "(" $6 ")" }' /proc/net/rt6_stats; sleep 120; done
        28 (001c)
        30 (001e)
        30 (001e)
        core02-arendal ~ # ip -6 r | wc -l
        39
        core02-arendal ~ # uname -a
        Linux core02-arendal.no.swordarmor.fr 4.19.86-gentoo #1 SMP Mon Dec 2 
22:08:21 CET 2019 x86_64 AMD G-T40E Processor AuthenticAMD GNU/Linux

edge01-terrahost, fullview, on my own ASN, no so much traffic, using
one tunnel
        https://pix.milkywan.fr/6AVwYkY8.png
        edge01-terrahost ~ # while :; do awk --non-decimal-data '{ print 
("0x"$6)+0, "(" $6 ")" }' /proc/net/rt6_stats; sleep 120; done
        96 (0060)
        101 (0065)
        101 (0065)
        edge01-terrahost ~ # ip -6 r | wc -l
        77439
        edge01-terrahost ~ # uname -a
        Linux edge01-terrahost.no.swordarmor.fr 4.19.82-gentoo #2 SMP Tue Nov 
12 22:08:28 CET 2019 x86_64 Intel(R) Core(TM) i5-3470 CPU @ 3.20GHz 
GenuineIntel GNU/Linux

edge02-fjordane, fullview, on my own ASN, no so much traffic, using
one tunnel
        https://pix.milkywan.fr/J4rOuylq.png
        edge02-fjordane ~ # while :; do awk --non-decimal-data '{ print 
("0x"$6)+0, "(" $6 ")" }' /proc/net/rt6_stats; sleep 120; done
        110 (006e)                                                 
        110 (006e)                                                 
        110 (006e)
        edge02-fjordane ~ # ip -6 r | wc -l
        77433
        edge02-fjordane ~ # uname -a
        Linux edge02-fjordane.no.swordarmor.fr 4.19.86-gentoo #1 SMP Thu Nov 28 
16:47:53 CET 2019 x86_64 Common KVM processor GenuineIntel GNU/Linux

regis, fullview, on my own ASN, a bit more traffic, using one tunnel
        https://pix.milkywan.fr/5XeaK2du.png
        regis ~ # while :; do awk --non-decimal-data '{ print ("0x"$6)+0, "(" 
$6 ")" }' /proc/net/rt6_stats; sleep 120; done
        0 (0000)
        1 (0001)
        1 (0001)
        regis ~ # ip -6 r | wc -l
        77538
        regis ~ # uname -a
        Linux regis.swordarmor.fr 4.14.83-gentoo #2 SMP Sat Feb 2 16:50:41 CET 
2019 x86_64 Intel(R) Xeon(R) CPU X3450 @ 2.67GHz GenuineIntel GNU/Linux

asbr02, fullview, on a not-for-profit ASN providing services for others,
100M of traffic, using one tunnel
        https://pix.milkywan.fr/l1hfAAIn.png
        alarig@asbr02 ~ $ while :; do awk --non-decimal-data '{ print 
("0x"$6)+0, "(" $6 ")" }' /proc/net/rt6_stats; sleep 120; done
        4 (0004)
        3 (0003)
        0 (0000)
        alarig@asbr02 ~ $ ip -6 r | wc -l
        77525
        alarig@asbr02 ~ $ uname -a
        Linux asbr02.cogent-rns.grifon.fr 4.14.156-gentoo #1 SMP Tue Dec 3 
09:53:23 CET 2019 x86_64 Intel(R) Xeon(R) CPU X3450 @ 2.67GHz GenuineIntel 
GNU/Linux


So, I have more routes in cache than in FIB on my two core routers, I’m
pretty sure there is a bug there :p
I have less routes in cache on 4.14 kernels but more traffic.

I don’t know which function is feeding the cache, but I think that it’s
doing too much.

-- 
Alarig

Reply via email to