sonic-net / sonic-sairedis

SAI object interface to Redis database, as used in the SONiC project
Other
56 stars 259 forks source link

fdb_flush.lua executes so long leading to REDIS BUSY #1397

Open inspurSDN opened 1 month ago

inspurSDN commented 1 month ago

Why I did it mac learning, configure TC1 to send the traffic of smac changes (number 217600). Log error: No More Resources, Orchagent hang

Nov 29 17:50:47.706137 NV2 ERR syncd#SDK: [FDB_UC.ERR] Polling enabled on error Nov 29 17:50:47.806214 NV2 ERR syncd#SDK: [FDB_UC.ERR] Failed adding entries to RM (No More Resources) Nov 29 17:50:47.806214 NV2 ERR syncd#SDK: [FDB_UC.ERR] Process polled data failed on SWID - 0, status - No More Resources Nov 29 17:50:47.806214 NV2 ERR syncd#SDK: [FDB_UC.ERR] Polling enabled on error Nov 29 17:50:47.906356 NV2 ERR syncd#SDK: [FDB_UC.ERR] Failed adding entries to RM (No More Resources)

What I did Instead of using Lua script to flush, use loop deletion in the code.

inspurSDN commented 1 month ago

Hi @yxieca , @vaibhavhd , could you please kindly review these? #1397 #1399 #1400

yxieca commented 1 month ago

@qiluo-msft to help take an initial assessment.

kcudnik commented 3 weeks ago

How come Lua is slower than deleting 1by one using hiredis ? Do you have performance stats for this ?