[OpenSIPS-Users] Mediaproxy speed calculations

Dan Pascu dan at ag-projects.com
Tue Mar 28 13:27:10 EDT 2017

On 24 Mar 2017, at 19:51, Daniel Zanutti wrote:

> Hi
> Looks like i'm diving deep on mediaproxy.
> Some of our relays are not calculating the speed on the network. If I restart a couple times it starts calculating fine.
> I found this log:
> media-relay[4100]: warning: Aggregate speed calculation time exceeded 10ms: 11644 us for 222 sessions
> Is there any solution to always calculate?

The relay always calculates. That is just a warning when it takes too long, but the calculation still took place.

The reasons why you might not see traffic:

1. There is no actual traffic, despite having sessions setup, the devices do not send media
2. There is traffic but for some reason reading the traffic information from the kernel fails (I have no idea why that could happen, except maybe a severely overloaded virtual machine - see below)

I noticed something very wrong with that warning. On a machine running on a Core I7 from 2012 (Sandy Bridge architecture, so not the latest hardware, but something from 5 years ago), the calculation for 222 sessions, takes 20 us (that is micro seconds). You got 11644 us, which is approximately 600 times slower. Which means your virtual machine is severely overloaded, or the amount of resources it has allocated from the real hardware is abysmal.

On the same machine I mentioned before, having 2000 active sessions results in the speed calculations taking 170 us, which is well below the warning limit of 10 ms. Which means, the relay can drive thousands of sessions and you'll never see the warning.

In conclusion, unless you run on a severely overloaded system, or a very underpowered virtual machine, you should never see that warning and seeing the warning doesn't mean that calculations didn't take place.


More information about the Users mailing list