sonic-net / sonic-swss

SONiC Switch State Service (SwSS)
https://azure.github.io/SONiC
Other
179 stars 537 forks source link

[CRM] used + available is not equal total while changing #1481

Open huseratgithub opened 4 years ago

huseratgithub commented 4 years ago

Hi, In my test scenario, I modify crm polling interval, and show the resource result when learning fdb. I found that the 'Used Count' + 'Available Count' is not equal the total number. The following are the logs.

root@sonic:/home/admin# crm show summaryn

Polling Interval: 10 second(s)

root@sonic:/home/admin# root@sonic:/home/admin# crm show resources fdb

Resource Name Used Count Available Count ------------------- -------------- --------------------· fdb_entry 0 131072

root@sonic:/home/admin# crm show resources fdb

Resource Name Used Count Available Count ------------------- -------------- --------------------· fdb_entry 4673 115757

root@sonic:/home/admin# crm show resources fdb

Resource Name Used Count Available Count ------------------- -------------- --------------------· fdb_entry 39628 87

root@sonic:/home/admin# crm show resources fdb

Resource Name Used Count Available Count ------------------- -------------- --------------------· fdb_entry 114643 0

root@sonic:/home/admin# crm show resources fdb

Resource Name Used Count Available Count ------------------- -------------- --------------------· fdb_entry 131072 0

From the crm_monitoring_flow I see that SAI return 'Available Count', but 'Used Count' is counted by SONiC DB. Here is the problem, the rapid ‘Available Count’ and the slow 'Used Count' would make or miss WARNING logs.

Regards

anshuv-mfst commented 3 years ago

@huseratgithub - could you please provide more details:

  1. Platform issue seen in?
  2. Is the issue seen in latest build?