from __future__ import print_function import json import os import subprocess import commands print('Loading function') def lambda_handler(event, context): os.system("dd if=/dev/zero bs=1M count=1024 | md5sum") return 'Hello from Lambda'
Here is outcome of the test with 128MB function:
01:54:46 Loading function 01:54:46 START RequestId: 2b966183-a4b9-11e7-b7d0-49f3d131a6ae Version: $LATEST 01:55:25 1024+0 records in 01:55:25 1024+0 records out 01:55:25 cd573cfaace07e7949bc0c46028904ff - 01:55:25 1073741824 bytes (1.1 GB) copied, 38.9593 s, 27.6 MB/s 01:55:25 END RequestId: 2b966183-a4b9-11e7-b7d0-49f3d131a6ae 01:55:25 REPORT RequestId: 2b966183-a4b9-11e7-b7d0-49f3d131a6ae Duration: 38993.44 ms Billed Duration: 39000 ms Memory Size: 128 MB Max Memory Used: 21 MB
Performance is clearly very poor with small sized memory functions. Just as comparison here is output from my c4.large EC2 instance
12:26:12|ec2-user@ip-1.2.3.4:[tmp]> dd if=/dev/zero bs=1M count=1024 | md5sum 1024+0 records in 1024+0 records out 1073741824 bytes (1.1 GB) copied, 2.14463 s, 501 MB/s cd573cfaace07e7949bc0c46028904ff - 12:26:12|ec2-user@ip-1.2.3.4:[tmp]>
No comments:
Post a Comment