Re: [OpenSIPS-Users] Mediaproxy speed calculations

2017-03-29 Thread Dan Pascu

On 29 Mar 2017, at 0:02, Daniel Zanutti wrote:

> Hi Dan
> 
> Based on your explanation, my physical machine with 2.8GHz is computing at 
> 5MHz, which is surely wrong.

Not according to the time it took to compute that.

> I have a similar scenario deployed on more than 50 machine and almost every 
> time Mediaproxy is started at linux boot, it doesn't calculate and show 
> speed. After restarting the process, speed is calculated fine.

This is news to me. In all my years of using the software, over dozens of 
servers, I have never encountered this problem.

> Could you please consider that the software may have a bug? Are you 
> interested on fixing it? Can I help?

Sure. But I never run into this and unless I can reproduce it, or get access to 
some system that exhibits it I cannot know what is wrong, or if it's a bug or 
something else.

--
Dan





___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Mediaproxy speed calculations

2017-03-28 Thread Daniel Zanutti
Hi Dan

Ok about not being able to force calculation, it's done periodically. But
for some reason, it's not calculating =(

You misunderstood me about the machine. On this scenario, I have complete
control of the machines, all physical machines are ours. When I said the
system is not overloaded during the night, I mean that both physical and
virtual machines are not being used at all (load 0%).

I just checked that at least one of these machines are physical and not
virtual, this is the config:
CPU0: Intel(R) Xeon(R) CPU   X5560  @ 2.80GHz (fam: 06, model: 1a,
stepping: 05)
smpboot: Total of 8 processors activated (44687.68 BogoMIPS)

Based on your explanation, my physical machine with 2.8GHz is computing at
5MHz, which is surely wrong.

I have a similar scenario deployed on more than 50 machine and almost every
time Mediaproxy is started at linux boot, it doesn't calculate and show
speed. After restarting the process, speed is calculated fine.

Could you please consider that the software may have a bug? Are you
interested on fixing it? Can I help?

Thanks


On Tue, Mar 28, 2017 at 5:32 PM, Dan Pascu  wrote:

>
> On 28 Mar 2017, at 20:55, Daniel Zanutti wrote:
>
> > Hi Dan
> >
> > Thanks for answering.
> >
> > The machine is not overloaded, actually i have the same problem with 10
> calls or 1000 calls.
> >
> > Syslog:
> > Mar 28 14:51:45 MP-104 media-relay[782]: warning: Aggregate speed
> calculation time exceeded 10ms: 15214 us for 418 sessions
> >
> >
> > TOP:
> > load average: 0.56, 0.61, 0.63
>
> You misunderstood me. I was not talking about your virtual machine, I was
> talking about the real hardware being overloaded, probably running too many
> virtual machines.
>
> From inside the virtual machine you cannot assess how loaded the real
> hardware is. You can have 0% CPU load inside your virtual machine, that
> doesn't mean things are OK. The fact that inside your virtual machine an
> operation takes 600 times longer than on 5 years old real hardware, means
> that your system is unable to perform as it should. If the real hardware
> CPU runs at let's say 3GHz, this is equivalent to saying that your virtual
> machine has a CPU running at 3000MHz/600 = 5MHz. You try to run a media
> relay that has to react in real time inside a virtual machine that behaves
> as if it has a 5MHz CPU!
>
> You may prefer to run things on virtual machines for reasons related to
> costs, but at the end of the day one thing is clear: a media relay requires
> a RTOS. Linux running on real hardware is not an RTOS, but if the machine
> doesn't run other things that can influence the resource allocation, it can
> approximate one pretty well. A virtual machine running 600 times slower
> than real hardware, with resources shared between multiple virtual
> machines, is as far removed from the idea of a RTOS as it can possibly be.
>
> > You are right about being virtual, but I'm sure the server is not
> overloaded because I have the same problem during the night, with almost no
> traffic. During the day, it MAY be overloaded but surely not during the
> night and this information never shows up on these relays.
> >
> > Is there any way to force it? Could you give some directions?
>
> Force what? As I said the traffic calculations are done periodically at an
> interval specified in the configuration, with the default being 15 seconds.
> You can disable them by setting the sampling interval to 0. The warning
> doesn't mean they are skipped, it only means the relay took too long to
> compute them and was unresponsive for other requests during that time.
>
> >
> > Thanks
> >
> >
> > On Tue, Mar 28, 2017 at 2:27 PM, Dan Pascu  wrote:
> >
> > 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 

