Skip to content
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

Add counters for bytes sent by ICE pings (#534) #535

Merged
merged 1 commit into from
Mar 25, 2020

Conversation

jonasore
Copy link
Contributor

Copy link
Collaborator

@henbos henbos left a comment

Choose a reason for hiding this comment

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

@alvestrand can you take a look? Is connectivity bytes for checks well-defined?

</dt>
<dd>
<p>
Total number of bytes sent for connectivity checks.
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this include the headers or only the payload? We should be consistent across the dictionaries that the measurement of bytesSent and bytesReceived.

Copy link
Contributor

Choose a reason for hiding this comment

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

The definition of "bytesSent" should be clear about whether ICE checks are counted or not. At the moment, I think it's not clear.
(I think they should not be included in "bytesSent", because they are overhead seen from the user. But the most important thing is that it is clear.)

@henbos
Copy link
Collaborator

henbos commented Jan 29, 2020

RTCIceCandidatePairStats.bytesSent is said to only be payload bytes. Does ICE pings contain any payload?

How do you intend to use these counters? I'm wondering if the current implementation of candidate pair bytes sent is correct.

Or if you want to subtract ICE pings from the transport bytes sent I wonder if we need to add these metrics to the transport dictionary.

Do we know ICE candidate pair stats are supposed to be deleted?

@henbos
Copy link
Collaborator

henbos commented Jan 29, 2020

Can you add text to bytesSent to say whether STUN pings are included or not?

@jonasore
Copy link
Contributor Author

Answers:

  1. Does this include the headers or only the payload? We should be consistent across the dictionaries that the measurement of bytesSent and bytesReceived.

This payload for the ICE pings. I'm not sure about ip headers as such, but I assume they are not counted. (can check in rest of documentation about that)

  1. RTCIceCandidatePairStats.bytesSent is said to only be payload bytes. Does ICE pings contain any payload?

No

  1. How do you intend to use these counters? I'm wondering if the current implementation of candidate pair bytes sent is correct.

I modified an ICE agent to send more pings, I would like to be able to add up how much that "cost" and compare it to the actual payload sent. I'm currently not 100% certain to how they are counted wrt to the existing counters.

  1. Do we know ICE candidate pair stats are supposed to be deleted?

Don't understand.

@henbos
Copy link
Collaborator

henbos commented Mar 25, 2020

When we talk about header bytes in other places we are not talking about transport-layer headers like TCP or UDP. So for RTP packets, the headers are the size of the RTP headers.

The ICE packets should contain an ICE protocol header, to distinguish it from RTP packets, I guess?
Do we need a ICE headerBytesSent or is this not of interest?

  1. RTCIceCandidatePairStats.bytesSent is said to only be payload bytes. Does ICE pings contain any payload?

No

So if I sent 1 kB of ICE ping I would expect bytesSent to increase by 0?
Then what makes up an ICE ping packet used for probing. Is the ICE header massive? Or are we sending lots and lots of tiny ICE pings but they add up to a lot in the end?

@jonasore
Copy link
Contributor Author

  1. I don't think it adds value to talk about ICE protocol header...just bytes,
    i.e the metric should include all bytes sent as STUN pings.

  2. "ICE ping packed used for probing", parse error.
    The RTP probing is done using RTP packets.

  3. "Or are we sending lots and lots of tiny ICE pings but they add up to a lot in the end?"
    Sort of yes, the ICE agent that I'm working on constraints ICE pings to X bits/sec.
    Bitrate for RTP is sufficiently small, then X is noticable.

  4. I added this cause I've changed the frequency of the ICE pings,
    and there was no real way to measure that.

@jonasore
Copy link
Contributor Author

that said...i'm no longer super worried about my extra bytes...
(but I still didn't find a way to measure)

@alvestrand
Copy link
Contributor

I think it would make sense to treat bytes sent in ICE packets as "overhead only" - that is, not count them in RTCIceCandidatePair.bytesSent. But if they're currently counted as part of bytesSent, it's a compatibility problem to change that, and we should change the documentation of bytesSent instead.

Jonas, do you know if they're counted at present or not?

@henbos
Copy link
Collaborator

henbos commented Mar 25, 2020

One question is if they are included in bytesSent or not in the current chromium implementation.
Another question is what the pings look like on the wires. So for example, if they are a special type of payload that the sender knows about but not the receiver, this could cause the receiver endpoints' bytesReceived to increase. Or not if pings are really payload-neutral...

@jonasore
Copy link
Contributor Author

@jonasore
Copy link
Contributor Author

henbos question: all ICE messages should be STUN messages,
so I think this is safe atleast as coded today...

@alvestrand
Copy link
Contributor

Seems we're clear then!
Merging this one, and filing an issue about clarifying that bytesSent does not include ICE bytes.

@alvestrand alvestrand merged commit 9a255f4 into w3c:master Mar 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add metric for bytes sent for connectivity/consent requests and responses
4 participants