Windows Azure Storage
Client 2.1
kyrt Takekazu Omi
takekazu.omi@kyrt.in
@takekazuomi
2013/9/5 R.2
http://www.slideshare.net/takekazuomi/20130907-jazug-scl21whatsnew
BUILD 2013 3-541
Windows Azure Storage: What’s Coming, Best Practices, and Internals
• 劇的なパフォーマンスの向
上!
2013/8/29 kyrt @takekazuomi 2
Windows Azure Storage 2.1 Released
• nuget 9/4
• Windows Azure Storage 2.1.0.0
• http://www.nuget.org/packages/WindowsAzure.Storage/
• azure storage tream blob (さっき)
• Announcing Storage Client Library 2.1 RTM & CTP for Windows Phone
• http://blogs.msdn.com/b/windowsazurestorage/archive/2013/09/07/annou
ncing-storage-client-library-2-1-rtm.aspx
• github (・・・)
• https://github.com/WindowsAzure/azure-sdk-for-net
2013/8/29 kyrt @takekazuomi 3
2.1 .NET Library : Performance Improvements
2013/8/29 kyrt @takekazuomi 4
1. Buffer Pooling
2. Multi-Buffer Memory Stream
長さが分からないデータのバッファリングでの一貫したパフォーマンスを実装
3. .NET MD5 (native 実装に比べて~20% 程度の高速化)
http://msdn.microsoft.com/en-us/library/windows/desktop/aa379947(v=vs.85).aspx
• nugetで配布中
http://www.nuget.org/packages/WindowsAzure.Storage/
https://github.com/WindowsAzure/azure-sdk-for-net/tree/dev
Buffer Pooling
• Buffer Poolingは、確保済みbufferを複数のオペレー
ションで再利用するため、高いスケールを要求され
るアプリケーションでは効果がある
• 特に、.NETのようなmanaged environment ではオブ
ジェクトの確保と解放後のGCのかかるCPUコストを
劇的に削減できる
• 2.1では、IBufferManager 経由でPoolからBufferを取
得する仕組みを組み込んだ
• CloudTableClient.BufferManager に設定したものが
使われる(BlobとQueueも)
public interface IBufferManager
{
// poolにバッファーを返す
void ReturnBuffer(byte[] buffer);
// poolからバッファを取得
byte[] TakeBuffer(int bufferSize);
// デフォルトのバッファーサイズを取得
int GetDefaultBufferSize();
}
2013/8/29 kyrt @takekazuomi 5
CloudTableClient and BufferPool
2013/8/29 kyrt @takekazuomi 6
Buffer Pool
buffer
buffer
buffer
buffer
aCloudTableClient
TakeBufferReturnBuffer
Buffer Pool
buffer
buffer
buffer
buffer
aCloudTableClient
TakeBufferReturnBuffer
Multi-Buffer Memory Stream
2013/8/29 kyrt @takekazuomi 7
MultiBufferMemoryStream : Stream
buffer buffer buffer buffer
Buffer Pool
buffer
buffer
buffer
buffer
aCloudTableClient
TakeBuffer
ReturnBuffer
buffer
2013/8/29 kyrt @takekazuomi 8
IBufferManagerの実装が無い
どうやら
• IBufferManager は、 System.ServiceModel.dllのBufferManager の
パターンに従っているので、 desktop clientsはframeworkで用意され
た既存の実装を容易に利用することができます
• http://blogs.msdn.com/b/windowsazurestorage/archive/2013/07/12/introdu
cing-storage-client-library-2-1-rc-for-net-and-windows-phone-8.aspx
インターフェイスだけ合わせれば行けそう
2013/8/29 kyrt @takekazuomi 9
MyBufferManager
• System.ServiceModel.dllの
BufferManager に丸投げ
• IBufferManagerのInterfaceに
合わせただけ
• 微妙なのは、
GetDefaultBufferSize()
maxBufferSize が、
DefaultBufferSize ?
• 現行コードをCheck
• https://github.com/WindowsAz
ure/azure-sdk-for-
net/blob/dev/microsoft-azure-
api/Services/Storage/Lib/Com
mon/Core/MultiBufferMemory
Stream.cs#L89
class MyBufferManager:IBufferManager
{
private readonly BufferManager _buferManager = null;
private readonly int _maxBufferSize;
public MyBufferManager(long maxBufferPoolSize, int maxBufferSize) {
_maxBufferSize = maxBufferSize;
_buferManager = BufferManager.CreateBufferManager(maxBufferPoolSize, maxBufferSize);
}
public void ReturnBuffer(byte[] buffer) {
_buferManager.ReturnBuffer(buffer);
}
public byte[] TakeBuffer(int bufferSize) {
return _buferManager.TakeBuffer(bufferSize);
}
public int GetDefaultBufferSize() {
return _maxBufferSize;
}
}
2013/8/29 kyrt @takekazuomi 10
2013/8/29 kyrt @takekazuomi 11
終

