ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/AnyEvent-FastPing/FPing.pm
(Generate patch)

Comparing AnyEvent-FastPing/FPing.pm (file contents):
Revision 1.5 by root, Fri May 4 15:16:14 2007 UTC vs.
Revision 1.6 by root, Fri May 4 15:47:43 2007 UTC

6 6
7 use Net::FPing; 7 use Net::FPing;
8 8
9=head1 DESCRIPTION 9=head1 DESCRIPTION
10 10
11This module was written for a signle purpose only: sendinf ICMP EHCO 11This module was written for a single purpose only: sendinf ICMP EHCO
12REQUEST packets as quickly as possible to a large number of hosts 12REQUEST packets as quickly as possible to a large number of hosts
13(thousands to millions). 13(thousands to millions).
14 14
15It employs a sending thread and is fully event-driven (using AnyEvent), so 15It employs a sending thread and is fully event-driven (using AnyEvent), so
16you have to run an event model supported by AnyEvent to use this module. 16you have to run an event model supported by AnyEvent to use this module.
103called. 103called.
104 104
105Algorithm: Each range has an associated "next time to send packet" 105Algorithm: Each range has an associated "next time to send packet"
106time. The algorithm loops as long as there are ranges with hosts to be 106time. The algorithm loops as long as there are ranges with hosts to be
107pinged and always serves the range with the most urgent packet send 107pinged and always serves the range with the most urgent packet send
108time. It will at most send one packet every C<$send_interval> seconds. The 108time. It will at most send one packet every C<$send_interval> seconds.
109
110This will ensure that pings to the same range are nicely interleaved with
111other ranges - this can help reduce per-subnet bandwidth while maintaining
112an overall high packet rate.
113
109algorithm to send each packet is O(log n) on the number of ranges, so even 114The algorithm to send each packet is O(log n) on the number of ranges, so
110a large number of ranges (many thousands) is managable. No storage is 115even a large number of ranges (many thousands) is managable.
116
111allocated per address. 117No storage is allocated per address.
112 118
113Performance: On my 2 GHz Opteron system with a pretty average nvidia 119Performance: On my 2 GHz Opteron system with a pretty average nvidia
114gigabit network card I can ping around 60k to 200k adresses per second, 120gigabit network card I can ping around 60k to 200k adresses per second,
115depending on routing decisions. 121depending on routing decisions.
116 122

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines