[rtcweb] Audio transcoding: CPU costs

Harald Alvestrand <harald@alvestrand.no> Thu, 14 March 2013 00:01 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 B7EF711E80E0 for <rtcweb@ietfa.amsl.com>; Wed, 13 Mar 2013 17:01:06 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -110.637
X-Spam-Level:
X-Spam-Status: No, score=-110.637 tagged_above=-999 required=5 tests=[AWL=-0.039, BAYES_00=-2.599, HTML_MESSAGE=0.001, 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 A9OqfW2L--YV for <rtcweb@ietfa.amsl.com>; Wed, 13 Mar 2013 17:01:06 -0700 (PDT)
Received: from eikenes.alvestrand.no (eikenes.alvestrand.no [158.38.152.233]) by ietfa.amsl.com (Postfix) with ESMTP id 1F1DE11E80D3 for <rtcweb@ietf.org>; Wed, 13 Mar 2013 17:01:06 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1]) by eikenes.alvestrand.no (Postfix) with ESMTP id 39B3839E1EE for <rtcweb@ietf.org>; Thu, 14 Mar 2013 01:01:05 +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 wye4RUYdBZUw for <rtcweb@ietf.org>; Thu, 14 Mar 2013 01:01:04 +0100 (CET)
Received: from [IPv6:2001:df8:0:16:dc4b:da73:da24:d309] (unknown [IPv6:2001:df8:0:16:dc4b:da73:da24:d309]) by eikenes.alvestrand.no (Postfix) with ESMTPSA id BA32A39E0C8 for <rtcweb@ietf.org>; Thu, 14 Mar 2013 01:01:03 +0100 (CET)
Message-ID: <5141133D.3040100@alvestrand.no>
Date: Thu, 14 Mar 2013 01:01:01 +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: "rtcweb@ietf.org" <rtcweb@ietf.org>
Content-Type: multipart/alternative; boundary="------------070406070008050004090204"
Subject: [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: Thu, 14 Mar 2013 00:01:06 -0000

To return to the question of "cost of transcoding":

- AMR is less complex to en/decode than OPUS. So the dominant cost of 
transcoding between OPUS and AMR is the OPUS operation.
- http://www.ietf.org/mail-archive/web/rtcweb/current/msg05236.html 
estimates that OPUS en/decode can be done at ~1000 channels per CPU.
- One machine for one minute on Amazon AWS costs 0.24 cents for a 
medium-sized "high-CPU instance" according to 
http://aws.amazon.com/ec2/pricing/ (0.145 dollars per hour).
- Accordingly, transcoding, if done on fully loaded Amazon AWS 
instances, adds ~0.00024 cents per minute to the cost of a call.

There are other ways to provide such a service. It seems unlikely to 
increase the CPU cost of the call by more than a factor of 100, so we're 
still below 0.024 cents per hour.

I know there are other arguments for avoiding transcoding. But calling 
the CPU cost "negligible" seems appropriate in a world where mobile 
non-"all you can eat" plans still sell for tens of cents per minute.