-
Notifications
You must be signed in to change notification settings - Fork 4
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
DO NOT MERGE. Intro serializer lib with json and protobuf. #107
base: main
Are you sure you want to change the base?
Conversation
use gogo protobuf
use bytes for rv map in transit for protobuf not support struct as map key separate type def separate type def separate type def
…ling data from region manager protobuf auto-gen files and hard-coded to protobuf serializer for pulling data from region manager handle time in protobuf
only wait for empty pulls
@@ -118,6 +112,9 @@ func (a *Aggregator) Run() (err error) { | |||
if eventProcess { | |||
a.postCRV(c, crv) | |||
} | |||
} else { |
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.
Typically, there will be a comparison between actual data size and batch size. If data size == batch size, no need to wait for subsequent pull. Wait a bit if data size < batch size. Without waiting, even a single event can cause immediate subsequent pull. This seems a bit misaligned with 100ms for empty pull.
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.
good point. will fix.
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.
currently the batch size is not used, so comparing with expected ( batch size ) and the actually got data ( the length ) won't help here for now.
since the goal is to avoid waitless pull()s from the aggregator to avoid busy cpu spins, we will check the durations of pull() and/or the processEvent() and make adjustment of wait time here.
FYI, this change caused 20% performance lost for distributor_concurrency_test (for 2M events, 200K events seem ok) when metrics is disabled. |
|
||
// NewRegionNodeEvents creates a Region Node Events handler with the given logger | ||
// | ||
func NewRegionNodeEventsHander() *RegionNodeEventHandler { | ||
return &RegionNodeEventHandler{} | ||
return &RegionNodeEventHandler{ | ||
// serializer: localJson.NewSerializer("foo", false), |
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.
This commented line should be removed, right?
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.
yeah, i should have removed it. will do.
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.
Suggest to add an instruction/steps about how to use protobuf to automatically generate files.
Reference: CentaurusInfra/arktos#1281.
Also, before merge into main branch, can this PR be tested in GCE env because too many files are modified by this PR?
some perf comparison for the event queue change in commit fb9b951
--- server side metrics:
|
on hold, should extra perf for the GRS is needed. |
@@ -201,7 +202,7 @@ func (eq *NodeEventQueue) getAllEventsSinceResourceVersion(rvs types.InternalRes | |||
} | |||
} | |||
|
|||
nodeEvents := make([]*types.NodeEvent, 0) | |||
nodeEvents := make([]*types.NodeEvent, 0, 1000) |
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.
By test, this change does not improve performance.
put this PR on hold. |
this PR contains changes in two major commits for
fix in issue #102