Conversation
|
I just ran into this myself. Looking forward to this landing so my dashboards will look nicer. |
|
Fix for: #1077 |
|
To answer a question @iximeow had, does the scrub count for these? To answer, here we have a propolis server running a scrub: So, we have a read only parent copying IO on a new blank disk. Looking in the console, we can see this:
We see the traffic from the initial boot, then IOs go to zero. A few minutes later, we see a little traffic on the disk, but I suspect this is from whatever background activities the boot disk is logging. I don't see traffic here to indicate the scrub traffic is being counted.
Now I have question for me, and that is why are these not counted? |
iximeow
left a comment
There was a problem hiding this comment.
thanks for the fix, sorry for the slow review.
this almost-but-does-not-quite get us metrics for local disks, only because the plumbing in propolis-server/bin/lib/initializer.rs is a little more clever than I'd had expected to find! as-is I think we'll experience a lot of heartburn around the Arc<dyn MetricConsumer> (same problem as #1003, but slightly different words) so that works out in our favor.
I'll do a followup issue about local metrics (because I think collecting them should be cheap!) and the imminent bottleneck if we turned that on as-is.



Crucible disk metrics were missing because
set_metric_consumerwas called on aDeviceAttachmentbefore Crucible's queues were associated with it. The original implementation only walked the already-associated queues and handed the consumer to each one'sQueueMinder. Any queue that arrived late simply never received it.The fix stores the
MetricConsumerinQueueColState(the collection-level state guarded by the collection's mutex), then inqueue_associatepropagates it to any newly-arriving queue's minder before the minder is installed into the slot. This mirrors exactly how the paused flag is already propagated to late-associating queues.A minor correctness fix:
as_mut()->as_ref()on the minder Optionwas also included, since
set_metric_consumertakes&self.