chaoyli edited a comment on issue #3517:
URL: 
https://github.com/apache/incubator-doris/issues/3517#issuecomment-625588846


   The metric is like this
   ```
   [
      {
         "tags":{
            "tablet_id":10010,
            "metric":"scanner_rows"
         },
         "value":1000,
         "unit":"number"
      },
      {
         "tags":{
            "tablet_id":10010,
            "metric":"scanner_bytes"
         },
         "value":1024,
         "unit":"bytes"
      }
   ]
   ```
   Supposing there are 10000 tablets in one BE node and collecting metrics at 
every 15 seconds.
   Every time we will gather 10000 * 200 Bytes = 2MB, one hundred nodes will 
collect 200MB.
   For metric in one BE node, I will use a map to store the information.
   ```
   std::unordered_map<tablet_id, metric> tablet_metric.
   ```
   Considering the timeliness, We should only need recent metric in one hour.
   So I will add another map will change to
   ```
   std::unordered_map<tablet_id, metric> tablet_metric.
   std::map<access_time, tablet_id> tablets_access_time;
   ```
   Tablets_access_time to update the tablet_id access_time, only tablets access 
in the last hour will be significantly.
   To be more concise, the 10000 can be created as a configuration.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to