# what is jitter's measurement unit in \`producer.getStats()\`?

**URL:** <https://mediasoup.discourse.group/t/what-is-jitters-measurement-unit-in-producer-getstats/6000>\
**Category:** mediasoup libraries\
**Created:** [April 21, 2024, 7:15am UTC](https://mediasoup.discourse.group/t/what-is-jitters-measurement-unit-in-producer-getstats/6000 "2024-04-21T07:15:55Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![engi](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/engi/32/1090_2.png) [@engi](https://mediasoup.discourse.group/u/engi)\
**Post date:** [April 21, 2024, 7:15am UTC](https://mediasoup.discourse.group/t/what-is-jitters-measurement-unit-in-producer-getstats/6000/1 "2024-04-21T07:15:55Z")

</div>

hi .  
in our application we are showing user details about their network like packet-loss and …  
one of most important metrics is `jitter` or `inbound-jitter` and `outbound-jitter`  
we are using server-side calculation of `producer.getStats()` to calc outbound-jitter and because we don’t have consumers jitter we do inbound-jitter calculation locally just using client side `getStats()`.  
anyway …  
**please look at this result :**

 ![image](https://global.discourse-cdn.com/free1/uploads/mediasoup/original/2X/f/f6d777988b12397cd35c655c7bdbf5d7af58b1e3.png)  
as you can see producer jitter is about **10x** of consumer jitter . i tested with many different networks and devices on my service and same result .

### 1- my question is this in new updates we changed anything about jitter measurement unit or calculation ? (i know i already read release note)

### 2- what is current jitter measurement unit ? milliseconds ?

thank you.

---

<div class="post-metadata">

**Author:** ![BronzedBroth](https://avatars.discourse-cdn.com/v4/letter/b/ad7895/32.png) [@BronzedBroth](https://mediasoup.discourse.group/u/BronzedBroth)\
**Post date:** [April 23, 2024, 12:52pm UTC](https://mediasoup.discourse.group/t/what-is-jitters-measurement-unit-in-producer-getstats/6000/2 "2024-04-23T12:52:32Z")

</div>

Milliseconds

---

<div class="post-metadata">

**Author:** ![engi](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/engi/32/1090_2.png) [@engi](https://mediasoup.discourse.group/u/engi)\
**Post date:** [April 24, 2024, 5:09am UTC](https://mediasoup.discourse.group/t/what-is-jitters-measurement-unit-in-producer-getstats/6000/3 "2024-04-24T05:09:10Z")

</div>

thank you .  
so there is a problem properly .  
i was updated mediasoup from 3.12.6 to 3.13.15. after that our clients reported the jitter number is high .  
do you have any recommendation how can i debug it and find this congestion ?

---

<div class="post-metadata">

**Author:** ![BronzedBroth](https://avatars.discourse-cdn.com/v4/letter/b/ad7895/32.png) [@BronzedBroth](https://mediasoup.discourse.group/u/BronzedBroth)\
**Post date:** [April 24, 2024, 11:01pm UTC](https://mediasoup.discourse.group/t/what-is-jitters-measurement-unit-in-producer-getstats/6000/4 "2024-04-24T23:01:31Z")

</div>

Well that depends, I can’t speak on versions of mediasoup, I’ve not seen an update have such drastic impact on network and many would report it. However for sake of trialing down-grade and switch back to see if it’s consistent for fastest debugging.

If you can’t find consistency between the versions you would likely be having some network issues and this could be temporary from several hours to days and affect specific users sometimes.

A trace-route helps one understand where latency is occurring and if major host is affected at specific hops. With testing many end-points with server you can determine if server is fine.

Sometimes the user has poor connection and there’s little we can do but perhaps offer more servers in different locations or they utilize a VPN/etc to get the best hops.

---

<div class="post-metadata">

**Author:** ![BronzedBroth](https://avatars.discourse-cdn.com/v4/letter/b/ad7895/32.png) [@BronzedBroth](https://mediasoup.discourse.group/u/BronzedBroth)\
**Post date:** [April 24, 2024, 11:04pm UTC](https://mediasoup.discourse.group/t/what-is-jitters-measurement-unit-in-producer-getstats/6000/5 "2024-04-24T23:04:48Z")

</div>

There’s a reason why I run more than one media server, we could be online for months then a DDOS or network outages occur and I have everyone complaining. Designing a system to allow users to switch servers is most optimal.

---

<div class="post-metadata">

**Author:** ![engi](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/engi/32/1090_2.png) [@engi](https://mediasoup.discourse.group/u/engi)\
**Post date:** [April 27, 2024, 8:08am UTC](https://mediasoup.discourse.group/t/what-is-jitters-measurement-unit-in-producer-getstats/6000/6 "2024-04-27T08:08:59Z")

</div>

thanks for your response .  
i down-graded version to previous version and seems like problem is solved . i think maybe calculation algorithm maybe changed and measurement unit has been changed (from Seconds to Milliseconds)  
how can i check changes ? i mean which files i should check in worker source code ?

---

<div class="post-metadata">

**Author:** ![engi](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/engi/32/1090_2.png) [@engi](https://mediasoup.discourse.group/u/engi)\
**Post date:** [April 27, 2024, 9:17am UTC](https://mediasoup.discourse.group/t/what-is-jitters-measurement-unit-in-producer-getstats/6000/7 "2024-04-27T09:17:14Z")

</div>

and something else i figured out is the jitter in lower version is less than higher version . i do not know really whats happening between these 2 versions but was maybe congestion controller did changed ?

version : 3.12.16  
 ![image](https://global.discourse-cdn.com/free1/uploads/mediasoup/original/2X/2/2bb0d603bbf72a512bdefbdf9495f4ff5b2fc204.png)

version : 3.13.15  
 ![image](https://global.discourse-cdn.com/free1/uploads/mediasoup/original/2X/d/d56bf2e4744ed2b39f6ab0f493b862ad2a760cd3.png)

**same network / same host**

---

<div class="post-metadata">

**Author:** ![engi](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/engi/32/1090_2.png) [@engi](https://mediasoup.discourse.group/u/engi)\
**Post date:** [May 5, 2024, 7:14am UTC](https://mediasoup.discourse.group/t/what-is-jitters-measurement-unit-in-producer-getstats/6000/8 "2024-05-05T07:14:23Z")

</div>

i also checked the latest version (via live demo) and got same result.
