Counters Frequency and costs

%3CLINGO-SUB%20id%3D%22lingo-sub-833645%22%20slang%3D%22en-US%22%3ECounters%20Frequency%20and%20costs%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-833645%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20all%3CBR%20%2F%3EI%20need%20to%20understand%20a%20way%20of%20calculating%20each%20VM%20Performance%20Counter%20frequency%20and%20associated%20costs.%3CBR%20%2F%3EI%20get%20that%20Log%20Analytics%20charges%20you%20for%20Data%20Ingestion%2C%20correct%3F%3CBR%20%2F%3ESo%20if%20I%20have%20one%20perf%20counter%20(e.g.%20Memory%20%25)%20configured%20to%20probe%20each%2010%20seconds%2C%20I%20would%20save%20costs%20by%20modifying%20it%20to%2C%20lets%20say%2C%2030%20seconds.%3CBR%20%2F%3EHowever%20I%20don't%20understand%20how%20to%20calculate%20how%20much%20space%20is%20one%20perf%20counter%20probe%20using.%3C%2FP%3E%3CP%3EIt's%20a%20silly%20question%20but%20I%20can't%20find%20any%20straightforward%20way%20of%20calculating%20how%20much%20I%20can%20save%2Fexpend%20by%20tweaking%20the%20frequency%20of%20the%20performance%20counters.%3CBR%20%2F%3E%3CBR%20%2F%3EThank%20you%20in%20advance.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-833645%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAzure%20Log%20Analytics%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EData%20Retention%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-833773%22%20slang%3D%22en-US%22%3ERe%3A%20Counters%20Frequency%20and%20costs%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-833773%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F74148%22%20target%3D%22_blank%22%3E%40D.%20Nahuel%20C.%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EYou%20can%20see%20how%20much%20data%20a%20counter%20used%20in%2010s%2C%2030s%20etc...%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3EPerf%0A%7C%20where%20CounterName%20%3D%3D%20%22%25%20Processor%20Time%22%20and%20%20InstanceName%20%3D%3D%20%22_Total%22%20%0A%7C%20summarize%20TotalGBytes%20%3D%20sum(_BilledSize%20%2F%20(1024*1024*1024))%20by%20bin(TimeGenerated%2C%2010s)%20%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fportal.loganalytics.io%2FDemo%3Fq%3DH4sIAAAAAAAAAz2NwQqCQBiE74LvMAiBRpBGVy92kC4h1F1WnWjB3YV%252FV8Lo4WM7eJnDNx8zadJRnmnyxftFIS5usYFyU4aoa2Q7dOJGeu8ED22YQdkJuFoflB25ef3DBTVniEt%252BMUaJ%252FhB%252F2DZroEcded43ep453WN7RF6Vp%252FN%252Bi6LAsGLQNo9XLS1FBU4HVKUv8AMaJHR%252BqwAAAA%253D%253D%26amp%3Btimespan%3DP1D%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3EGo%20to%20Log%20Analytics%20and%20Run%20Query%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EI%20have%20a%20few%20posts%20along%20similar%20lines%3A%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcloudblogs.microsoft.com%2Findustry-blog%2Fen-gb%2Fcross-industry%2F2019%2F07%2F22%2Fazure-log-analytics-looking-at-data-and-costs-part-4%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fcloudblogs.microsoft.com%2Findustry-blog%2Fen-gb%2Fcross-industry%2F2019%2F07%2F22%2Fazure-log-analytics-looking-at-data-and-costs-part-4%2F%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EYou%20might%20need%20to%20see%20Bytes%2C%20to%20find%20the%20%3CSTRONG%3Eaverage%3C%2FSTRONG%3Eper%20time%20period%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3EPerf%0A%7C%20where%20CounterName%20%3D%3D%20%22%25%20Processor%20Time%22%20and%20%20InstanceName%20%3D%3D%20%22_Total%22%20%0A%7C%20summarize%20TotalBytes%20%3D%20avg(_BilledSize)%20by%20bin(TimeGenerated%2C%2010s)%20%0A%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fportal.loganalytics.io%2FDemo%3Fq%3DH4sIAAAAAAAAAz3MvQrCQBhE0T6QdxgWhAQstLBMEwuxkYDpw5dk1IX9gd2NEvHhNSls5w6nYbjl2QevBwNx9JNLDBexRFVBbdAEPzBGH9BqSwVxI3B2MYkb%252BP91rU9iFBYpTtZK0G9iHes5MaKCPO9FV2tjOF5%252FsUQ%252Fo9euWNgTHYMkjlvsd7FcGaOtTjjk2RdEL188ogAAAA%253D%253D%26amp%3Btimespan%3DP1D%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3EResults%3A%3C%2FA%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%0A%3CDIV%3E%0A%3CTABLE%20cellspacing%3D%221%22%20cellpadding%3D%225%22%3E%0A%3CTBODY%3E%0A%3CTR%3E%0A%3CTH%3ETimeGenerated%3C%2FTH%3E%0A%3CTH%3ETotalBytes%3C%2FTH%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%3E2019-09-01T23%3A26%3A10Z%3C%2FTD%3E%0A%3CTD%3E225.203125%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%3E2019-09-01T23%3A26%3A20Z%3C%2FTD%3E%0A%3CTD%3E224.793893129771%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%3E2019-09-01T23%3A26%3A30Z%3C%2FTD%3E%0A%3CTD%3E224.40458015267177%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%3E2019-09-01T23%3A26%3A40Z%3C%2FTD%3E%0A%3CTD%3E224.29007633587787%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%3E2019-09-01T23%3A26%3A50Z%3C%2FTD%3E%0A%3CTD%3E224.74418604651163%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTBODY%3E%0A%3C%2FTABLE%3E%0A%3C%2FDIV%3E%3C%2FLINGO-BODY%3E
New Contributor

Hi all
I need to understand a way of calculating each VM Performance Counter frequency and associated costs.
I get that Log Analytics charges you for Data Ingestion, correct?
So if I have one perf counter (e.g. Memory %) configured to probe each 10 seconds, I would save costs by modifying it to, lets say, 30 seconds.
However I don't understand how to calculate how much space is one perf counter probe using.

It's a silly question but I can't find any straightforward way of calculating how much I can save/expend by tweaking the frequency of the performance counters.

Thank you in advance.

1 Reply

@D. Nahuel C. 

 

You can see how much data a counter used in 10s, 30s etc...

 

Perf
| where CounterName == "% Processor Time" and  InstanceName == "_Total" 
| summarize TotalGBytes = sum(_BilledSize / (1024*1024*1024)) by bin(TimeGenerated, 10s) 

 

Go to Log Analytics and Run Query

 

I have a few posts along similar lines: https://cloudblogs.microsoft.com/industry-blog/en-gb/cross-industry/2019/07/22/azure-log-analytics-l... 

 

You might need to see Bytes, to find the average per time period

Perf
| where CounterName == "% Processor Time" and  InstanceName == "_Total" 
| summarize TotalBytes = avg(_BilledSize) by bin(TimeGenerated, 10s) 

Results:

TimeGenerated TotalBytes
2019-09-01T23:26:10Z 225.203125
2019-09-01T23:26:20Z 224.793893129771
2019-09-01T23:26:30Z 224.40458015267177
2019-09-01T23:26:40Z 224.29007633587787
2019-09-01T23:26:50Z 224.74418604651163