Commit Graph

2 Commits

Author SHA1 Message Date
Adam Simpkins
1cdee770a5 update copyright headers in some of the common/ stub headers
Summary: Update copyright messages to match the patterns expected by our open source linters.

Reviewed By: chadaustin

Differential Revision: D15105843

fbshipit-source-id: 6c66b4e3a552f9d71e6b43f9a5e6fcda48fd00d9
2019-04-26 14:38:28 -07:00
Shrikrishna Khare
0de0ba4f3b enable BST stats by default
Summary:
This patch enables BST stats by default, and works as follows:
  - it uses quantile stats to maintain per queue per port stats.
  - these stats are exposed to ODS.
  - experiments showed that a significant CPU cycles were spent in doing
    bcm_cosq_bst_stat_sync which syncs the hw stat value to sw copy.
    For example, calling bcm_cosq_bst_stat_sync while retrieving BST stats
    for for every port/every queue/every second resulted into CPU utilization
    going up from ~ 50% for Wedge 100 to ~100-120%. Thus, this patch calls
    bcm_cosq_bst_stat_sync only once per minute and then retrieves all BST stats.
  - The above optimization also helps when bufferstatlogging is enabled.
  - when bufferstatlogging is enabled, the BST stats will be retrieved every
    second for scuba logging, and quantile stats will also be exported every
    second.
  - The bufferstatlogging is enabled using fboss CLI (over thrift).
    We no longer need enable_fine_grained_buffer_stats option. But, a new option
    viz. update_bststats_interval_s is introduced that keeps the frequency of BST
    stats updates configurable.

The virtual memory overhead of always maintaining BST stats is < 5%, and
physical memory overhead is < 0.1%. Thanks to the sync optimization above,
the CPU overhead is negligible. Refer Test Plan for raw data and math.

An alternative is to explore using TimeSeriesMinMax (to maintain max over a
time window) and TLCounter (to expose stats to ODS) instead of quantile stats.
One benefit of using quantile stats is that we don't need to maintain our own
TimeSeriesMinMax but can rely on common facebook wide infra. Moreoever,
quantile stats interface is (arguably) simpler than using combination of
TimeSeriesMinMax + TlCounter'.

A separate diff against configerator is sent out to expose the new bst_stats: D8902636

Differential Revision: D8764329

fbshipit-source-id: 78db3de5340497f2f5780863035dd9ff28dcd79b
2019-01-25 10:37:57 -08:00