More Related Content

PDF
kubernetes on Azure 最新情報
PDF
JAZ一周年総会 Windows Azure 直近の更新
PPTX
Virtual Kubelet and Virtual Node
PDF
Introduction of Azure Docker Integration
PPTX
AKS (k8s) Hands on Lab Contents
PDF
俺的 Ignite 2021 Fall Update まとめ
PPTX
深層学習 環境構築 Azure
PDF
今後のContainerの行く末の感じたこと、思ったこと 〜JKD参加報告〜
kubernetes on Azure 最新情報
JAZ一周年総会 Windows Azure 直近の更新
Virtual Kubelet and Virtual Node
Introduction of Azure Docker Integration
AKS (k8s) Hands on Lab Contents
俺的 Ignite 2021 Fall Update まとめ
深層学習 環境構築 Azure
今後のContainerの行く末の感じたこと、思ったこと 〜JKD参加報告〜

What's hot (20)

PDF
最近のJuju/MAASについて 〜 15分版 - OpenStack最新情報セミナー 2017年11月
PDF
最速・最短・最簡単でKubernetesを始めるハウツー with k0s
PDF
2021/6/29 Azure Hybrid and Multicloud Digital Event の内容を日本語でお届け!
PDF
窓の中の箱の世界
PDF
Start SQL Server with Docker
PPTX
Client Side Balzorでツールを作ってみた
PDF
Terraforming Windows Virtual Desktop Infrastructure on Azure
PPTX
Java on Azure with Docker container
PPTX
20160217 hbstudy73 linux on Azure
PPTX
How to face the Kubernetes ?
PDF
JAWS-UG静岡-201504-public
PDF
vmware-meetup7
PPTX
Azure DevOpsで技術同人誌作成
PDF
Build Windows ラップアップ
PDF
H26第1回 沖縄オープンラボラトリ・ハンズオンセミナー:ボリューム操作編
PDF
OSC 2012 Fukuoka
PDF
Windows コンテナを AKS に追加する
PDF
もっとも簡単なKubernetes構築 on Raspberry pi (July tech festa winter 2021)
PDF
Oss on Azure, Websites, WordPress
PDF
20130222 osc tokyo
最近のJuju/MAASについて 〜 15分版 - OpenStack最新情報セミナー 2017年11月
最速・最短・最簡単でKubernetesを始めるハウツー with k0s
2021/6/29 Azure Hybrid and Multicloud Digital Event の内容を日本語でお届け!
窓の中の箱の世界
Start SQL Server with Docker
Client Side Balzorでツールを作ってみた
Terraforming Windows Virtual Desktop Infrastructure on Azure
Java on Azure with Docker container
20160217 hbstudy73 linux on Azure
How to face the Kubernetes ?
JAWS-UG静岡-201504-public
vmware-meetup7
Azure DevOpsで技術同人誌作成
Build Windows ラップアップ
H26第1回 沖縄オープンラボラトリ・ハンズオンセミナー:ボリューム操作編
OSC 2012 Fukuoka
Windows コンテナを AKS に追加する
もっとも簡単なKubernetes構築 on Raspberry pi (July tech festa winter 2021)
Oss on Azure, Websites, WordPress
20130222 osc tokyo
Ad

Similar to Windows Azure Storage Client 2.1 のBuffer Pooling (20)

