Closed danillouz closed 4 years ago
AWS outputs the transcoding time in the console.
Run | Time |
---|---|
1 | 6,185 sec |
2 | 6,211 sec |
3 | 6,877 sec |
Used the CloudWatch logs to extract the Lambda execution time, while using different Lambda memory configurations:
Run | Duration | Billed duration |
---|---|---|
1 | 38,333 ms | 38,400 ms |
2 | 38,019 ms | 38,100 ms |
3 | 37,102 ms | 37,100 ms |
Run | Duration | Billed duration |
---|---|---|
1 | 20,530 ms | 20,600 ms |
2 | 19,113 ms | 19,200 ms |
3 | 18,992 ms | 19,000 ms |
Run | Duration | Billed duration |
---|---|---|
1 | 10,017 ms | 10,100 ms |
2 | 9,351 ms | 9,400 ms |
3 | 9,312 ms | 9,400 ms |
Run | Duration | Billed duration |
---|---|---|
1 | 4,912 ms | 5,000 ms |
2 | 4,763 ms | 4,800 ms |
3 | 4,611 ms | 4,700 ms |
Run | Duration | Billed duration |
---|---|---|
1 | 2,890 ms | 2,900 ms |
2 | 2,705 ms | 2,800 ms |
3 | 2,679 ms | 2,700 ms |
Run | Duration | Billed duration |
---|---|---|
1 | 2,828 ms | 2,900 ms |
2 | 2,485 ms | 2,500 ms |
3 | 2,608 ms | 2,700 ms |
These are not very extensive benchmarks, but IMHO good enough to see the trend where transcoding audio becomes twice as fast, while doubling Lambda memory, up to 2 GB.
This means the best memory setting for the FFmpeg Lambda is 2048 MB.
In terms of costs, AWS Elastic Transcoder is quite expensive (compared to Lambda).
For EU Ireland, we pay $0,00522
per minute of transcoded audio.
Where we get 20 minutes for free every month in the free tier.
Note that the AWS Elastic Transcoder pipeline and S3 buckets have to be in the same region to avoid data transfer costs.
To transcode 100 000
audio files of 3
minutes each, takes:
100 000
* 6.4
sec avg transcoding time = 640 000
sec = 10666,666666667
min transcoding time
$0,00 522
* 10666,666666667
= $55,68
For Lambda, the cost depends on the memory setting and execution duration (GB/s).
For EU Ireland 1 GB/sec costs $0,000 00 1667
.
Note that since the S3 buckets and Lambdas run in the same region, we avoid (S3) data transfer costs.
To transcode 100 000 audio files of 3 minutes each we pay:
100 000
* 3
sec runtime = 300 000
sec execution duration300 000
sec = 600 000
GB/secWithout free tier we pay: 600 000
GB/sec $0,000 00 1667
GB/sec = $1,0002
(holy sht!)
(With free tier we pay: 600 000
- 400 000
GB/sec * $0,000 00 1667
GB/sec = $0,3334
)
😅💰💪
I used a 3 minute audio recording (WebM) of 1.1MB to trigger some transcoding jobs.