[quagga-dev 9333] Re: [RFC PATCH 00/25] Mostly bgpd optimizations

Jorge Boncompte [DTI2] jorge at dti2.net
Tue May 8 18:17:25 BST 2012


El 08/05/2012 17:44, Paul Jakma escribió:
> Hi,
> 
> Do you have any idea which of the patches contribute what amount of savings? Did
> you take profiles from before and after, or? Some idea of the methodology would
> be useful.
> 

	I have not profiled all the patches. But the first six are related to functions
scoring high on the profiling. malloc() of course it is another offender, and
all this work started because I wanted to get rid as much as possible of the
memory fragmentation.

> regards,
> 
> Paul
> 
> On Mon, 7 May 2012, Jorge Boncompte [DTI2] wrote:
> 
>> From: "Jorge Boncompte [DTI2]" <jorge at dti2.net>
>>
>>  This patchset is part of my work in the last weeks to optimize the speed
>> and memory usage of the bgpd daemon.
>>
>>  My test case has been a full internet table loading on a pIII class
>> machine. With the patches just the table loading time went from 14 to 10
>> seconds. And memory usage it is a lot more stable, due to less heap
>> fragmentation.
>>
>>  Please, take a look at it, comments welcome.
>>
>> Jorge Boncompte [DTI2] (25):
>>  bgpd: optimize aspath string representation and assegments handling
>>  bgpd: optimize bgp_nexthop_self()
>>  bgpd: debug buffers cleanup and optimization
>>  bgpd: remove calls to peer_sort() from fast-path
>>  bgpd: optimize loops on [e]community_hash_make()
>>  bgpd: optimize bgp_info_cmp()
>>  bgpd: remove some useless initializations
>>  bgpd: reduce attrhash_make_key() indirections
>>  bgpd: use on stack struct attr_extra on bgp_attr_aggregate_intern()
>>  bgpd: cleanup bgp_attr_unintern()
>>  bgpd: use on stack struct attr_extra in bgp_attr_unintern()
>>  bgpd: fix struct attr_extra leak in bgp_default_originate()
>>  bgpd: use on stack struct attr_extra in bgp_update_receive()
>>  bgpd: bgp_attr_default_set() already allocates a struct attr_extra
>>  bgpd: reduce struct attr_extra allocations/freeing
>>  bgpd: Remove useless initialization
>>  bgpd: optimize holdtime timer cancelling
>>  bgpd: optimize bgp_update_main() in the soft_reconfig case
>>  bgpd: fix for bgp_node_lookup()
>>  bgpd: optimize bgp_aggregate_[increment|decrement]()
>>  micro-op bgp_node_[get|lookup]() and route_node_[get|lookup]()
>>  lib: remove RUSAGE_T from struct thread
>>  lib: micro-op for thread_get()
>>  lib: do not allocate/free thread funcnames
>>  lib: optimize IPV4_ADDR_[SAME|COPY]()
>>
>> bgpd/bgp_aspath.c     |  141 ++++++++++---------
>> bgpd/bgp_aspath.h     |    1 +
>> bgpd/bgp_attr.c       |  121 +++++++++--------
>> bgpd/bgp_community.c  |   19 ++-
>> bgpd/bgp_ecommunity.c |   21 ++-
>> bgpd/bgp_mpath.c      |    2 +-
>> bgpd/bgp_network.c    |    4 +-
>> bgpd/bgp_nexthop.c    |  108 +++++++++++++---
>> bgpd/bgp_nexthop.h    |    3 +-
>> bgpd/bgp_packet.c     |   87 +++++++-----
>> bgpd/bgp_route.c      |  357 +++++++++++++++++++++++++------------------------
>> bgpd/bgp_table.c      |   20 ++-
>> bgpd/bgp_vty.c        |    4 +-
>> bgpd/bgp_zebra.c      |    8 +-
>> bgpd/bgpd.c           |   57 +++++----
>> bgpd/bgpd.h           |   24 ++--
>> lib/memtypes.c        |    2 +-
>> lib/prefix.c          |    2 +-
>> lib/prefix.h          |    4 +-
>> lib/table.c           |   18 ++-
>> lib/thread.c          |   51 +++-----
>> lib/thread.h          |    8 +-
>> ospfd/ospf_packet.c   |    2 +-
>> 23 files changed, 594 insertions(+), 470 deletions(-)
>>
>>
> 





More information about the Quagga-dev mailing list