-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
modify Reactor priorities #5826
Changes from 1 commit
56908ee
e88d6fa
79a0038
85cc31c
f8849fe
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,7 +34,7 @@ var ( | |
MsgType: new(ssproto.Message), | ||
Descriptor: &p2p.ChannelDescriptor{ | ||
ID: byte(SnapshotChannel), | ||
Priority: 3, | ||
Priority: 2, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @erikgrinaker do I understand correctly that sending snapshots are 1/3rd less important than sending chunks? or it should be vice versa? maybe we should just assign There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Higher priority is better, right? So snapshot metadata is 3 times more important than chunks. This is because chunks are large and restoration is time-consuming, while snapshot metadata is tiny and requested in real-time, so it should have priority. We probably want chunks to have low priority in general, for the same reason. It shouldn't have priority above e.g. consensus. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
right |
||
SendQueueCapacity: 10, | ||
RecvMessageCapacity: snapshotMsgSize, | ||
}, | ||
|
@@ -43,7 +43,7 @@ var ( | |
MsgType: new(ssproto.Message), | ||
Descriptor: &p2p.ChannelDescriptor{ | ||
ID: byte(ChunkChannel), | ||
Priority: 1, | ||
Priority: 5, | ||
SendQueueCapacity: 4, | ||
RecvMessageCapacity: chunkMsgSize, | ||
}, | ||
|
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.
Could maybe consider even 7 here. Priorities are sort of weighted during packet sending, so that if one channel has 6 and another har 5 then the 6 channel gets 6/11 packets sent while the other gets 5/11 (if I'm reading this right).