diff options
author | Moustafa Moustafa <momousta@microsoft.com> | 2020-08-20 12:04:03 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-20 13:04:03 -0600 |
commit | d941c7f7846e0216873384044d20f4b6723697c5 (patch) | |
tree | 7eeadd04459d2313f628834658c9449a2304fe25 /cloudinit/cmd | |
parent | 79a8ce7e714ae1686c10bff77612eab0f6eccc95 (diff) | |
download | vyos-cloud-init-d941c7f7846e0216873384044d20f4b6723697c5.tar.gz vyos-cloud-init-d941c7f7846e0216873384044d20f4b6723697c5.zip |
Pushing cloud-init log to the KVP (#529)
Push the cloud-init.log file (Up to 500KB at once) to the KVP before reporting ready to the Azure platform.
Based on the analysis done on a large sample of cloud-init.log files, Here's the statistics collected on the log file size:
P50 P90 P95 P99 P99.9 P99.99
137K 423K 537K 3.5MB 6MB 16MB
This change limits the size of cloud-init.log file data that gets dumped to KVP to 500KB. So for ~95% of the cases, the whole log file will be dumped and for the remaining ~5%, we will get the last 500KB of the cloud-init.log file.
To asses the performance of the 500KB limit, 250 VM were deployed with a 500KB cloud-init.log file and the time taken to compress, encode and dump the entries to KVP was measured. Here's the time in milliseconds percentiles:
P50 P99 P999
75.705 232.701 1169.636
Another 250 VMs were deployed with this logic dumping their normal cloud-init.log file to KVP, the same timing was measured as above. Here's the time in milliseconds percentiles:
P50 P99 P999
1.88 5.277 6.992
Added excluded_handlers to the report_event function to be able to opt-out from reporting the events of the compressed cloud-init.log file to the cloud-init.log file.
The KVP break_down logic had a bug, where it will reuse the same key for all the split chunks of KVP which results in overwriting the split KVPs by the last one when consumed by Hyper-V. I added the split chunk index as a differentiator to the KVP key.
The Hyper-V consumes the KVPs from the KVP file as chunks whose key is 512KB and value is 2048KB but the Azure platform expects the value to be 1024KB, thus I introduced the Azure value limit.
Diffstat (limited to 'cloudinit/cmd')
0 files changed, 0 insertions, 0 deletions