mirror_frr/lib
Donald Sharp 8b2a6222e8 lib: Remove expansion of hash table
The hash code has the idea of stopping expanding
the hash table when certain criteria are set.
With the recent addition of `show hashtable`
we can now see that when we have a full internet
feed we've stopped expanding the table at 1k
buckets.  This results in some serious performance
issues at scale.

Since we now have the ability to see the statistics
on a hash table, let's allow it to expand.  Doing
so on a full feed showed this:

before:
   Hash table          |  Buckets   Entries   Empty   LF        SD      FLF       SD
 ----------------------+----------------------------------------------------------------
   route table hash    |  1024      1187579   0%      1159.75   34.06   1159.75   35.08
   route table hash    |  32768     76208     10%     2.33      2.80    2.58      4.03
   route table hash    |  1024      1187572   0%      1159.74   34.06   1159.74   35.08
   route table hash    |  2048      76205     0%      37.21     6.13    37.21     7.29

Showing hash table statistics for BGP
-------------------------------------

   Hash table         |  Buckets   Entries   Empty   LF       SD      FLF      SD
 ---------------------+--------------------------------------------------------------
   BGP Attributes     |  131072    251229    15%     1.92     2.48    2.25     3.33
   route table hash   |  4096      1187572   0%      289.93   17.03   289.93   17.87
   route table hash   |  32768     76205     10%     2.33     2.90    2.58     4.21

After:

   Hash table          |  Buckets   Entries   Empty   LF     SD     FLF    SD
 ----------------------+--------------------------------------------------------
   route table hash    |  1048576   1187349   32%     1.13   2.57   1.67   3.16
   route table hash    |  32768     76195     10%     2.33   2.81   2.58   4.03
   route table hash    |  1048576   1187342   32%     1.13   2.58   1.67   3.16
   route table hash    |  32768     76192     10%     2.33   2.68   2.58   3.81

Showing hash table statistics for BGP
-------------------------------------

   Hash table         |  Buckets   Entries   Empty   LF     SD     FLF    SD
 ---------------------+--------------------------------------------------------
   BGP Attributes     |  131072    251222    15%     1.92   2.64   2.25   3.58
   route table hash   |  1048576   1187342   32%     1.13   2.52   1.67   3.07
   route table hash   |  32768     76192     10%     2.33   2.86   2.58   4.12

