This repository has been archived by the owner on Feb 20, 2023. It is now read-only.
Log Serializer Task Metrics Granularity #1569
Labels
question/discussion
Further information is requested.
Discussion
The following code is responsible for tracking metrics in the
LogSerializerTask
noisepage/src/storage/write_ahead_log/log_serializer_task.cpp
Lines 21 to 67 in 97eb7ec
Process()
Has its own loop, which continuously loops as long as there are more log records to serialize. That means thatProcess()
doesn't return until there's a break in log records. The two consequences of this areSo if you're running a workload with a lot of small transactions, you may end up with a single interval that contains the metrics of the entire workload.
As an example here are some metrics from running 3000 transactions where each transaction is a single insert.
logs.csv
That last interval lasts for roughly 17 minutes
I'm not actually familiar enough with the metrics and their usages to know if this is an issue or if this is ok.
Solution
If this is an issue, then below are two potential solutions though feel free to suggest others.
while(true)
loop fromProcess()
. It seems a bit unnecessary that bothProcess()
andLogSerializerTaskLoop()
continuously loop. Though it's possible that there's a good reason for the internal while loop and I haven't looked closely enough.Process()
itself, that way each iteration of the loop inProcess()
is a single collection interval.The text was updated successfully, but these errors were encountered: