Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Temporarily increase notifications buffer size #5644

Merged
merged 3 commits into from
Apr 15, 2020

Conversation

tomaka
Copy link
Contributor

@tomaka tomaka commented Apr 15, 2020

It seems that the queue size of GrandPa notifications now frequently reaches the 128-256 elements bucket, as seen on this graph:

Screenshot from 2020-04-15 14-58-54

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

@tomaka tomaka added the A2-insubstantial Pull request requires no code review (e.g., a sub-repository hash update). label Apr 15, 2020
@tomaka tomaka requested a review from mxinden April 15, 2020 13:06
@tomaka tomaka added the B0-silent Changes should not be mentioned in any release notes label Apr 15, 2020
@tomaka tomaka added this to the 2.0 milestone Apr 15, 2020
@@ -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],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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?

Copy link
Contributor

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?

Copy link
Member

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 :)

@bkchr bkchr merged commit c546705 into paritytech:master Apr 15, 2020
@tomaka tomaka deleted the notifs-queues-sizes branch April 16, 2020 07:17
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A2-insubstantial Pull request requires no code review (e.g., a sub-repository hash update). B0-silent Changes should not be mentioned in any release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants