Christian_Gebau
Jul 12, 2006Nimbostratus
iRule optimization / CPU usage monitor
Hi,
I am currently evaluating a BIG-IP load balancer. My goal is to
distribute incoming UDP packets (which conform to a custom network
protocol) to a cluster of linux servers. I use the round-robin
load balancing algorithm and no session persistance.
The load balancer has to execute an iRule for each incoming
packet in order to insert a sequence number into the UDP payload.
With my current setup I can handle about 20000 packets per second
on a BIG-IP 5100. Without the iRule the same box can handle up to
80000 packets/sec, therefore I would like to optimize my iRule.
Question 1)
Do you have any suggestions how I can speed the following iRule:
when RULE_INIT {
array unset sequence_number_map
array set sequence_number_map { }
}
when CLIENT_DATA {
global sequence_number_map
if { [UDP::payload length] > 4} {
binary scan [UDP::payload] II liid seid
if {[catch {set sequence_number [lindex $sequence_number_map($liid,$seid) 0]}]} {
set sequence_number 0
}
else
{
incr sequence_number
}
set sequence_number_map($liid,$seid) [list $sequence_number [clock seconds]]
UDP::payload replace 0 0 [binary format I $sequence_number]
}
}
(The time stamp value in the sequence number map is used by another iRule that
removes obsolete entries in the map)
Question 2)
The web interface indicates that the TMM CPU usage doesn't exceed 50% during
my performance tests. Is this the normal behaviour? I would have expected values up
to 100%.
Best Regards,
Christian Gebauer