-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Temporarily increase notifications buffer size #5644
Conversation
@@ -937,7 +937,7 @@ impl Metrics { | |||
"sub_libp2p_notifications_queues_size", | |||
"Total size of all the notification queues" | |||
), | |||
buckets: vec![0.0, 1.0, 2.0, 4.0, 8.0, 16.0, 32.0, 64.0, 128.0, 256.0], | |||
buckets: vec![0.0, 1.0, 2.0, 4.0, 8.0, 16.0, 32.0, 64.0, 128.0, 256.0, 511.0, 512.0], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
buckets: vec![0.0, 1.0, 2.0, 4.0, 8.0, 16.0, 32.0, 64.0, 128.0, 256.0, 511.0, 512.0], | |
buckets: vec![0.0, 1.0, 2.0, 4.0, 8.0, 16.0, 32.0, 64.0, 128.0, 256.0, 512.0], |
Why 511?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We start dropping messages above 512 leaving the length at 512.
Histogram buckets are upper bounds. Thus in the case where we don't have the 511 bucket and the histogram shows 512 we don't know whether the buffer length is
-
between 256 and 512 and thus not dropping packets, or
-
at 512 and thus dropping packets.
Introducing bucket 511 into the picture the Histogram will show 511 or lower if the buffer is not dropping packets and 512 if it is full or dropping packets.
Does that make sense @bkchr?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not really, but if that is intentionally, okay :)
It seems that the queue size of GrandPa notifications now frequently reaches the 128-256 elements bucket, as seen on this graph:
Since the hard limit is 256, I can't actually know whether notifications are discarded or not. But whether they are or not, let's increase the limit until this is taken care of.
The proper solution is #5481