Slides presented during HomeGen by CloudGen Verona, about how to properly size an Azure IaaS VM, with an additional focus on high availability and cost-saving topics.
Session recording: https://youtu.be/C8v6c6EkJ9A
Demo: https://github.com/OmegaMadLab/SqlIaasVmPlayground
2. Who I am
@OmegaMadLab
https://github.com/OmegaMadLab
Marco Obinu
@OmegaMadLab
marco.obinu@omegamadlab.com
http://www.omegamadlab.com
https://github.com/OmegaMadLab
https://www.linkedin.com/in/marco-obinu-omegamadlab/
https://www.youtube.com/channel/UCpkBeQSscC1iBvpNP4VNTKQ
• Geek to the bone 🤓
• Advisory Engineer @ SoftJam S.p.A.
• Azure Solution Architect Expert
3. Planning for an Azure VM
What do you need to define before starting the deployment?
5. What do you need to define before starting the deployment?
1. Logical grouping of resources
• Will the VM be part of a system?
2. Network requirements
• In which network do we have to place the VM?
• Does it need a public IP?
3. Application requirements
• Do we need high availability?
• Does the VM need any special feature?
• How many CPUs, RAM, disks and NIC do we need?
6. What do you need to define before starting the deployment?
1. Logical grouping of resources
• Will the VM be part of a system?
2. Network requirements
• In which network do we have to place the VM?
• Does it need a public IP?
3. Application requirements
• Do we need high availability?
• Does the VM need any special feature?
• How many CPUs, RAM, disks and NIC do we need?
7. What do you need to define before starting the deployment?
1. Logical grouping of resources
• Will the VM be part of a system?
2. Network requirements
• In which network do we have to place the VM? *
• Does it need a public IP?
3. Application requirements
• Do we need high availability? *
• Does the VM need any special feature?
• How many CPUs, RAM, disks and NIC do we need?
* it can be a mess to change this later
9. Operating systems
Operating System Version
Microsoft
Windows Server 2003 - 2019
Windows 7, 8.1, 10
Open Source
CentOS 6.3+, 7.0+, 8.0+
CoreOS 494.4.0+
Debian Debian 7.9+, 8.2+, 9, 10
Oracle Linux 6.4+, 7.0+
Red Hat Enterprise Linux 7.1+, 8.0+
SUSE Linux Enterprise
SLES/SLES for SAP
11 SP4
12 SP1+
15
openSUSE openSUSE Leap 42.2+
Ubuntu Ubuntu 12.04+
• Marketplace
• Custom images
• Azure Site Recovery
10. Families and series
Family Series Optimized for
General purpose B, Dsv3, Dv3, Dasv4,
Dav4, DSv2, Dv2, Av2,
DC, DCv2
Balanced CPU-to-memory ratio. Ideal for testing and development, small to medium
databases, and low to medium traffic web servers.
Compute
optimized
Fsv2 High CPU-to-memory ratio. Good for medium traffic web servers, network
appliances, batch processes, and application servers.
Memory
optimized
Esv3, Ev3, Easv4, Eav4,
Mv2, M, DSv2, Dv2
High memory-to-CPU ratio. Great for relational database servers, medium to large
caches, and in-memory analytics.
Storage optimized Lsv2 High disk throughput and IO ideal for Big Data, SQL, NoSQL databases, data
warehousing and large transactional databases.
GPU NC, NCv2, NCv3, ND,
NDv2 (Preview), NV,
NVv3, NVv4
Specialized virtual machines targeted for heavy graphic rendering and video editing,
as well as model training and inferencing (ND) with deep learning. Available with
single or multiple GPUs.
High performance
compute
HB, HBv2, HC, H Our fastest and most powerful CPU virtual machines with optional high-throughput
network interfaces (RDMA).
11. Azure Storage
(remote storage)
A complex object
Virtualization host
OsDisk DataDisk DataDisk
VM
VM NIC vSwitch Host NIC
BlobCache (local storage)
TempDisk
RAM cache
SSD cache
12. Size matters
Family, series and size of the VM also affects:
• Access to Premium Storage
• Computing power
• Disk throughput & number of data disks
• Cache and Temporary disk size & throughput
• Network bandwidth & Accelerated Network
DS12v2 – 4 core 28 GB
ACU 210-250
Cached tp. 16000/128 (144)
Uncached tp. 12800/192
NIC/Mbps 4/3000
DS13v2 – 8 core 56 GB
ACU 210-250
Cached tp. 32000/256 (288)
Uncached tp. 25600/384
NIC/Mbps 8/6000
Esv3 – 8 core 64 GB
ACU 160-180
Cached tp. 16000/128 (200)
Uncached tp. 12800/192
NIC/Mbps 4/4000
Azure Storage
(remote storage)
Virtualization host
OsDisk DataDisk DataDisk
VM
VM NIC vSwitch Host NIC
BlobCache (local storage)
TempDisk
RAM cache
SSD cache
13. Size matters
Family, series and size of the VM also affects:
• Access to Premium Storage
• Computing power
• Disk throughput & number of data disks
• Cache and Temporary disk size & throughput
• Network bandwidth & Accelerated Network
DS12v2 – 4 core 28 GB
ACU 210-250
Cached tp. 16000/128 (144)
Uncached tp. 12800/192
NIC/Mbps 4/3000
DS13v2 – 8 core 56 GB
ACU 210-250
Cached tp. 32000/256 (288)
Uncached tp. 25600/384
NIC/Mbps 8/6000
Esv3 – 8 core 64 GB
ACU 160-180
Cached tp. 16000/128 (200)
Uncached tp. 12800/192
NIC/Mbps 4/4000
Azure Storage
(remote storage)
Virtualization host
OsDisk DataDisk DataDisk
VM
VM NIC vSwitch Host NIC
BlobCache (local storage)
TempDisk
RAM cache
SSD cache
14. Families and series
Family Series Optimized for
General purpose B, Dsv3, Dv3, Dasv4,
Dav4, DSv2, Dv2, Av2,
DC, DCv2
Balanced CPU-to-memory ratio. Ideal for testing and development, small to medium
databases, and low to medium traffic web servers.
Compute
optimized
Fsv2 High CPU-to-memory ratio. Good for medium traffic web servers, network
appliances, batch processes, and application servers.
Memory
optimized
Esv3, Ev3, Easv4, Eav4,
Mv2, M, DSv2, Dv2
High memory-to-CPU ratio. Great for relational database servers, medium to large
caches, and in-memory analytics.
Storage optimized Lsv2 High disk throughput and IO ideal for Big Data, SQL, NoSQL databases, data
warehousing and large transactional databases.
GPU NC, NCv2, NCv3, ND,
NDv2 (Preview), NV,
NVv3, NVv4
Specialized virtual machines targeted for heavy graphic rendering and video editing,
as well as model training and inferencing (ND) with deep learning. Available with
single or multiple GPUs.
High performance
compute
HB, HBv2, HC, H Our fastest and most powerful CPU virtual machines with optional high-throughput
network interfaces (RDMA).
15. Support for Premium storage
D13 v2 Ds13 v2
CPU 8 8
RAM 56 56
Temporary Disk 400 112
Storage Premium No Yes
€ / hour 0,6401 0,6401
16. Size matters
Family, series and size of the VM also affects:
• Access to Premium Storage
• Computing power
• Disk throughput & number of data disks
• Cache and Temporary disk size & throughput
• Network bandwidth & Accelerated Network
DS12v2 – 4 core 28 GB
ACU 210-250
Cached tp. 16000/128 (144)
Uncached tp. 12800/192
NIC/Mbps 4/3000
DS13v2 – 8 core 56 GB
ACU 210-250
Cached tp. 32000/256 (288)
Uncached tp. 25600/384
NIC/Mbps 8/6000
Esv3 – 8 core 64 GB
ACU 160-180
Cached tp. 16000/128 (200)
Uncached tp. 12800/192
NIC/Mbps 4/4000
Azure Storage
(remote storage)
Virtualization host
OsDisk DataDisk DataDisk
VM
VM NIC vSwitch Host NIC
BlobCache (local storage)
TempDisk
RAM cache
SSD cache
17. Size matters
Family, series and size of the VM also affects:
• Access to Premium Storage
• Computing power
• Disk throughput & number of data disks
• Cache and Temporary disk size & throughput
• Network bandwidth & Accelerated Network
DS12v2 – 4 core 28 GB
ACU 210-250
Cached tp. 16000/128 (144)
Uncached tp. 12800/192
NIC/Mbps 4/3000
DS13v2 – 8 core 56 GB
ACU 210-250
Cached tp. 32000/256 (288)
Uncached tp. 25600/384
NIC/Mbps 8/6000
Esv3 – 8 core 64 GB
ACU 160-180
Cached tp. 16000/128 (200)
Uncached tp. 12800/192
NIC/Mbps 4/4000
Azure Storage
(remote storage)
Virtualization host
OsDisk DataDisk DataDisk
VM
VM NIC vSwitch Host NIC
BlobCache (local storage)
TempDisk
RAM cache
SSD cache
18. Azure Compute Unit
SKU Family ACU vCPU vCPU: Core
A0 50 1:1
A1 - A4 100 1:1
A5 - A7 100 1:1
A1_v2 - A8_v2 100 1:1
A2m_v2 - A8m_v2 100 1:1
A8 - A11 225* 1:1
D1 - D14 160 - 250 1:1
D1_v2 - D15_v2 210 - 250* 1:1
DS1 - DS14 160 - 250 1:1
DS1_v2 - DS15_v2 210 - 250* 1:1
D_v3 160 - 190* 2:1***
Ds_v3 160 - 190* 2:1***
E_v3 160 - 190* 2:1***
Es_v3 160 - 190* 2:1***
F2s_v2 - F72s_v2 195 - 210* 2:1***
F1 - F16 210 - 250* 1:1
F1s - F16s 210 - 250* 1:1
G1 - G5 180 - 240* 1:1
GS1 - GS5 180 - 240* 1:1
H 290 - 300* 1:1
HB 199 - 216** 1:1
HC 297 - 315* 1:1
L4s - L32s 180 - 240* 1:1
L8s_v2 - L80s_v2 150 - 175** 2:1
M 160 - 180 2:1***
https://docs.microsoft.com/en-us/azure/virtual-machines/acu
*ACUs use Intel® Turbo technology to increase CPU frequency and provide a
performance increase. The amount of the performance increase can vary
based on the VM size, workload, and other workloads running on the same
host.
**ACUs use AMD® Boost technology to increase CPU frequency and provide a
performance increase. The amount of the performance increase can vary
based on the VM size, workload, and other workloads running on the same
host.
***Hyper-threaded and capable of running nested virtualization
Exception: series
https://docs.microsoft.com/en-us/azure/virtual-machines/sizes-b-series-burstable
Suitable for fluctuating workloads
Offer a baseline
performance
Earn credits
Spend credits
to achieve top
performance
19. Size matters
Family, series and size of the VM also affects:
• Access to Premium Storage
• Computing power
• Disk throughput & number of data disks
• Cache and Temporary disk size & throughput
• Network bandwidth & Accelerated Network
DS12v2 – 4 core 28 GB
ACU 210-250
Cached tp. 16000/128 (144)
Uncached tp. 12800/192
NIC/Mbps 4/3000
DS13v2 – 8 core 56 GB
ACU 210-250
Cached tp. 32000/256 (288)
Uncached tp. 25600/384
NIC/Mbps 8/6000
Esv3 – 8 core 64 GB
ACU 160-180
Cached tp. 16000/128 (200)
Uncached tp. 12800/192
NIC/Mbps 4/4000
Azure Storage
(remote storage)
Virtualization host
OsDisk DataDisk DataDisk
VM
VM NIC vSwitch Host NIC
BlobCache (local storage)
TempDisk
RAM cache
SSD cache
20. Size matters
Family, series and size of the VM also affects:
• Access to Premium Storage
• Computing power
• Disk throughput & number of data disks
• Cache and Temporary disk size & throughput
• Network bandwidth & Accelerated Network
DS12v2 – 4 core 28 GB
ACU 210-250
Cached tp. 16000/128 (144)
Uncached tp. 12800/192
NIC/Mbps 4/3000
DS13v2 – 8 core 56 GB
ACU 210-250
Cached tp. 32000/256 (288)
Uncached tp. 25600/384
NIC/Mbps 8/6000
Esv3 – 8 core 64 GB
ACU 160-180
Cached tp. 16000/128 (200)
Uncached tp. 12800/192
NIC/Mbps 4/4000
Azure Storage
(remote storage)
Virtualization host
OsDisk DataDisk DataDisk
VM
VM NIC vSwitch Host NIC
BlobCache (local storage)
TempDisk
RAM cache
SSD cache
21. Size matters
Family, series and size of the VM also affects:
• Access to Premium Storage
• Computing power
• Disk throughput & number of data disks
• Cache and Temporary disk size & throughput
• Network bandwidth & Accelerated Network
DS12v2 – 4 core 28 GB
ACU 210-250
Cached tp. 16000/128 (144)
Uncached tp. 12800/192
NIC/Mbps 4/3000
DS13v2 – 8 core 56 GB
ACU 210-250
Cached tp. 32000/256 (288)
Uncached tp. 25600/384
NIC/Mbps 8/6000
Esv3 – 8 core 64 GB
ACU 160-180
Cached tp. 16000/128 (200)
Uncached tp. 12800/192
NIC/Mbps 4/4000
Azure Storage
(remote storage)
Virtualization host
OsDisk DataDisk DataDisk
VM
VM NIC vSwitch Host NIC
BlobCache (local storage)
TempDisk
RAM cache
SSD cache
22. Size matters
Family, series and size of the VM also affects:
• Access to Premium Storage
• Computing power
• Disk throughput & number of data disks
• Cache and Temporary disk size & throughput
• Network bandwidth & Accelerated Network
DS12v2 – 4 core 28 GB
ACU 210-250
Cached tp. 16000/128 (144)
Uncached tp. 12800/192
NIC/Mbps 4/3000
DS13v2 – 8 core 56 GB
ACU 210-250
Cached tp. 32000/256 (288)
Uncached tp. 25600/384
NIC/Mbps 8/6000
Esv3 – 8 core 64 GB
ACU 160-180
Cached tp. 16000/128 (200)
Uncached tp. 12800/192
NIC/Mbps 4/4000
Azure Storage
(remote storage)
Virtualization host
OsDisk DataDisk DataDisk
VM
VM NIC vSwitch Host NIC
BlobCache (local storage)
TempDisk
RAM cache
SSD cache
23. Size matters
Family, series and size of the VM also affects:
• Access to Premium Storage
• Computing power
• Disk throughput & number of data disks
• Cache and Temporary disk size & throughput
• Network bandwidth & Accelerated Network
DS12v2 – 4 core 28 GB
ACU 210-250
Cached tp. 16000/128 (144)
Uncached tp. 12800/192
NIC/Mbps 4/3000
DS13v2 – 8 core 56 GB
ACU 210-250
Cached tp. 32000/256 (288)
Uncached tp. 25600/384
NIC/Mbps 8/6000
Esv3 – 8 core 64 GB
ACU 160-180
Cached tp. 16000/128 (200)
Uncached tp. 12800/192
NIC/Mbps 4/4000
Azure Storage
(remote storage)
Virtualization host
OsDisk DataDisk DataDisk
VM
VM NIC vSwitch Host NIC
BlobCache (local storage)
TempDisk
RAM cache
SSD cache
24. Choosing the right VM
Family, series and size of the VM also affects:
• Access to Premium Storage
• Computing power
• Disk throughput & number of data disks
• Cache and Temporary disk size & throughput
• Network bandwidth & Accelerated Network
DS13-2v2 – 2 core 56 GB
Cached tp. 32000/256 (288)
Uncached tp. 25600/384
NIC/Mbps 8/6000
DS13-4v2 – 4 core 56 GB
Cached tp. 32000/256 (288)
Uncached tp. 25600/384
NIC/Mbps 8/6000
DS13v2 – 8 core 56 GB
Cached tp. 32000/256 (288)
Uncached tp. 25600/384
NIC/Mbps 8/6000
Need more of these, but have to contain
licensing costs???
Go for Constrained vCPU!
https://docs.microsoft.com/en-us/azure/virtual-machines/windows/constrained-vcpu
Azure Storage
(remote storage)
Virtualization host
OsDisk DataDisk DataDisk
VM
VM NIC vSwitch Host NIC
BlobCache (local storage)
TempDisk
RAM cache
SSD cache
25. Managed disks offering
0 2000 4000 6000 8000 10000 12000 14000 16000 18000 20000
4
8
16
32
64
128
256
512
1024
2048
4096
8192
16384
32767
IOPS
ProvisionedGB
IOPS per disk
0 100 200 300 400 500 600 700 800 900
4
8
16
32
64
128
256
512
1024
2048
4096
8192
16384
32767
MiB/sec
ProvisionedGB
Throughtput per disk Premium SSD Standard SSD Standard HDD
Standard Storage
• Standard HDD (Sxx)
• Standard SSD (Exx)
• Low-end workloads
• Best-effort performance
Premium Storage
• Premium SSD (Pxx)
• Hi-end workloads
• Provisioned performance
• Bursting when size ≤ 512 GB
• 5-10 ms avg. latency
Use appropriate cache
settings
• Read-Write
• Read-Only
• None
Stripe disks to achieve more
26. Managed disks offering
0 100 200 300 400 500 600 700 800 900
4
8
16
32
64
128
256
512
1024
2048
4096
8192
16384
32767
MiB/sec
ProvisionedGB
Throughtput per disk Premium SSD Standard SSD Standard HDD
0 2000 4000 6000 8000 10000 12000 14000 16000 18000 20000
4
8
16
32
64
128
256
512
1024
2048
4096
8192
16384
32767
IOPS
ProvisionedGB
IOPS per disk
Premium SSD Standard SSD Standard HDD
Standard Storage
• Standard HDD (Sxx)
• Standard SSD (Exx)
• Low-end workloads
• Best-effort performance
Premium Storage
• Premium SSD (Pxx)
• Hi-end workloads
• Provisioned performance
• Bursting when size ≤ 512 GB
• 5-10 ms avg. latency
Use appropriate cache
settings
• Read-Write
• Read-Only
• None
Stripe disks to achieve more
27. Managed disks offering
0 2000 4000 6000 8000 10000 12000 14000 16000 18000 20000
4
8
16
32
64
128
256
512
1024
2048
4096
8192
16384
32767
IOPS
ProvisionedGB
IOPS per disk
0 100 200 300 400 500 600 700 800 900
4
8
16
32
64
128
256
512
1024
2048
4096
8192
16384
32767
MiB/sec
ProvisionedGB
Throughtput per disk
Premium SSD Standard SSD Standard HDD
Standard Storage
• Standard HDD (Sxx)
• Standard SSD (Exx)
• Low-end workloads
• Best-effort performance
Premium Storage
• Premium SSD (Pxx)
• Hi-end workloads
• Provisioned performance
• Bursting when size ≤ 512 GB
• 5-10 ms avg. latency
Use appropriate cache
settings
• Read-Write
• Read-Only
• None
Stripe disks to achieve more
28. Managed disks offering
0 2000 4000 6000 8000 10000 12000 14000 16000 18000 20000
4
8
16
32
64
128
256
512
1024
2048
4096
8192
16384
32767
IOPS
ProvisionedGB
IOPS per disk
0 100 200 300 400 500 600 700 800 900
4
8
16
32
64
128
256
512
1024
2048
4096
8192
16384
32767
MiB/sec
ProvisionedGB
Throughtput per disk Premium SSD Standard SSD Standard HDD
Standard Storage
• Standard HDD (Sxx)
• Standard SSD (Exx)
• Low-end workloads
• Best-effort performance
Premium Storage
• Premium SSD (Pxx)
• Hi-end workloads
• Provisioned performance
• Bursting when size ≤ 512 GB
• 5-10 ms avg. latency
Use appropriate cache
settings
• Read-Write
• Read-Only
• None
Stripe disks to achieve more
29. Managed disks offering
0 2000 4000 6000 8000 10000 12000 14000 16000 18000 20000
4
8
16
32
64
128
256
512
1024
2048
4096
8192
16384
32767
IOPS
ProvisionedGB
IOPS per disk
0 100 200 300 400 500 600 700 800 900
4
8
16
32
64
128
256
512
1024
2048
4096
8192
16384
32767
MiB/sec
ProvisionedGB
Throughtput per disk Premium SSD Standard SSD Standard HDD
Standard Storage
• Standard HDD (Sxx)
• Standard SSD (Exx)
• Low-end workloads
• Best-effort performance
Use appropriate cache
settings
• Read-Write
• Read-Only
• None
Stripe disks to achieve more
Premium Storage
• Premium SSD (Pxx)
• Hi-end workloads
• Provisioned performance
• Bursting when size ≤ 512 GB
• 5-10 ms avg. latency
30. Managed disks offering
0 2000 4000 6000 8000 10000 12000 14000 16000 18000 20000
4
8
16
32
64
128
256
512
1024
2048
4096
8192
16384
32767
IOPS
ProvisionedGB
IOPS per disk
0 100 200 300 400 500 600 700 800 900
4
8
16
32
64
128
256
512
1024
2048
4096
8192
16384
32767
MiB/sec
ProvisionedGB
Throughtput per disk
Premium SSD Standard SSD Standard HDD
Standard Storage
• Standard HDD (Sxx)
• Standard SSD (Exx)
• Low-end workloads
• Best-effort performance
Premium Storage
• Premium SSD (Pxx)
• Hi-end workloads
• Provisioned performance
• Bursting when size ≤ 512 GB
• 5-10 ms avg. latency
Use appropriate cache
settings
• Read-Write
• Read-Only
• None
Stripe disks to achieve more
31. Managed disks offering
0 2000 4000 6000 8000 10000 12000 14000 16000 18000 20000
4
8
16
32
64
128
256
512
1024
2048
4096
8192
16384
32767
IOPS
ProvisionedGB
IOPS per disk
0 100 200 300 400 500 600 700 800 900
4
8
16
32
64
128
256
512
1024
2048
4096
8192
16384
32767
MiB/sec
ProvisionedGB
Throughtput per disk
Premium SSD Standard SSD Standard HDD
Standard Storage
• Standard HDD (Sxx)
• Standard SSD (Exx)
• Low-end workloads
• Best-effort performance
Premium Storage
• Premium SSD (Pxx)
• Hi-end workloads
• Provisioned performance
• Bursting when size ≤ 512 GB
• 5-10 ms avg. latency
Use appropriate cache
settings
• Read-Write
• Read-Only
• None
Stripe disks to achieve more
32. Ultra SSD
Disk Size (GiB) IOPS Cap Throughput Cap (MBps)
4 1,200 300
8 2,400 600
16 4,800 1,200
32 9,600 2,000
64 19,200 2,000
128 38,400 2,000
256 76,800 2,000
512 80,000 2,000
1,024-65,536
(sizes in this range increasing in increments of 1 TiB)
160,000 2,000
• Size, IOPS and MBps can be sized indipendently
• Less than 1 ms avg. Latency
• Performance can be modified dinamically
33. Azure Networking 101
Virtual Network
Private address space (RFC 1918)
10.0.0.0/16
Subnet 10.0.2.0/24
Subnet 10.0.1.0/24
NSG
NSG
UDR
UDR
VM NIC Public IP
37. High Availability
Zone 2
Zone 1
Zone 3
Frontend 2
Backend 2
Frontend 1
Backend 1
Availability zones SLA 99,99%
FD 1
UD 2
UD 0
UD 1
FD 0
UD 0
UD 1
UD 2
Frontend
AvSet
Backend
AvSet
Availability set SLA 99,95%
Frontend tier
Backend tier
47. Cost-saving tips
• Right-size your VM and storage
• Burstable?
• CPU-constrained VM?
• Leverage disk bursting on Premium SSD ≤ 512 GB
• Spot VM?
• Ephimeral OS disk?
• Save on licensing with Hybrid Benefit
• Acquire a reservation for long-running systems
• VM reserved instances
• Storage reservation
• Deallocate VMs when not needed
• Look for an equivalent PaaS service 🤣
48. Spot VMs
• Leverage Azure unused capacity at low rates
• VMs can be evicted when:
• Azure needs capacity
• The actual price is higher than your price cap
SPOT PRICE
49. Cost-saving tips
• Right-size your VM and storage
• Burstable?
• CPU-constrained VM?
• Leverage disk bursting on Premium SSD ≤ 512 GB
• Spot VM?
• Ephimeral OS disk?
• Save on licensing with Hybrid Benefit
• Acquire a reservation for long-running systems
• VM reserved instances
• Storage reservation
• Deallocate VMs when not needed
• Look for an equivalent PaaS service 🤣