Forum Discussion

Suresh_Joshi_01's avatar
Suresh_Joshi_01
Icon for Nimbostratus rankNimbostratus
Dec 02, 2013

irule_rate shaping

Hi All,

 

When we enabled irule_rate shaping in LTM we are facing cpu spiking issue,CPU is reached almost 90% but when we disable irule_rate shaping cpu normalize.

 

Pls suggest how we can solve this problem.

 

BR, Suresh Joshi.

 

    • Suresh_Joshi_01's avatar
      Suresh_Joshi_01
      Icon for Nimbostratus rankNimbostratus
      irule_rate shaping -: when RULE_INIT { set static::maxquery 200 set static::period 300 set static::holdtime 300 } when CLIENT_DATA { if { [table lookup -subtable "blacklist" [IP::client_addr]] != "" } { reject return } set reqno [table incr "reqs:[IP::client_addr]"] table timeout "reqs:[IP::client_addr]" [expr { $static::period * 2 }] table set -subtable "reqrate:[IP::client_addr]" $reqno "ignored" indefinite $static::period if { [table keys -count -subtable "reqrate:[IP::client_addr]"] > $static::maxquery } { table add -subtable "blacklist" [IP::client_addr] "blocked" indefinite $static::holdtime log local0. "Allowed QPS exceeded for user ip [IP::client_addr]" reject return } }
    • Suresh_Joshi_01's avatar
      Suresh_Joshi_01
      Icon for Nimbostratus rankNimbostratus
      irule_rate shaping -: when RULE_INIT { set static::maxquery 200 set static::period 300 set static::holdtime 300 } when CLIENT_DATA { if { [table lookup -subtable "blacklist" [IP::client_addr]] != "" } { reject return } set reqno [table incr "reqs:[IP::client_addr]"] table timeout "reqs:[IP::client_addr]" [expr { $static::period * 2 }] table set -subtable "reqrate:[IP::client_addr]" $reqno "ignored" indefinite $static::period if { [table keys -count -subtable "reqrate:[IP::client_addr]"] > $static::maxquery } { table add -subtable "blacklist" [IP::client_addr] "blocked" indefinite $static::holdtime log local0. "Allowed QPS exceeded for user ip [IP::client_addr]" reject return } }
  • set static::period 300

     

    can you try to shorten the period?

     

    • Suresh_Joshi_01's avatar
      Suresh_Joshi_01
      Icon for Nimbostratus rankNimbostratus
      I was tried this but problem still persist. Even we reduced holdtime from 900 to 300 but still the problem is not solved.
    • nitass's avatar
      nitass
      Icon for Employee rankEmployee
      what was the period? have you tried a few seconds? by the way, you should not reduce the holdtime.
    • Suresh_Joshi_01's avatar
      Suresh_Joshi_01
      Icon for Nimbostratus rankNimbostratus
      I was tried this but problem still persist. Even we reduced holdtime from 900 to 300 but still the problem is not solved.
    • nitass_89166's avatar
      nitass_89166
      Icon for Noctilucent rankNoctilucent
      what was the period? have you tried a few seconds? by the way, you should not reduce the holdtime.