Re: [rtcweb] Audio transcoding: CPU costs

Harald Alvestrand <harald@alvestrand.no> Fri, 15 March 2013 17:37 UTC

Return-Path: <harald@alvestrand.no>
X-Original-To: rtcweb@ietfa.amsl.com
Delivered-To: rtcweb@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 03E4821F8952 for <rtcweb@ietfa.amsl.com>; Fri, 15 Mar 2013 10:37:06 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -110.599
X-Spam-Level:
X-Spam-Status: No, score=-110.599 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, RCVD_IN_DNSWL_HI=-8, USER_IN_WHITELIST=-100]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 3eywAdWyijef for <rtcweb@ietfa.amsl.com>; Fri, 15 Mar 2013 10:37:05 -0700 (PDT)
Received: from eikenes.alvestrand.no (eikenes.alvestrand.no [158.38.152.233]) by ietfa.amsl.com (Postfix) with ESMTP id E252921F8976 for <rtcweb@ietf.org>; Fri, 15 Mar 2013 10:36:57 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1]) by eikenes.alvestrand.no (Postfix) with ESMTP id D256639E23A; Fri, 15 Mar 2013 18:36:55 +0100 (CET)
X-Virus-Scanned: Debian amavisd-new at eikenes.alvestrand.no
Received: from eikenes.alvestrand.no ([127.0.0.1]) by localhost (eikenes.alvestrand.no [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id EuPnuMOGYwWS; Fri, 15 Mar 2013 18:36:55 +0100 (CET)
Received: from [IPv6:2001:470:de0a:27:dc4b:da73:da24:d309] (unknown [IPv6:2001:470:de0a:27:dc4b:da73:da24:d309]) by eikenes.alvestrand.no (Postfix) with ESMTPSA id D90CB39E03A; Fri, 15 Mar 2013 18:36:54 +0100 (CET)
Message-ID: <51435C36.4060102@alvestrand.no>
Date: Fri, 15 Mar 2013 18:36:54 +0100
From: Harald Alvestrand <harald@alvestrand.no>
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130221 Thunderbird/17.0.3
MIME-Version: 1.0
To: Roman Shpount <roman@telurix.com>
References: <5141133D.3040100@alvestrand.no> <CAD5OKxvqbWYCb8f8_M14yqhk-OYxtVmhp6xKmWuyiaNSaSLAmQ@mail.gmail.com>
In-Reply-To: <CAD5OKxvqbWYCb8f8_M14yqhk-OYxtVmhp6xKmWuyiaNSaSLAmQ@mail.gmail.com>
Content-Type: text/plain; charset="ISO-8859-1"; format="flowed"
Content-Transfer-Encoding: 7bit
Cc: "rtcweb@ietf.org" <rtcweb@ietf.org>
Subject: Re: [rtcweb] Audio transcoding: CPU costs
X-BeenThere: rtcweb@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Real-Time Communication in WEB-browsers working group list <rtcweb.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/rtcweb>, <mailto:rtcweb-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/rtcweb>
List-Post: <mailto:rtcweb@ietf.org>
List-Help: <mailto:rtcweb-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/rtcweb>, <mailto:rtcweb-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 15 Mar 2013 17:37:06 -0000

On 03/14/2013 06:03 AM, Roman Shpount wrote:
> Though I generally agree with results of your analysis (CPU cost per 
> minute of transcoding is small), i would like to point out a few 
> things regarding this analysis:
>
> 1. Based on the message you are quoting, current performance is 150 
> channels per core. It would require some non-trivial work to get it to 
> 500 channels.

That was 150 channels for one CPU of an old laptop. I don't know how 
many cores Amazon's servers have, but I picked the "CPU-heavy" variant 
for that reason.

> 2. Transcoding server would definitely need to purchase AMR/AMR-WB 
> licenses.
I'm glad you brought that up :-)
The nice thing about this way of doing it is that all the licensing cost 
falls on the users of that service, and no licensing costs are incurred 
by anyone who doesn't want to use this particular service - unlike 
solutions that are shippped by default to users whether they use it or not.


> 3. Transcoding would require jitter buffer and other code which would 
> not be needed for ICE/SRTP gateway

Yep. As I said, there are other things than cost to consider - I wanted 
to focus on this particular item in this thread.

> 4. Amazon AWS are not really usable for transcoding or any other 
> real-time specific operations. You end up with too much jitter when 
> processing media introduced by a virtualized instance.


>
> Based on my benchmarks and my napkin based estimate ($4000 per 
> server amortized over 3 years, $300 per server per month to host it, 
> 1000 channels of transcoding per server), the cost of one channel of 
> transcoding is about $0.4 per month vs about $0.02 per month for 
> ICE/SRTP only gateway (if transcoding is not needed, server can do 
> 20,000 channels).

Yep. I used their price as "this is a reasonable approximation for what 
it costs to operate a server at bulk rates". Your estimates seem to land 
in the same ballpark, so it wasn't entirely off into left field. 40 
cents per month is 0.00093 cents per minute (ignoring the need to have 
idle capacity).

> This does not take into account management and operation costs which 
> grow proportionally since you end up needing 20 times as much 
> hardware. It also does not include costs of software licenses. 
> Depending on how spiky your traffic is this can translate into 
> different price per minute, but based on our conference service we do 
> about 12,000 minutes per channel per month this translates into 0.003 
> cents per minute, which is not far from your estimate.

At least we've agreed that the cost of transcoding audio is not 
significant. Nice to agree on something!