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

Performance of report. #31

Closed
surechen opened this issue Oct 14, 2019 · 4 comments
Closed

Performance of report. #31

surechen opened this issue Oct 14, 2019 · 4 comments
Assignees
Labels
question End user question and discussion.
Milestone

Comments

@surechen
Copy link

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
I find that function newSegmentRoot will create a coroutine for every request . At the end of each Segment collection, a message is sent immediately.I'm afraid this will affect performance.

Describe the solution you'd like
A clear and concise description of what you want to happen.

I'm wondering if go2sky can implement a collector to collect messages and send them based on time and quantity dimensions, so as to avoid creating a large number of coroutines in high concurrency scenarios.User can set report interval and number of segments.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

@wu-sheng
Copy link
Member

Could you point out the codes about this concern?

@wu-sheng wu-sheng added the question End user question and discussion. label Oct 14, 2019
@surechen
Copy link
Author

surechen commented Oct 15, 2019

Could you point out the codes about this concern?

Thanks for your reply. I mean in function call chain CreateEntrySpan->CreateLocalSpan->newSegmentSpan->newSegmentRoot. In func newSegmentRoot :
go func() {
total := -1
defer close(ch)
defer close(s.doneCh)
for {
select {
case span := <-s.notify:
s.segment = append(s.segment, span)
case n := <-s.doneCh:
total = int(n)
}
if total == len(s.segment) {
break
}
}
s.tracer.reporter.Send(append(s.segment, s))
}()
I'm worried about performance. I want a collector to be able to collect segments and send in batches after interval time or reach max count limit, rather than send each message immediately.

@wu-sheng
Copy link
Member

I'm worried about performance.

If this reports as a grpc stream, it is safe. SkyWalking javaagent doesn't need any collector, it could work in 5k-10k tps with 10% CPU only. Your concern should base on experiences, and code optimization. In most cases, the collector wouldn't help.

@surechen
Copy link
Author

I'm worried about performance.

If this reports as a grpc stream, it is safe. SkyWalking javaagent doesn't need any collector, it could work in 5k-10k tps with 10% CPU only. Your concern should base on experiences, and code optimization. In most cases, the collector wouldn't help.

Thansk for your reply.

@wu-sheng wu-sheng added this to the 0.2 milestone Oct 15, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
question End user question and discussion.
Projects
None yet
Development

No branches or pull requests

3 participants