[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

ocplib+endian improvement

I've been porting the network stack to take advantage of the cstruct 
turbo-boost that Pierre and Thomas worked on. This optimisation adds compiler 
built-ins (in 4.01.0+) which let the code generator optimise away many of the 
temporary values required for low-level optimisation.

Here's a (very quick) before/after for a ping flood (which is a good stress 
test of the low-level shared ring, network driver and protocol stack).

For a ping flood With 4.00.1 without the optimisation:
73755 packets transmitted, 73702 received, +49 duplicates, 0% packet loss, time 
rtt min/avg/max/mdev = 0.031/0.228/1209.178/9.887 ms, pipe 14850, ipg/ewma 
0.085/0.036 ms                                                                  

and with the optimisation:
41791 packets transmitted, 41764 received, +25 duplicates, 0% packet loss, time 
3539msrtt min/avg/max/mdev = 0.030/0.188/1261.042/8.459 ms, pipe 14742, 
ipg/ewma 0.084/0.039 ms

So our average latency drops quite significantly (0.228 -> 0.188), as does CPU 
load (not shown above).

I've not committed these changes to the mainstream yet until I test out TCP 
more, but it's getting there!




Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.