Very High CPU Utilization (EC2 Instance - m.medium)

Hi,

I’m using an Amazon EC2 Wowza 3 instance (ver 3.1.2) (ami-b4f9bfe6). Without any stream (inbound/outbound), the CPU utilization is around 2-3%. But when I started to stream a live event using FFsplit (at 600 kbps bitrate), it shoots up to 70%, with only two (2) viewers. Then when I streamed another live event using RTMPWorld (@ 400 kbps bitrate), from 70% CPU utilization, it further shoots up to 95%, with a total of only three (3) viewers. I’m wondering why the server behaves like that?

According to Richard of Wowza Support, any pre-built AMI’s need not be tuned (based on the Performance Tuning guide provided by Wowza) since they are automatically tuned. So, where does the server’s problem possibly come from?

Also, is there a way for me to know if there were changes made on my server that deviate from the configuration of an automatically tuned server? A standard configuration file for a tuned pre-built AMI (ami-b4f9bfe6) would be a great help so I can have it compared to my server.

Thanks,

Roger

Hi,

What do you have configured on the server? are you doing any transcoding ? are you doing nDVR ? is there any custom code installed ?

Andrew.

And these:

https://www.wowza.com/docs/how-to-configure-a-live-stream-repeater

https://www.wowza.com/docs/how-to-get-dynamic-load-balancing-addon

Richard

Hi Andrew,

Yes, transcoding is enabled; nDVR is not. Only three (3) encodes are enabled at the transcoder/transrater.

Recording is also enabled and the contents are stored to S3 using file mover module.

I have also included a serverlistener at Server.xml but it appears that the problem doesn’t come from this as the problem appears only when I started streaming a live content.

Thanks,

Roger

Hi Jason and Andrew,

That’s right, I’m using the file mover provided by Wowza and got 2 channels doing 3 bitrates each.

So are you saying guys that my instance is not enough? What if I got 10 channels doing 3 bitrates each? Would the high CPU instance enough to support them?

Thank you so much.

Roger

Hi Jason,

I’m now planning to migrate to Amazon EC2 High-CPU Extra-Large Instance (c1.xlarge) so that it could support my two (2) channels with three (3) transcodes each. What if the number of channels has increased and my single c1.xlarge EC2 instance could no longer support these number of channels?

Let’s stick to your example above. You’ve said that I will be needing seven (7) c1.xlarge EC2 instances to support 30 channels, even 10 of which are pass-through, leaving 20 that will require transcodes. How should I configure all these seven (7) c1.xlarge EC2 instances to allow simultaneous ‘live’ applications? Or what is the best solution for this?

Thanks,

Roger

Hi Roger,

I’d just like to measure where the CPU usage should be. What EC2 instance are you running?

I take it you have 3 streams with 3 bitrates each?

And assume that’s each has 1 pass through + 2 transcodes making a total of 6 transcodes for the server.

The file mover module I assume is the Wowza provided one and not custom made?

https://www.wowza.com/docs/how-to-move-recordings-from-live-streams

I’d like to make sure we’re looking in the right place for this problem that’s all.

Jason

Hi

Without us testing every EC2 instance we won’t know how many transcodes they can all do.

Some have been documented here, (I guess smaller instances are not able to do any reliable transcoding due to the hardware).

https://www.wowza.com/docs/wowza-transcoder-performance-benchmark

At 30 channels even if 10 are pass-through you’re still asking for 20 transcodes which is far more than any EC2 instance can handle.

According to the benchmark only Server2 can handle this kind of usage but if that goes down then you loose them all.

In the benchmark link i gave you Server4 can handle 3 transcodes. (you would need 7 of these for 20 transcodes)

The others which are hosted by yourself or a 3rd party are much more capable but the choice is yours.

Server4

EC2 Instance: High-CPU Extra Large Instance - c1.xlarge

Memory: 7 GB

20 EC2 Compute Units: 8 virtual cores with 2.5 EC2 Compute Units each

Java: Java 7 64-bit

OS: Amazon Linux

EC2 AMI: c1.xlarge

GPU/Acceleration: None

Jason

Hi

Have you taken a look at a 3rd party who will do this for you as a package?

I think that it would probably be cheaper and if they manage the server too that’s less for yourself.

If you did go for the EC2 instances you would create a live application on each server called for example “SportsChannel” (or something similar to the stream).

The client links on your website would point to each server.

From here the client will choose a bitrate from the passthrough or transcoded streams.

On each server you will need to have a .smil file if you require dynamic switching for the various bitrates.

You may find the following guides useful:

Live streaming,

https://www.wowza.com/docs/how-to-set-up-live-streaming-using-an-rtmp-based-encoder

Transcoder,

https://www.wowza.com/docs/how-to-set-up-and-run-wowza-transcoder-for-live-streaming

Jason

Hi,

I dont know why I didnt see it before, but a medium instance wont cut it for transcoding, and you suggest you have 2 channels doing 3 bitrates each. You will need a high CPU instance from EC2 to get close to enough CPU.

Andrew.