Re: [OpenSIPS-Users] Mediaproxy speed calculations

2017-03-28 Thread Dan Pascu

On 28 Mar 2017, at 20:55, Daniel Zanutti wrote:

> Hi Dan
> 
> Thanks for answering.
> 
> The machine is not overloaded, actually i have the same problem with 10 calls 
> or 1000 calls.
> 
> Syslog:
> Mar 28 14:51:45 MP-104 media-relay[782]: warning: Aggregate speed calculation 
> time exceeded 10ms: 15214 us for 418 sessions
> 
> 
> TOP:
> load average: 0.56, 0.61, 0.63

You misunderstood me. I was not talking about your virtual machine, I was 
talking about the real hardware being overloaded, probably running too many 
virtual machines.

From inside the virtual machine you cannot assess how loaded the real hardware 
is. You can have 0% CPU load inside your virtual machine, that doesn't mean 
things are OK. The fact that inside your virtual machine an operation takes 600 
times longer than on 5 years old real hardware, means that your system is 
unable to perform as it should. If the real hardware CPU runs at let's say 
3GHz, this is equivalent to saying that your virtual machine has a CPU running 
at 3000MHz/600 = 5MHz. You try to run a media relay that has to react in real 
time inside a virtual machine that behaves as if it has a 5MHz CPU!

You may prefer to run things on virtual machines for reasons related to costs, 
but at the end of the day one thing is clear: a media relay requires a RTOS. 
Linux running on real hardware is not an RTOS, but if the machine doesn't run 
other things that can influence the resource allocation, it can approximate one 
pretty well. A virtual machine running 600 times slower than real hardware, 
with resources shared between multiple virtual machines, is as far removed from 
the idea of a RTOS as it can possibly be.

> You are right about being virtual, but I'm sure the server is not overloaded 
> because I have the same problem during the night, with almost no traffic. 
> During the day, it MAY be overloaded but surely not during the night and this 
> information never shows up on these relays.
> 
> Is there any way to force it? Could you give some directions?

Force what? As I said the traffic calculations are done periodically at an 
interval specified in the configuration, with the default being 15 seconds. You 
can disable them by setting the sampling interval to 0. The warning doesn't 
mean they are skipped, it only means the relay took too long to compute them 
and was unresponsive for other requests during that time.

> 
> Thanks
> 
> 
> On Tue, Mar 28, 2017 at 2:27 PM, Dan Pascu  wrote:
> 
> 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.
> 
> --
> Dan
> 
> 
> 
> 
> 
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
> 
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users


--
Dan





___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Mediaproxy speed calculations

2017-03-28 Thread Daniel Zanutti
Hi Dan

Thanks for answering.

The machine is not overloaded, actually i have the same problem with 10
calls or 1000 calls. I can confirm there is a lot of traffic on it, for
instance:

1 1.1.1.1 2.6.1 108h09'30" 6.71Mbps 413 audio 413 Active
2 2.2.2.2 2.6.5 95h50'12" 0bps 435 audio 435 Active
3 3.3.3.3 2.6.5 95h50'16" 0bps 382 audio 382 Active
4 4.4.4.4 2.6.5 108h08'38" 7.29Mbps 402 audio 402 Active
5 5.5.5.5 2.6.5 107h59'38" 6.41Mbps 375 audio 375 Active
(fake IPs)

IPTRAF:
eth0  304104304104 00  20903.40 kbits/sec


Syslog:
Mar 28 14:51:45 MP-104 media-relay[782]: warning: Aggregate speed
calculation time exceeded 10ms: 15214 us for 418 sessions


TOP:
load average: 0.56, 0.61, 0.63


Kernel:
Linux MP-104 3.16.0-4-amd64 #1 SMP Debian 3.16.39-1+deb8u2 (2017-03-07)
x86_64 GNU/Linux


You are right about being virtual, but I'm sure the server is not
overloaded because I have the same problem during the night, with almost no
traffic. During the day, it MAY be overloaded but surely not during the
night and this information never shows up on these relays.

Is there any way to force it? Could you give some directions?

Thanks


On Tue, Mar 28, 2017 at 2:27 PM, Dan Pascu  wrote:

>
> 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.
>
> --
> Dan
>
>
>
>
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Mediaproxy speed calculations

2017-03-28 Thread Dan Pascu

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.

--
Dan





___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Mediaproxy speed calculations

2017-03-24 Thread Daniel Zanutti
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?

Thanks
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users