[Xorp-cvs] XORP cvs commit: xorp/bgp

Andrea Bittau abittau at icir.org
Wed Aug 6 01:07:49 PDT 2008


CVSROOT:	/usr/local/www/data/cvs
Module name:	xorp
Changes by:	abittau at chum.icir.org	2008-08-06 08:07:49 UTC

XORP CVS repository


Modified files:
	bgp           aspath.hh 

Log message:
	Use a list instead of a vector for the AsPath.  This allows prepend to be
	faster.  One major slowdown due to this is the as_num() call.  Much of the code
	that uses it can be rewritten using iterators though so it shouldn't be a major
	hit.
	
	Before:
	[58% 02:33 shorty test]# ./policybench -p base -v base.var  -i 100000
	Loading...
	Benchmarking.  Iterations: 100000
	Stats:
	Total time 950 (ms) iterations 100000
	Iterations/s 105263.158
	Instr  1 Avg Time    182.266    ( 2.22%)
	Instr  2 Avg Time    604.481    ( 7.38%)
	Instr  3 Avg Time    941.815    (11.50%)
	Instr  4 Avg Time    294.803    ( 3.60%)
	Instr  5 Avg Time    711.234    ( 8.68%)
	Instr  6 Avg Time    221.333    ( 2.70%)
	Instr  7 Avg Time   3128.317    (38.19%)
	Instr  8 Avg Time    707.141    ( 8.63%)
	Instr  9 Avg Time    221.819    ( 2.71%)
	Instr 10 Avg Time   1178.659    (14.39%)
	[58% 02:14 shorty test]#
	
	After:
	[58% 02:14 shorty test]# ./policybench -p base -v base.var  -i 100000
	Loading...
	Benchmarking.  Iterations: 100000
	Stats:
	Total time 1006 (ms) iterations 100000
	Iterations/s 99403.579
	Instr  1 Avg Time    182.589    ( 2.05%)
	Instr  2 Avg Time    653.278    ( 7.33%)
	Instr  3 Avg Time    850.118    ( 9.54%)
	Instr  4 Avg Time    311.957    ( 3.50%)
	Instr  5 Avg Time    657.300    ( 7.38%)
	Instr  6 Avg Time    222.927    ( 2.50%)
	Instr  7 Avg Time   2735.710    (30.71%)
	Instr  8 Avg Time    589.444    ( 6.62%)
	Instr  9 Avg Time    222.574    ( 2.50%)
	Instr 10 Avg Time   2481.870    (27.86%)
	[58% 01:58 shorty test]#
	
	Yes, it seems that we actually slowed down, but i think that this is an
	artifact.  Look at instruction 7 though which is a bgp aspath prepend: we saved
	400 cycles on average (14%) and I expect this to be higher with long aspaths.

Revision  Changes                               Path
1.33      +14 -9;  commitid: 82e548995bc441a7;  xorp/bgp/aspath.hh



More information about the Xorp-cvs mailing list