PPTX
Introduction to windows azure storage
PDF
Microsoft Azure Storage 概要
PPTX
Windows Azure Storage:Best Practices and Internals
PDF
Windows Azure Programming
PPTX
最新!Windows Azure Platformアプリケーション開発
PPTX
第8回 Tokyo Jazug Night Ignite 2017 落穂拾い Storage編
PPTX
201910 azure seminar
PPTX
CLR/H勉強会44回目 Windows Azureストレージについて
PPTX
build2017のazure関連情報まとめ
PPTX
Persistence on Azure - Microsoft Azure の永続化
PDF
5分で振り返る windows azure の歴史
PPTX
Visual Studio 2017 で Azure Functions の開発
PDF
20150704 MS Azure最新 - innovation egg 第4回
PPTX
Introduction to Azure Service Fabric
PPTX
エンジニアのための Azure 基礎知識
PPTX
Azure Fabric Service Reliable Collection
PPTX
ふりかえり Windows Azure
PDF
Windows Azureの歴史 2013年2月版
PDF
20120201 windowsazureの歴史
PPTX
Azure Service Fabric 紹介
Introduction to windows azure storage
Microsoft Azure Storage 概要
Windows Azure Storage:Best Practices and Internals
Windows Azure Programming
最新!Windows Azure Platformアプリケーション開発
第8回 Tokyo Jazug Night Ignite 2017 落穂拾い Storage編
201910 azure seminar
CLR/H勉強会44回目 Windows Azureストレージについて
build2017のazure関連情報まとめ
Persistence on Azure - Microsoft Azure の永続化
5分で振り返る windows azure の歴史
Visual Studio 2017 で Azure Functions の開発
20150704 MS Azure最新 - innovation egg 第4回
Introduction to Azure Service Fabric
エンジニアのための Azure 基礎知識
Azure Fabric Service Reliable Collection
ふりかえり Windows Azure
Windows Azureの歴史 2013年2月版
20120201 windowsazureの歴史
Azure Service Fabric 紹介
Ad

More from Takekazu Omi (20)

PDF
jazug34 Container Apps Key Vault
PDF
bicep 0.5 pre
PDF
Bicep + VS Code で楽々Azure Deploy
PDF
Bicep 入門 MySQL編
PDF
//Build 2021 FASTER 紹介
PDF
//build 2021 bicep 0.4
PDF
bicep 紹介
PDF
bicep dev container
PPTX
Cosmos DB Consistency Levels and Introduction of TLA+
PPTX
20180421 Azure Architecture Cloud Design Patterns
PPTX
Azure Application Insights とか
PDF
life with posh
PPTX
Cosmos DB 入門 multi model multi API編
PPTX
Global Azure Bootcamp 2017 DocumentDB Deep Dive
PPTX
Azure Storage Partition Internals
PPTX
Azure Service Fabric Cluster の作成
PPTX
Azure Service Fabric Actor
PPTX
祝GA、 Service Fabric 概要
PPTX
Servcie Fabric and Cloud Design Pattern
PPTX
Service Fabric での高密度配置
jazug34 Container Apps Key Vault
bicep 0.5 pre
Bicep + VS Code で楽々Azure Deploy
Bicep 入門 MySQL編
//Build 2021 FASTER 紹介
//build 2021 bicep 0.4
bicep 紹介
bicep dev container
Cosmos DB Consistency Levels and Introduction of TLA+
20180421 Azure Architecture Cloud Design Patterns
Azure Application Insights とか
life with posh
Cosmos DB 入門 multi model multi API編
Global Azure Bootcamp 2017 DocumentDB Deep Dive
Azure Storage Partition Internals
Azure Service Fabric Cluster の作成
Azure Service Fabric Actor
祝GA、 Service Fabric 概要
Servcie Fabric and Cloud Design Pattern
Service Fabric での高密度配置

Recently uploaded (7)

PDF
20250826_Devinで切り拓く沖縄ITの未来_AI駆動開発勉強会 沖縄支部 第2回
PPTX
生成AIとモデルベース開発:実はとても相性が良いことを説明します。まあそうだろうなと思われる方はご覧ください。
PDF
AIシステムのセキュリティ:脅威となりつつあるAIの現状と課題 [English] Security of AI Systems: The Current...
PDF
翔泳社 「C++ ゼロからはじめるプログラミング」対応 C++学習教材(三谷純)
PDF
Working as an OSS Developer at Ruby Association Activity Report 2025
PDF
ココロ分解帳|感情をやさしく分解し自分と他者を理解するためのモバイルノートアプリ
20250826_Devinで切り拓く沖縄ITの未来_AI駆動開発勉強会 沖縄支部 第2回
生成AIとモデルベース開発:実はとても相性が良いことを説明します。まあそうだろうなと思われる方はご覧ください。
AIシステムのセキュリティ:脅威となりつつあるAIの現状と課題 [English] Security of AI Systems: The Current...
翔泳社 「C++ ゼロからはじめるプログラミング」対応 C++学習教材(三谷純)
Working as an OSS Developer at Ruby Association Activity Report 2025
ココロ分解帳|感情をやさしく分解し自分と他者を理解するためのモバイルノートアプリ

