sonic-net / sonic-sairedis

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

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

Open inspurSDN opened 4 months ago

inspurSDN commented 4 months 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 4 months ago

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

yxieca commented 4 months ago

@qiluo-msft to help take an initial assessment.

kcudnik commented 4 months ago

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