We should see some significant performance improvements across the board
for full feeds.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-07-27 11:08:40 -04:00
..
.gitignore lib, bgpd: fix .gitignore 2017-06-29 19:39:36 +00:00
agentx.c *: reindent 2017-07-17 14:04:07 +02:00
bfd.c *: reindent 2017-07-17 14:04:07 +02:00
bfd.h *: reindent 2017-07-17 14:04:07 +02:00
bitfield.h *: reindent 2017-07-17 14:04:07 +02:00
buffer.c *: reindent 2017-07-17 14:04:07 +02:00
buffer.h *: reindent 2017-07-17 14:04:07 +02:00
checksum.c Revert "*: reindent pt. 2" 2017-07-22 14:52:33 +02:00
checksum.h *: reindent 2017-07-17 14:04:07 +02:00
clippy.c *: reindent 2017-07-17 14:04:07 +02:00
clippy.h lib: clippy the assistant 2017-06-14 19:29:23 +02:00
command_graph.c *: reindent 2017-07-17 14:04:07 +02:00
command_graph.h *: reindent 2017-07-17 14:04:07 +02:00
command_lex.l lib: add #pragma's to ignore flex sign cmp error 2017-04-07 19:18:57 +00:00
command_match.c *: reindent 2017-07-17 14:04:07 +02:00
command_match.h *: reindent 2017-07-17 14:04:07 +02:00
command_parse.y lib: warn about too much docstring 2017-07-05 14:30:16 -04:00
command_py.c Revert "*: reindent pt. 2" 2017-07-22 14:52:33 +02:00
command.c Revert "*: reindent pt. 2" 2017-07-22 14:52:33 +02:00
command.h *: reindent 2017-07-17 14:04:07 +02:00
csv.c *: reindent 2017-07-17 14:04:07 +02:00
csv.h *: reindent 2017-07-17 14:04:07 +02:00
defun_lex.l lib: clippy the assistant 2017-06-14 19:29:23 +02:00
distribute.c *: reindent 2017-07-17 14:04:07 +02:00
distribute.h *: reindent 2017-07-17 14:04:07 +02:00
event_counter.c *: reindent 2017-07-17 14:04:07 +02:00
event_counter.h *: reindent 2017-07-17 14:04:07 +02:00
fifo.h *: reindent 2017-07-17 14:04:07 +02:00
filter.c *: reindent 2017-07-17 14:04:07 +02:00
filter.h *: reindent 2017-07-17 14:04:07 +02:00
frr_pthread.c *: reindent 2017-07-17 14:04:07 +02:00
frr_pthread.h *: reindent 2017-07-17 14:04:07 +02:00
frratomic.h *: reindent 2017-07-17 14:04:07 +02:00
getopt1.c *: reindent 2017-07-17 14:04:07 +02:00
getopt.c Revert "*: reindent pt. 2" 2017-07-22 14:52:33 +02:00
getopt.h *: reindent 2017-07-17 14:04:07 +02:00
gitversion.pl build: fix minimal mixup in gitinfo suffix 2013-04-09 17:05:08 +02:00
grammar_sandbox_main.c *: reindent 2017-07-17 14:04:07 +02:00
grammar_sandbox.c *: reindent 2017-07-17 14:04:07 +02:00
graph.c *: reindent 2017-07-17 14:04:07 +02:00
graph.h *: reindent 2017-07-17 14:04:07 +02:00
hash.c lib: Remove expansion of hash table 2017-07-27 11:08:40 -04:00
hash.h lib: Remove expansion of hash table 2017-07-27 11:08:40 -04:00
hook.c *: reindent 2017-07-17 14:04:07 +02:00
hook.h Revert "*: reindent pt. 2" 2017-07-22 14:52:33 +02:00
if_rmap.c *: reindent 2017-07-17 14:04:07 +02:00
if_rmap.h *: reindent 2017-07-17 14:04:07 +02:00
if.c *: reindent 2017-07-17 14:04:07 +02:00
if.h Revert "*: reindent pt. 2" 2017-07-22 14:52:33 +02:00
imsg-buffer.c lib: revert reindent of files imported from OpenBSD 2017-07-24 18:40:24 -03:00
imsg.c lib: revert reindent of files imported from OpenBSD 2017-07-24 18:40:24 -03:00
imsg.h lib: revert reindent of files imported from OpenBSD 2017-07-24 18:40:24 -03:00
ipaddr.h *: reindent 2017-07-17 14:04:07 +02:00
jhash.c *: reindent 2017-07-17 14:04:07 +02:00
jhash.h *: reindent 2017-07-17 14:04:07 +02:00
json.c *: reindent 2017-07-17 14:04:07 +02:00
json.h *: reindent 2017-07-17 14:04:07 +02:00
keychain.c *: reindent 2017-07-17 14:04:07 +02:00
keychain.h *: reindent 2017-07-17 14:04:07 +02:00
libfrr.c *: reindent 2017-07-17 14:04:07 +02:00
libfrr.h *: reindent 2017-07-17 14:04:07 +02:00
libospf.h *: make consistent & update GPLv2 file headers 2017-05-15 16:37:41 +02:00
linklist.c *: reindent 2017-07-17 14:04:07 +02:00
linklist.h *: reindent 2017-07-17 14:04:07 +02:00
log_int.h *: reindent 2017-07-17 14:04:07 +02:00
log.c Revert "*: reindent pt. 2" 2017-07-22 14:52:33 +02:00
log.h Revert "*: reindent pt. 2" 2017-07-22 14:52:33 +02:00
Makefile.am Merge commit '3d22338f04d9554fa' into evpn-prep 2017-07-10 22:15:19 +02:00
md5.c Revert "*: reindent pt. 2" 2017-07-22 14:52:33 +02:00
md5.h *: reindent 2017-07-17 14:04:07 +02:00
memory_vty.c *: reindent 2017-07-17 14:04:07 +02:00
memory_vty.h *: reindent 2017-07-17 14:04:07 +02:00
memory.c *: reindent 2017-07-17 14:04:07 +02:00
memory.h *: reindent 2017-07-17 14:04:07 +02:00
module.c *: reindent 2017-07-17 14:04:07 +02:00
module.h *: reindent 2017-07-17 14:04:07 +02:00
monotime.h *: reindent 2017-07-17 14:04:07 +02:00
mpls.h Revert "*: reindent pt. 2" 2017-07-22 14:52:33 +02:00
network.c *: reindent 2017-07-17 14:04:07 +02:00
network.h *: reindent 2017-07-17 14:04:07 +02:00
nexthop.c lib: copy_nexthops() only copies the first nexthop 2017-07-20 17:11:43 +00:00
nexthop.h *: reindent 2017-07-17 14:04:07 +02:00
ns.c *: reindent 2017-07-17 14:04:07 +02:00
ns.h *: reindent 2017-07-17 14:04:07 +02:00
openbsd-queue.h *: reindent 2017-07-17 14:04:07 +02:00
openbsd-tree.c lib: fix corrupted RB trees 2017-07-24 18:50:45 -03:00
openbsd-tree.h lib: revert reindent of files imported from OpenBSD 2017-07-24 18:40:24 -03:00
pid_output.c *: reindent 2017-07-17 14:04:07 +02:00
plist_int.h *: reindent 2017-07-17 14:04:07 +02:00
plist.c Revert "*: reindent pt. 2" 2017-07-22 14:52:33 +02:00
plist.h *: reindent 2017-07-17 14:04:07 +02:00
pqueue.c *: reindent 2017-07-17 14:04:07 +02:00
pqueue.h *: reindent 2017-07-17 14:04:07 +02:00
prefix.c Revert "*: reindent pt. 2" 2017-07-22 14:52:33 +02:00
prefix.h Revert "*: reindent pt. 2" 2017-07-22 14:52:33 +02:00
privs.c Revert "*: reindent pt. 2" 2017-07-22 14:52:33 +02:00
privs.h *: reindent 2017-07-17 14:04:07 +02:00
ptm_lib.c *: reindent 2017-07-17 14:04:07 +02:00
ptm_lib.h *: reindent 2017-07-17 14:04:07 +02:00
qobj.c *: reindent 2017-07-17 14:04:07 +02:00
qobj.h *: reindent 2017-07-17 14:04:07 +02:00
queue.h *: reindent 2017-07-17 14:04:07 +02:00
route_types.pl *: remove VTYNL, part 6 of 6 2017-07-14 10:20:03 +02:00
route_types.txt Merge remote-tracking branch 'frr/master' into pull-624 2017-06-13 09:18:14 +02:00
routemap.c Revert "*: reindent pt. 2" 2017-07-22 14:52:33 +02:00
routemap.h *: reindent 2017-07-17 14:04:07 +02:00
sha256.c *: reindent 2017-07-17 14:04:07 +02:00
sha256.h *: reindent 2017-07-17 14:04:07 +02:00
sigevent.c Revert "*: reindent pt. 2" 2017-07-22 14:52:33 +02:00
sigevent.h *: reindent 2017-07-17 14:04:07 +02:00
skiplist.c *: reindent 2017-07-17 14:04:07 +02:00
skiplist.h *: reindent 2017-07-17 14:04:07 +02:00
smux.c Revert "*: reindent pt. 2" 2017-07-22 14:52:33 +02:00
smux.h *: reindent 2017-07-17 14:04:07 +02:00
snmp.c *: reindent 2017-07-17 14:04:07 +02:00
sockopt.c Revert "*: reindent pt. 2" 2017-07-22 14:52:33 +02:00
sockopt.h *: reindent 2017-07-17 14:04:07 +02:00
sockunion.c *: reindent 2017-07-17 14:04:07 +02:00
sockunion.h *: reindent 2017-07-17 14:04:07 +02:00
spf_backoff.c *: reindent 2017-07-17 14:04:07 +02:00
spf_backoff.h *: reindent 2017-07-17 14:04:07 +02:00
srcdest_table.c *: reindent 2017-07-17 14:04:07 +02:00
srcdest_table.h *: reindent 2017-07-17 14:04:07 +02:00
stream.c *: reindent 2017-07-17 14:04:07 +02:00
stream.h *: reindent 2017-07-17 14:04:07 +02:00
strlcat.c *: reindent 2017-07-17 14:04:07 +02:00
strlcpy.c *: reindent 2017-07-17 14:04:07 +02:00
systemd.c *: reindent 2017-07-17 14:04:07 +02:00
systemd.h *: reindent 2017-07-17 14:04:07 +02:00
table.c lib: route_node_lookup() needs to apply_mask() to prefix 2017-07-19 16:54:24 +00:00
table.h *: reindent 2017-07-17 14:04:07 +02:00
termtable.c *: reindent 2017-07-17 14:04:07 +02:00
termtable.h *: reindent 2017-07-17 14:04:07 +02:00
thread.c *: reindent 2017-07-17 14:04:07 +02:00
thread.h *: reindent 2017-07-17 14:04:07 +02:00
vector.c *: reindent 2017-07-17 14:04:07 +02:00
vector.h *: reindent 2017-07-17 14:04:07 +02:00
version.h.in Rename: FreeRangeRouting FRRouting 2017-03-30 14:22:35 -04:00
vlan.h lib: VLAN definition 2017-05-25 10:20:03 -07:00
vrf_int.h *: reindent 2017-07-17 14:04:07 +02:00
vrf.c *: reindent 2017-07-17 14:04:07 +02:00
vrf.h *: reindent 2017-07-17 14:04:07 +02:00
vty.c Revert "*: reindent pt. 2" 2017-07-22 14:52:33 +02:00
vty.h *: reindent 2017-07-17 14:04:07 +02:00
vxlan.h lib: VxLAN Network Identifier definition 2017-05-25 10:20:03 -07:00
wheel.c *: reindent 2017-07-17 14:04:07 +02:00
wheel.h *: reindent 2017-07-17 14:04:07 +02:00
workqueue.c *: reindent 2017-07-17 14:04:07 +02:00
workqueue.h *: reindent 2017-07-17 14:04:07 +02:00
zassert.h Revert "*: reindent pt. 2" 2017-07-22 14:52:33 +02:00
zclient.c Revert "*: reindent pt. 2" 2017-07-22 14:52:33 +02:00
zclient.h *: reindent 2017-07-17 14:04:07 +02:00
zebra.h *: reindent 2017-07-17 14:04:07 +02:00