Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
57_.NET___Lambda_のパフォーマンスを最適化する方法.pdf
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
iwasa
July 14, 2023
2.8k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
57_.NET___Lambda_のパフォーマンスを最適化する方法.pdf
iwasa
July 14, 2023
More Decks by iwasa
See All by iwasa
AI-DLC の紹介
tak1wa
0
480
医療情報システムの安全管理に関するガイドライン第7.0版の変更点を確認してみた
tak1wa
0
420
OWASP Juice Shop に AWS Security Agent で ペネトレーションテストを実施した結果
tak1wa
0
490
最近の医療 x AWS
tak1wa
0
620
3大クラウドから学ぶクラウド上でのランサムウェア対策
tak1wa
0
1.1k
Lambdaの様々な新機能とユースケース
tak1wa
0
500
AWS最新機能を駆使したマルチテナントSaaSアーキテクチャーを考えてみる
tak1wa
0
1.2k
Tsumiki を使って仕様駆動開発をやってみよう
tak1wa
0
1.1k
社内開発で Amazon Q Developer を使っていたが Kiro に乗り換えた話
tak1wa
0
1.8k
Featured
See All Featured
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
380
How STYLIGHT went responsive
nonsquared
100
6.3k
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
330
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
74
42k
Embracing the Ebb and Flow
colly
88
5.2k
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1.3k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
10k
Making Projects Easy
brettharned
120
6.7k
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
980
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
6
1.2k
A designer walks into a library…
pauljervisheath
211
25k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
56
3.5k
Transcript
.NET + Lambda のパフォーマンスを最適 化する方法 2023/7/13 AWS事業本部 岩浅貴大
自己紹介 岩浅 貴大(いわさ) クラスメソッド株式会社 AWS事業本部 コンサルティング部 ソリューションアーキテクト
アジェンダ 1. Lambda と .NET 2. パフォーマンス向上のアプローチ a. .NET バージョンアップ
b. Native AOT c. Lambda のアーキテクチャ 3. パフォーマンス比較 4. まとめ
前置き 【DevelopersIO 2022】.NETアプリケーションのAWS移行 https://youtu.be/Lbax8pgFoEc
Lambda と .NET
AWS Lambda の概要 サーバーレスコンピューティングサービス ❖ イベント駆動型 ❖ サーバーのプロビジョニングや管理が不要 ❖ 実行した時間に応じた従量課金
.NET の概要 マイクロソフトによって開発 ❖ .NET Framework と .NET Core ❖
C#, Visual Basic, F# https://learn.microsoft.com/ja-jp/dotnet/architecture/microservices/net-core-net-framework-containers/net-container-os-targets より
AWS Lambda での .NET サポート • マネージドランタイムで LTS の .NET
6 • カスタムランタイムで STS の .NET 7 https://aws-labs.net/netonaws.html https://aws.amazon.com/developer/language/net/
パフォーマンス向上のアプローチ
.NET バージョンアップ • バージョンアップ ◦ 新機能 ◦ セキュリティ向上 ◦ パフォーマンス向上
Native AOT • Just-In-Time • Ahead-Of-Time ◦ ツールチェーンに組み込まれている
Lambda アーキテクチャ • X86_64 と ARM • .NET の ARM
パフォーマンス改善 https://aws.amazon.com/jp/blogs/news/aws-lambda-functions-powered-by-aws-graviton2-processor-run-your-functions-on-arm-and-get-up-to-34-better-price-performance/
パフォーマンス比較
パフォーマンス比較の前提条件 https://github.com/aws-samples/serverless-dotnet-demo
.NET バージョンごとの比較 コールドスタート ウォームスタート p50 p99 p50 p99 .NET Core
3.1 1004.80 1422.78 6.11 29.40 .NET 6 778.74 1470.50 6.41 31.33 .NET 7 1467.56 2423.83 7.16 45.13 .NET 8 (Preview) 1476.39 1878.51 6.01 28.94
.NET バージョンごとの比較 コールドスタート ウォームスタート p50 p99 p50 p99 .NET Core
3.1 1004.80 1422.78 6.11 29.40 .NET 6 778.74 1470.50 6.41 31.33 .NET 7 1467.56 2423.83 7.16 45.13 .NET 8 (Preview) 1476.39 1878.51 6.01 28.94
.NET バージョンごとの比較 コールドスタート ウォームスタート p50 p99 p50 p99 .NET Core
3.1 1004.80 1422.78 6.11 29.40 .NET 6 778.74 1470.50 6.41 31.33 .NET 7 1467.56 2423.83 7.16 45.13 .NET 8 (Preview) 1476.39 1878.51 6.01 28.94
.NET バージョンごとの比較 コールドスタート ウォームスタート p50 p99 p50 p99 .NET Core
3.1 1004.80 1422.78 6.11 29.40 .NET 6 778.74 1470.50 6.41 31.33 .NET 7 1467.56 2423.83 7.16 45.13 .NET 8 (Preview) 1476.39 1878.51 6.01 28.94
Native AOT の比較 コールドスタート ウォームスタート p50 p99 p50 p99 .NET
6 778.74 1470.50 6.41 31.33 .NET 7 1467.56 2423.83 7.16 45.13 .NET 7 + Native AOT 372.43 581.62 6.77 45.44 .NET 8 + Native AOT 361.79 515.88 6.01 26.31
Native AOT の比較 コールドスタート ウォームスタート p50 p99 p50 p99 .NET
6 778.74 1470.50 6.41 31.33 .NET 7 1467.56 2423.83 7.16 45.13 .NET 7 + Native AOT 372.43 581.62 6.77 45.44 .NET 8 + Native AOT 361.79 515.88 6.01 26.31
Native AOT の比較 コールドスタート ウォームスタート p50 p99 p50 p99 .NET
6 778.74 1470.50 6.41 31.33 .NET 7 1467.56 2423.83 7.16 45.13 .NET 7 + Native AOT 372.43 581.62 6.77 45.44 .NET 8 + Native AOT 361.79 515.88 6.01 26.31
Native AOT の比較 コールドスタート ウォームスタート p50 p99 p50 p99 .NET
6 778.74 1470.50 6.41 31.33 .NET 7 1467.56 2423.83 7.16 45.13 .NET 7 + Native AOT 372.43 581.62 6.77 45.44 .NET 8 + Native AOT 361.79 515.88 6.01 26.31
CPUアーキテクチャ別の比較 コールドスタート ウォームスタート p50 p99 p50 p99 .NET Core 3.1
- x86 1004.80 1422.78 6.11 29.40 .NET Core 3.1 - ARM 1122.70 1225.92 5.55 19.85 .NET 6 - x86 778.74 1470.50 6.41 31.33 .NET 6 - ARM 873.59 944.42 5.50 19.53
CPUアーキテクチャ別の比較 コールドスタート ウォームスタート p50 p99 p50 p99 .NET Core 3.1
- x86 1004.80 1422.78 6.11 29.40 .NET Core 3.1 - ARM 1122.70 1225.92 5.55 19.85 .NET 6 - x86 778.74 1470.50 6.41 31.33 .NET 6 - ARM 873.59 944.42 5.50 19.53
まとめ
まとめ 1. .NET バージョンは最新のマネージドランタイムを使う 2. Native AOT が使える場合はカスタムランタイムも良い 3. Native
AOT でコールドスタートの速度が改善される 4. ARM アーキテクチャのほうが速度が改善されるかは処理に依 るが、安定する傾向にありそう
None