Windows Azure Storage Client 2.1 のBuffer Pooling

  • 1. Windows Azure Storage Client 2.1 kyrt Takekazu Omi [email protected] @takekazuomi 2013/9/5 R.2 http://www.slideshare.net/takekazuomi/20130907-jazug-scl21whatsnew
  • 2. BUILD 2013 3-541 Windows Azure Storage: What’s Coming, Best Practices, and Internals • 劇的なパフォーマンスの向 上! 2013/8/29 kyrt @takekazuomi 2
  • 3. Windows Azure Storage 2.1 Released • nuget 9/4 • Windows Azure Storage 2.1.0.0 • http://www.nuget.org/packages/WindowsAzure.Storage/ • azure storage tream blob (さっき) • Announcing Storage Client Library 2.1 RTM & CTP for Windows Phone • http://blogs.msdn.com/b/windowsazurestorage/archive/2013/09/07/annou ncing-storage-client-library-2-1-rtm.aspx • github (・・・) • https://github.com/WindowsAzure/azure-sdk-for-net 2013/8/29 kyrt @takekazuomi 3
  • 4. 2.1 .NET Library : Performance Improvements 2013/8/29 kyrt @takekazuomi 4 1. Buffer Pooling 2. Multi-Buffer Memory Stream 長さが分からないデータのバッファリングでの一貫したパフォーマンスを実装 3. .NET MD5 (native 実装に比べて~20% 程度の高速化) http://msdn.microsoft.com/en-us/library/windows/desktop/aa379947(v=vs.85).aspx • nugetで配布中 http://www.nuget.org/packages/WindowsAzure.Storage/ https://github.com/WindowsAzure/azure-sdk-for-net/tree/dev
  • 5. Buffer Pooling • Buffer Poolingは、確保済みbufferを複数のオペレー ションで再利用するため、高いスケールを要求され るアプリケーションでは効果がある • 特に、.NETのようなmanaged environment ではオブ ジェクトの確保と解放後のGCのかかるCPUコストを 劇的に削減できる • 2.1では、IBufferManager 経由でPoolからBufferを取 得する仕組みを組み込んだ • CloudTableClient.BufferManager に設定したものが 使われる(BlobとQueueも) public interface IBufferManager { // poolにバッファーを返す void ReturnBuffer(byte[] buffer); // poolからバッファを取得 byte[] TakeBuffer(int bufferSize); // デフォルトのバッファーサイズを取得 int GetDefaultBufferSize(); } 2013/8/29 kyrt @takekazuomi 5
  • 6. CloudTableClient and BufferPool 2013/8/29 kyrt @takekazuomi 6 Buffer Pool buffer buffer buffer buffer aCloudTableClient TakeBufferReturnBuffer Buffer Pool buffer buffer buffer buffer aCloudTableClient TakeBufferReturnBuffer
  • 7. Multi-Buffer Memory Stream 2013/8/29 kyrt @takekazuomi 7 MultiBufferMemoryStream : Stream buffer buffer buffer buffer Buffer Pool buffer buffer buffer buffer aCloudTableClient TakeBuffer ReturnBuffer buffer
  • 8. 2013/8/29 kyrt @takekazuomi 8 IBufferManagerの実装が無い
  • 9. どうやら • IBufferManager は、 System.ServiceModel.dllのBufferManager の パターンに従っているので、 desktop clientsはframeworkで用意され た既存の実装を容易に利用することができます • http://blogs.msdn.com/b/windowsazurestorage/archive/2013/07/12/introdu cing-storage-client-library-2-1-rc-for-net-and-windows-phone-8.aspx インターフェイスだけ合わせれば行けそう 2013/8/29 kyrt @takekazuomi 9
  • 10. MyBufferManager • System.ServiceModel.dllの BufferManager に丸投げ • IBufferManagerのInterfaceに 合わせただけ • 微妙なのは、 GetDefaultBufferSize() maxBufferSize が、 DefaultBufferSize ? • 現行コードをCheck • https://github.com/WindowsAz ure/azure-sdk-for- net/blob/dev/microsoft-azure- api/Services/Storage/Lib/Com mon/Core/MultiBufferMemory Stream.cs#L89 class MyBufferManager:IBufferManager { private readonly BufferManager _buferManager = null; private readonly int _maxBufferSize; public MyBufferManager(long maxBufferPoolSize, int maxBufferSize) { _maxBufferSize = maxBufferSize; _buferManager = BufferManager.CreateBufferManager(maxBufferPoolSize, maxBufferSize); } public void ReturnBuffer(byte[] buffer) { _buferManager.ReturnBuffer(buffer); } public byte[] TakeBuffer(int bufferSize) { return _buferManager.TakeBuffer(bufferSize); } public int GetDefaultBufferSize() { return _maxBufferSize; } } 2013/8/29 kyrt @takekazuomi 10