Re: [rtcweb] Audio transcoding: CPU costs

Roman Shpount <roman@telurix.com> Thu, 14 March 2013 05:03 UTC

Return-Path: <roman@telurix.com>
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 0244921F8D19 for <rtcweb@ietfa.amsl.com>; Wed, 13 Mar 2013 22:03:24 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.769
X-Spam-Level:
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 mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id oKszQzzCCm+Z for <rtcweb@ietfa.amsl.com>; Wed, 13 Mar 2013 22:03:23 -0700 (PDT)
Received: from mail-wg0-x229.google.com (mail-wg0-x229.google.com [IPv6:2a00:1450:400c:c00::229]) by ietfa.amsl.com (Postfix) with ESMTP id 3A34821F8D22 for <rtcweb@ietf.org>; Wed, 13 Mar 2013 22:03:22 -0700 (PDT)
Received: by mail-wg0-f41.google.com with SMTP id ds1so1323042wgb.2 for <rtcweb@ietf.org>; Wed, 13 Mar 2013 22:03:21 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; 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 10.194.121.6 with SMTP id lg6mr1387918wjb.22.1363237401376; Wed, 13 Mar 2013 22:03:21 -0700 (PDT)
Received: from mail-wi0-x230.google.com ([2a00:1450:400c:c05::230]) by mx.google.com with ESMTPS id ek4sm6644945wib.11.2013.03.13.22.03.19 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 13 Mar 2013 22:03:20 -0700 (PDT)
Received: by mail-wi0-f176.google.com with SMTP id hm14so3394235wib.3 for <rtcweb@ietf.org>; Wed, 13 Mar 2013 22:03:19 -0700 (PDT)
MIME-Version: 1.0
X-Received: by 10.194.92.65 with SMTP id ck1mr1274255wjb.54.1363237399333; Wed, 13 Mar 2013 22:03:19 -0700 (PDT)
Received: by 10.217.107.135 with HTTP; Wed, 13 Mar 2013 22:03:19 -0700 (PDT)
In-Reply-To: <5141133D.3040100@alvestrand.no>
References: <5141133D.3040100@alvestrand.no>
Date: Thu, 14 Mar 2013 01:03:19 -0400
Message-ID: <CAD5OKxvqbWYCb8f8_M14yqhk-OYxtVmhp6xKmWuyiaNSaSLAmQ@mail.gmail.com>
From: Roman Shpount <roman@telurix.com>
To: Harald Alvestrand <harald@alvestrand.no>
Content-Type: multipart/alternative; boundary="047d7bd91f10ee95ac04d7db70e5"
X-Gm-Message-State: ALoCoQlZMY1RWmMXHHHFR5RzrO+CZwBDpEB6e0QSRsKKMRvGyzIQjlKFR/TD3pPVT8KgeAx6zsyb
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: 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
channels.
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
estimate.

Regards,
_____________
Roman Shpount


On Wed, Mar 13, 2013 at 8:01 PM, Harald Alvestrand <harald@alvestrand.no>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.
> - http://www.ietf.org/mail-archive/web/rtcweb/current/msg05236.htmlestimates 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.
>
>
> _______________________________________________
> rtcweb mailing list
> rtcweb@ietf.org
> https://www.ietf.org/mailman/listinfo/rtcweb
>
>