EC2 上的 AWS C++ 代码 运行(云与传统计算)
AWS C++ code run on EC2 (cloud vs traditional computing)
虽然我在网上找不到答案,但我的问题很简单。
目前我使用 EC2 只是为了概念验证。我是 运行 C++ 中的冒泡排序算法,具有可变整数数组大小,并计算程序在 EC2 和我的计算机上完成排序所需的时间。
我知道 C++ 不是在云上使用的默认语言,所以就像在 https://forums.aws.amazon.com/thread.jspa?threadID=128209 上一样,我只是通过 ssh 连接并将需要的包安装到 运行 我的 C++ 程序中。
然而,相对于传统计算的预期收益不如 Python 例如...任何人都知道是否有改善这些收益的方法?所有时间信息信息如下。
Execution times
提前致谢
Considerations for Amazon EC2 performance evaluation
Amazon EC2 provides you with a large number of options across ten different instance types, each with one or more size options, organized into six distinct instance families optimized for different types of applications. We recommend that you assess the requirements of your applications and select the appropriate instance family as a starting point for application performance testing. You should start evaluating the performance of your applications by (a) identifying how your application needs compare to different instance families (e.g. is the application compute-bound, memory-bound, etc.?), and (b) sizing your workload to identify the appropriate instance size. There is no substitute for measuring the performance of your full application since application performance can be impacted by the underlying infrastructure or by software and architectural limitations. We recommend application-level testing, including the use of application profiling and load testing tools and services.
这里有 7 种不同的方法来更改您的 EC2 实例以获得性能(来自上面的 link):
通用 EC2 实例:
T2 前缀实例具有突发性能,M4 和 M3 前缀在 compute/memory/network 之间取得平衡。
经过计算优化的 EC2 实例:
具有更高性能处理器的实例。带有前缀 C4 和 C3 的实例名称。
内存优化的 EC2 实例:
针对内存应用程序优化的实例。带有 X1、R4 和 R3 前缀的实例名称。
具有加速计算的 EC2 实例:
针对 GPU 处理(P2 名称前缀)、图形处理(G2 名称前缀)现场可编程门阵列(F2 名称前缀)优化的实例
具有存储优化的 EC2 实例:
高存储实例(I3 前缀)和密集存储(D2 前缀)
具有专用韧性的 EC2 实例:
租赁选项确定您的 EC2 实例是否与其他 AWS 客户在云中的共享硬件上。共享租赁是所有 EC2 实例的默认设置。另一个选项是专用实例和专用主机。以更高的价格,您可以支付亚马逊在单租户硬件上托管您的 EC2 实例。
加载不同的 AMI/Compiler 组合:
有多种操作系统可供选择(Windows、Unix、Linux 等)。您也可以选择不同的 C++ compilers with many optimizations to choose.
这 7 个可以相互结合,以获得最大的改进。这个website can better help you determine cost vs EC2 feature to AWS region.
祝你好运,随时 post 你发现的结果。谢谢!
虽然我在网上找不到答案,但我的问题很简单。
目前我使用 EC2 只是为了概念验证。我是 运行 C++ 中的冒泡排序算法,具有可变整数数组大小,并计算程序在 EC2 和我的计算机上完成排序所需的时间。
我知道 C++ 不是在云上使用的默认语言,所以就像在 https://forums.aws.amazon.com/thread.jspa?threadID=128209 上一样,我只是通过 ssh 连接并将需要的包安装到 运行 我的 C++ 程序中。
然而,相对于传统计算的预期收益不如 Python 例如...任何人都知道是否有改善这些收益的方法?所有时间信息信息如下。
Execution times
提前致谢
Considerations for Amazon EC2 performance evaluation
Amazon EC2 provides you with a large number of options across ten different instance types, each with one or more size options, organized into six distinct instance families optimized for different types of applications. We recommend that you assess the requirements of your applications and select the appropriate instance family as a starting point for application performance testing. You should start evaluating the performance of your applications by (a) identifying how your application needs compare to different instance families (e.g. is the application compute-bound, memory-bound, etc.?), and (b) sizing your workload to identify the appropriate instance size. There is no substitute for measuring the performance of your full application since application performance can be impacted by the underlying infrastructure or by software and architectural limitations. We recommend application-level testing, including the use of application profiling and load testing tools and services.
这里有 7 种不同的方法来更改您的 EC2 实例以获得性能(来自上面的 link):
通用 EC2 实例:
T2 前缀实例具有突发性能,M4 和 M3 前缀在 compute/memory/network 之间取得平衡。
经过计算优化的 EC2 实例:
具有更高性能处理器的实例。带有前缀 C4 和 C3 的实例名称。
内存优化的 EC2 实例:
针对内存应用程序优化的实例。带有 X1、R4 和 R3 前缀的实例名称。
具有加速计算的 EC2 实例:
针对 GPU 处理(P2 名称前缀)、图形处理(G2 名称前缀)现场可编程门阵列(F2 名称前缀)优化的实例
具有存储优化的 EC2 实例:
高存储实例(I3 前缀)和密集存储(D2 前缀)
具有专用韧性的 EC2 实例:
租赁选项确定您的 EC2 实例是否与其他 AWS 客户在云中的共享硬件上。共享租赁是所有 EC2 实例的默认设置。另一个选项是专用实例和专用主机。以更高的价格,您可以支付亚马逊在单租户硬件上托管您的 EC2 实例。
加载不同的 AMI/Compiler 组合:
有多种操作系统可供选择(Windows、Unix、Linux 等)。您也可以选择不同的 C++ compilers with many optimizations to choose.
这 7 个可以相互结合,以获得最大的改进。这个website can better help you determine cost vs EC2 feature to AWS region.
祝你好运,随时 post 你发现的结果。谢谢!