* Regarding Routing table in Linux kernel
@ 2011-11-06 7:13 Ajith Adapa
2011-11-06 17:42 ` Eric Dumazet
0 siblings, 1 reply; 4+ messages in thread
From: Ajith Adapa @ 2011-11-06 7:13 UTC (permalink / raw)
To: netdev
Hi,
I have few doubts regarding the routing table in linux kernel.
1. Why does the linux kernel use hashing table for storing routing
entries when there is patricia trie or radix tree which is more faster
than Hash table ?
2. Is there any way we can test the performance of an routing
algorithm before deploying in a real time scenario to check its
performance ? I would like to test one of my implementations to check
if there are any performance gains or not ?
Regards,
Ajith
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Regarding Routing table in Linux kernel
2011-11-06 7:13 Regarding Routing table in Linux kernel Ajith Adapa
@ 2011-11-06 17:42 ` Eric Dumazet
2011-11-07 4:22 ` Ajith Adapa
0 siblings, 1 reply; 4+ messages in thread
From: Eric Dumazet @ 2011-11-06 17:42 UTC (permalink / raw)
To: Ajith Adapa; +Cc: netdev
Le dimanche 06 novembre 2011 à 12:43 +0530, Ajith Adapa a écrit :
> Hi,
>
> I have few doubts regarding the routing table in linux kernel.
>
> 1. Why does the linux kernel use hashing table for storing routing
> entries when there is patricia trie or radix tree which is more faster
> than Hash table ?
>
I think you are mistaken. Routes are stored in a trie in recent kernels.
And route cache is scheduled to be removed at some point.
In normal situation, one hash lookup is the faster way to find a random
item, its a single memory cache line cost.
> 2. Is there any way we can test the performance of an routing
> algorithm before deploying in a real time scenario to check its
> performance ? I would like to test one of my implementations to check
> if there are any performance gains or not ?
Sorry there is no general answer. It all depends on your needs.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Regarding Routing table in Linux kernel
2011-11-06 17:42 ` Eric Dumazet
@ 2011-11-07 4:22 ` Ajith Adapa
2011-11-07 6:21 ` Eric Dumazet
0 siblings, 1 reply; 4+ messages in thread
From: Ajith Adapa @ 2011-11-07 4:22 UTC (permalink / raw)
To: Eric Dumazet; +Cc: netdev
Thanks for the reply
>> 1. Why does the linux kernel use hashing table for storing routing
>> entries when there is patricia trie or radix tree which is more faster
>> than Hash table ?
>
> I think you are mistaken. Routes are stored in a trie in recent kernels.
>
> And route cache is scheduled to be removed at some point.
>
> In normal situation, one hash lookup is the faster way to find a random
> item, its a single memory cache line cost.
I will check it with the latest kernel. Actually I am just checking in
a 2.6.18 kernel.
>> 2. Is there any way we can test the performance of an routing
>> algorithm before deploying in a real time scenario to check its
>> performance ? I would like to test one of my implementations to check
>> if there are any performance gains or not ?
>
> Sorry there is no general answer. It all depends on your needs.
Hmm .. Seems there is no simple way for it other than trying out in
real time scenario :(
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Regarding Routing table in Linux kernel
2011-11-07 4:22 ` Ajith Adapa
@ 2011-11-07 6:21 ` Eric Dumazet
0 siblings, 0 replies; 4+ messages in thread
From: Eric Dumazet @ 2011-11-07 6:21 UTC (permalink / raw)
To: Ajith Adapa; +Cc: netdev
Le lundi 07 novembre 2011 à 09:52 +0530, Ajith Adapa a écrit :
> I will check it with the latest kernel. Actually I am just checking in
> a 2.6.18 kernel.
>
2.6.18 is very old in this respect. Lot of things changed in recent
kernels in route cache handling. We no longer have long pauses because
of garbage collector runs.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-11-07 6:21 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-06 7:13 Regarding Routing table in Linux kernel Ajith Adapa
2011-11-06 17:42 ` Eric Dumazet
2011-11-07 4:22 ` Ajith Adapa
2011-11-07 6:21 ` Eric Dumazet
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox