Re: [rtcweb] Audio transcoding: CPU costs

Roman Shpount <> Thu, 14 March 2013 05:03 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 0244921F8D19 for <>; Wed, 13 Mar 2013 22:03:24 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -1.769
X-Spam-Status: No, score=-1.769 tagged_above=-999 required=5 tests=[AWL=0.208, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, NO_RELAYS=-0.001]
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id oKszQzzCCm+Z for <>; Wed, 13 Mar 2013 22:03:23 -0700 (PDT)
Received: from ( [IPv6:2a00:1450:400c:c00::229]) by (Postfix) with ESMTP id 3A34821F8D22 for <>; Wed, 13 Mar 2013 22:03:22 -0700 (PDT)
Received: by with SMTP id ds1so1323042wgb.2 for <>; Wed, 13 Mar 2013 22:03:21 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20120113; h=x-received:mime-version:x-received:in-reply-to:references:date :message-id:subject:from:to:cc:content-type:x-gm-message-state; bh=kj7z7QOrasILLUcOPfBl8AQ4sBx1bIIxBkIEanPKe6s=; b=Tw9U8C9ihD8vuy8TLaOuBvOmT/BTrL8+etd3WXisdcHdCiYDlcWm02gAQvm1VzeRAd Hvf0EXIhE1OENaN0ZUJDvq7yJirr+xkCJ5ANiG4MgX53U/a1/OUNnuSI0arUXju5xd+h aam37yW1OjZF0JgUSJvkrXh/crafz5uA8ZDVgqqwPrzW29zl3qfYzxCYiR4+lEeLaUj8 oFsvac7dAyb/h+WDyl/Y1niP+EYNFR8gAV+c1RC+RS/ZOMXWrQ0IxEvLWxbdAwV10OHJ b01KXI7mZKDNhlFnO+xCjzlwFu9jP/CZoAWxt6b6BMb1hUVmwnwiAFdQmsSzcFVYB4+m 0mng==
X-Received: by with SMTP id lg6mr1387918wjb.22.1363237401376; Wed, 13 Mar 2013 22:03:21 -0700 (PDT)
Received: from ([2a00:1450:400c:c05::230]) by with ESMTPS id ek4sm6644945wib.11.2013. (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 13 Mar 2013 22:03:20 -0700 (PDT)
Received: by with SMTP id hm14so3394235wib.3 for <>; Wed, 13 Mar 2013 22:03:19 -0700 (PDT)
MIME-Version: 1.0
X-Received: by with SMTP id ck1mr1274255wjb.54.1363237399333; Wed, 13 Mar 2013 22:03:19 -0700 (PDT)
Received: by with HTTP; Wed, 13 Mar 2013 22:03:19 -0700 (PDT)
In-Reply-To: <>
References: <>
Date: Thu, 14 Mar 2013 01:03:19 -0400
Message-ID: <>
From: Roman Shpount <>
To: Harald Alvestrand <>
Content-Type: multipart/alternative; boundary="047d7bd91f10ee95ac04d7db70e5"
X-Gm-Message-State: ALoCoQlZMY1RWmMXHHHFR5RzrO+CZwBDpEB6e0QSRsKKMRvGyzIQjlKFR/TD3pPVT8KgeAx6zsyb
Cc: "" <>
Subject: Re: [rtcweb] Audio transcoding: CPU costs
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Real-Time Communication in WEB-browsers working group list <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Thu, 14 Mar 2013 05:03:24 -0000

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
2. Transcoding server would definitely need to purchase AMR/AMR-WB licenses.
3. Transcoding would require jitter buffer and other code which would not
be needed for ICE/SRTP gateway
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). 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

Roman Shpount

On Wed, Mar 13, 2013 at 8:01 PM, Harald Alvestrand <>wrote:

>  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.
> - 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
> (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.
> _______________________________________________
> rtcweb mailing list