You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@skywalking.apache.org by dafang <13...@163.com> on 2020/07/09 06:59:23 UTC

A question for agent-sample

hi dev team:
I have a question for help.
I had set "agent.sample_n_per_3_secs=${SW_AGENT_SAMPLE: 300}", but I got cpm 50000 in sw-web on this service-agent.In my submission,the maximum CPM should be 6000,but why is more than 50000.

Re: A question for agent-sample

Posted by Sheng Wu <wu...@gmail.com>.
I don't know how to make this. It is simple logic. I am not aware of any
case that could cause this.

Sheng Wu 吴晟
Twitter, wusheng1108


dafang <13...@163.com> 于2020年7月9日周四 下午3:35写道:

>
>
>
> I have read the source code,I know there is a 'AtomicInteger' added ,and
> will be zero pre 3s,if the 'AtomicInteger' is less than
> 'sample_n_per_3_secs',This trace will be ignoreTrace.
> And I set 'sample_n_per_3_secs' equals 300,the max cpm should be (300 *
> 60/3)=6,000, not 60,000.And if `sampling per n seconds` is not a thing very
> accurate,it should be double or triple than 6,000. But actually, In my prod
> env ,is more than 50,000.It seem there is no concurrency problem.I wanna to
> know the real reason.Thank you very much
>
>
>
>
>
>
>
>
>
>
>
>
>
> >`sampling per n seconds` is not a thing very accurate.
> >The major purpose is, you can't be over that load, but didn't guarantee
> you
> >could collect 100% when your traffic is lower than that.
> >
> >Also, in another case, CPM = 60000 definitely doesn't equal to 300 per 3
> >seconds. The traffic is not the always same in the real world.
> >
> >Sheng Wu 吴晟
> >Twitter, wusheng1108
> >
> >
> >dafang <13...@163.com> 于2020年7月9日周四 下午2:59写道:
> >
> >> hi dev team:
> >> I have a question for help.
> >> I had set "agent.sample_n_per_3_secs=${SW_AGENT_SAMPLE: 300}", but I got
> >> cpm 50000 in sw-web on this service-agent.In my submission,the maximum
> CPM
> >> should be 6000,but why is more than 50000.
>

Re: A question for agent-sample

Posted by dafang <13...@163.com>.


I have read the source code,I know there is a 'AtomicInteger' added ,and will be zero pre 3s,if the 'AtomicInteger' is less than 'sample_n_per_3_secs',This trace will be ignoreTrace.
And I set 'sample_n_per_3_secs' equals 300,the max cpm should be (300 * 60/3)=6,000, not 60,000.And if `sampling per n seconds` is not a thing very accurate,it should be double or triple than 6,000. But actually, In my prod env ,is more than 50,000.It seem there is no concurrency problem.I wanna to know the real reason.Thank you very much













>`sampling per n seconds` is not a thing very accurate.
>The major purpose is, you can't be over that load, but didn't guarantee you
>could collect 100% when your traffic is lower than that.
>
>Also, in another case, CPM = 60000 definitely doesn't equal to 300 per 3
>seconds. The traffic is not the always same in the real world.
>
>Sheng Wu 吴晟
>Twitter, wusheng1108
>
>
>dafang <13...@163.com> 于2020年7月9日周四 下午2:59写道:
>
>> hi dev team:
>> I have a question for help.
>> I had set "agent.sample_n_per_3_secs=${SW_AGENT_SAMPLE: 300}", but I got
>> cpm 50000 in sw-web on this service-agent.In my submission,the maximum CPM
>> should be 6000,but why is more than 50000.

Re: A question for agent-sample

Posted by Sheng Wu <wu...@gmail.com>.
`sampling per n seconds` is not a thing very accurate.
The major purpose is, you can't be over that load, but didn't guarantee you
could collect 100% when your traffic is lower than that.

Also, in another case, CPM = 60000 definitely doesn't equal to 300 per 3
seconds. The traffic is not the always same in the real world.

Sheng Wu 吴晟
Twitter, wusheng1108


dafang <13...@163.com> 于2020年7月9日周四 下午2:59写道:

> hi dev team:
> I have a question for help.
> I had set "agent.sample_n_per_3_secs=${SW_AGENT_SAMPLE: 300}", but I got
> cpm 50000 in sw-web on this service-agent.In my submission,the maximum CPM
> should be 6000,but why is more than 50000.