internal AzureSLA GetDiskSLA(int?diskSize, string vhdUri) { if (!diskSize.HasValue) { diskSize = this.GetDiskSizeGbFromBlobUri(vhdUri); } if (!diskSize.HasValue) { this.WriteWarning("OS Disk size is empty and could not be determined. Assuming P10."); diskSize = 127; } AzureSLA sla = new AzureSLA(); if (diskSize > 0 && diskSize < 129) { // P10 sla.IOPS = 500; sla.TP = 100; } else if (diskSize > 0 && diskSize < 513) { // P20 sla.IOPS = 2300; sla.TP = 150; } else if (diskSize > 0 && diskSize < 1025) { // P30 sla.IOPS = 5000; sla.TP = 200; } else { WriteError("Unkown disk size for Premium Storage - {0}", diskSize); throw new ArgumentException("Unkown disk size for Premium Storage"); } return(sla); }
internal AzureSLA GetVMSLA(VirtualMachine virtualMachine) { var result = new AzureSLA(); result.HasSLA = false; switch (virtualMachine.HardwareProfile.VmSize) { case "Standard_DS1": result.HasSLA = true; result.IOPS = 3200; result.TP = 32; break; case "Standard_DS1_v2": result.HasSLA = true; result.IOPS = 3200; result.TP = 48; break; case "Standard_DS2": result.HasSLA = true; result.IOPS = 6400; result.TP = 64; break; case "Standard_DS2_v2": result.HasSLA = true; result.IOPS = 6400; result.TP = 96; break; case "Standard_DS3": result.HasSLA = true; result.IOPS = 12800; result.TP = 128; break; case "Standard_DS3_v2": result.HasSLA = true; result.IOPS = 12800; result.TP = 192; break; case "Standard_DS4": result.HasSLA = true; result.IOPS = 25600; result.TP = 256; break; case "Standard_DS4_v2": result.HasSLA = true; result.IOPS = 25600; result.TP = 384; break; case "Standard_DS5_v2": result.HasSLA = true; result.IOPS = 51200; result.TP = 768; break; case "Standard_DS11": result.HasSLA = true; result.IOPS = 6400; result.TP = 64; break; case "Standard_DS11_v2": result.HasSLA = true; result.IOPS = 6400; result.TP = 96; break; case "Standard_DS12": result.HasSLA = true; result.IOPS = 12800; result.TP = 128; break; case "Standard_DS12_v2": result.HasSLA = true; result.IOPS = 12800; result.TP = 192; break; case "Standard_DS13": result.HasSLA = true; result.IOPS = 25600; result.TP = 256; break; case "Standard_DS13_v2": result.HasSLA = true; result.IOPS = 25600; result.TP = 384; break; case "Standard_DS14": result.HasSLA = true; result.IOPS = 51200; result.TP = 512; break; case "Standard_DS14_v2": result.HasSLA = true; result.IOPS = 51200; result.TP = 768; break; case "Standard_DS15_v2": result.HasSLA = true; result.IOPS = 64000; result.TP = 960; break; case "Standard_GS1": result.HasSLA = true; result.IOPS = 5000; result.TP = 125; break; case "Standard_GS2": result.HasSLA = true; result.IOPS = 10000; result.TP = 250; break; case "Standard_GS3": result.HasSLA = true; result.IOPS = 20000; result.TP = 500; break; case "Standard_GS4": result.HasSLA = true; result.IOPS = 40000; result.TP = 1000; break; case "Standard_GS5": result.HasSLA = true; result.IOPS = 80000; result.TP = 2000; break; default: break; } return(result); }
internal AzureSLA GetDiskSLA(int? diskSize, string vhdUri) { if (!diskSize.HasValue) { diskSize = this.GetDiskSizeGbFromBlobUri(vhdUri); } if (!diskSize.HasValue) { this.WriteWarning("OS Disk size is empty and could not be determined. Assuming P10."); diskSize = 127; } AzureSLA sla = new AzureSLA(); if (diskSize > 0 && diskSize < 129) { // P10 sla.IOPS = "500"; sla.TP = "100"; } else if (diskSize > 0 && diskSize < 513) { // P20 sla.IOPS = "2300"; sla.TP = "150"; } else if (diskSize > 0 && diskSize < 1025) { // P30 sla.IOPS = "5000"; sla.TP = "200"; } else { WriteError("Unkown disk size for Premium Storage - {0}", diskSize); throw new ArgumentException("Unkown disk size for Premium Storage"); } return sla; }
internal AzureSLA GetVMSLA(VirtualMachine virtualMachine) { var result = new AzureSLA(); result.HasSLA = false; switch (virtualMachine.HardwareProfile.VmSize) { case "Standard_DS1": case "Standard_DS1_v2": result.HasSLA = true; result.IOPS = "3200"; result.TP = "32"; break; case "Standard_DS2": case "Standard_DS2_v2": result.HasSLA = true; result.IOPS = "6400"; result.TP = "64"; break; case "Standard_DS3": case "Standard_DS3_v2": result.HasSLA = true; result.IOPS = "12800"; result.TP = "128"; break; case "Standard_DS4": case "Standard_DS4_v2": result.HasSLA = true; result.IOPS = "25600"; result.TP = "256"; break; case "Standard_DS11": case "Standard_DS11_v2": result.HasSLA = true; result.IOPS = "6400"; result.TP = "64"; break; case "Standard_DS12": case "Standard_DS12_v2": result.HasSLA = true; result.IOPS = "12800"; result.TP = "128"; break; case "Standard_DS13": case "Standard_DS13_v2": result.HasSLA = true; result.IOPS = "25600"; result.TP = "256"; break; case "Standard_DS14": case "Standard_DS14_v2": result.HasSLA = true; result.IOPS = "50000"; result.TP = "512"; break; case "Standard_GS1": result.HasSLA = true; result.IOPS = "5000"; result.TP = "125"; break; case "Standard_GS2": result.HasSLA = true; result.IOPS = "10000"; result.TP = "250"; break; case "Standard_GS3": result.HasSLA = true; result.IOPS = "20000"; result.TP = "500"; break; case "Standard_GS4": result.HasSLA = true; result.IOPS = "40000"; result.TP = "1000"; break; case "Standard_GS5": result.HasSLA = true; result.IOPS = "80000"; result.TP = "2000"; break; default: break; } return result; }
internal AzureSLA GetDiskSLA(int?diskSize, VirtualHardDisk vhd) { if (!diskSize.HasValue && vhd != null) { diskSize = this.GetDiskSizeGbFromBlobUri(vhd.Uri); } if (!diskSize.HasValue) { this.WriteWarning("OS Disk size is empty and could not be determined. Assuming P10."); diskSize = 127; } AzureSLA sla = new AzureSLA(); if (diskSize > 0 && diskSize <= 32) { // P4 sla.IOPS = 120; sla.TP = 125; } else if (diskSize > 0 && diskSize <= 64) { // P6 sla.IOPS = 240; sla.TP = 50; } else if (diskSize > 0 && diskSize <= 128) { // P10 sla.IOPS = 500; sla.TP = 100; } else if (diskSize > 0 && diskSize <= 512) { // P20 sla.IOPS = 2300; sla.TP = 150; } else if (diskSize > 0 && diskSize <= 1024) { // P30 sla.IOPS = 5000; sla.TP = 200; } else if (diskSize > 0 && diskSize <= 2048) { // P40 sla.IOPS = 7500; sla.TP = 250; } else if (diskSize > 0 && diskSize <= (4 * 1024)) { // P50 sla.IOPS = 7500; sla.TP = 250; } else if (diskSize > 0 && diskSize <= (8 * 1024)) { // P60 sla.IOPS = 12500; sla.TP = 480; } else if (diskSize > 0 && diskSize <= (16 * 1024)) { // P70 sla.IOPS = 15000; sla.TP = 750; } else if (diskSize > 0 && diskSize <= (32 * 1024)) { // P80 sla.IOPS = 20000; sla.TP = 750; } else { WriteError("Unkown disk size for Premium Storage - {0}", diskSize); throw new ArgumentException("Unkown disk size for Premium Storage"); } return(sla); }
internal AzureSLA GetVMSLA(VirtualMachine virtualMachine) { var result = new AzureSLA(); result.HasSLA = false; switch (virtualMachine.HardwareProfile.VmSize) { case "Standard_DS1": result.HasSLA = true; result.IOPS = 3200; result.TP = 32; break; case "Standard_DS1_v2": case "Standard_D2s_v3": case "Standard_E2s_v3": result.HasSLA = true; result.IOPS = 3200; result.TP = 48; break; case "Standard_DS2": result.HasSLA = true; result.IOPS = 6400; result.TP = 64; break; case "Standard_DS2_v2": case "Standard_D4s_v3": case "Standard_E4s_v3": case "Standard_E4-2s_v3": result.HasSLA = true; result.IOPS = 6400; result.TP = 96; break; case "Standard_DS3": result.HasSLA = true; result.IOPS = 12800; result.TP = 128; break; case "Standard_DS3_v2": case "Standard_D8s_v3": case "Standard_E8s_v3": case "Standard_E8-2s_v3": case "Standard_E8-4s_v3": result.HasSLA = true; result.IOPS = 12800; result.TP = 192; break; case "Standard_DS4": result.HasSLA = true; result.IOPS = 25600; result.TP = 256; break; case "Standard_DS4_v2": case "Standard_D16s_v3": case "Standard_E16s_v3": case "Standard_E16-4s_v3": case "Standard_E16-8s_v3": result.HasSLA = true; result.IOPS = 25600; result.TP = 384; break; case "Standard_DS5_v2": case "Standard_D32s_v3": result.HasSLA = true; result.IOPS = 51200; result.TP = 768; break; case "Standard_DS11": result.HasSLA = true; result.IOPS = 6400; result.TP = 64; break; case "Standard_DS11_v2": result.HasSLA = true; result.IOPS = 6400; result.TP = 96; break; case "Standard_DS12": result.HasSLA = true; result.IOPS = 12800; result.TP = 128; break; case "Standard_DS12_v2": result.HasSLA = true; result.IOPS = 12800; result.TP = 192; break; case "Standard_DS13": result.HasSLA = true; result.IOPS = 25600; result.TP = 256; break; case "Standard_DS13_v2": result.HasSLA = true; result.IOPS = 25600; result.TP = 384; break; case "Standard_DS14": result.HasSLA = true; result.IOPS = 51200; result.TP = 512; break; case "Standard_DS14_v2": case "Standard_E32s_v3": case "Standard_E32-8s_v3": case "Standard_E32-16s_v3": result.HasSLA = true; result.IOPS = 51200; result.TP = 768; break; case "Standard_DS15_v2": result.HasSLA = true; result.IOPS = 64000; result.TP = 960; break; case "Standard_GS1": result.HasSLA = true; result.IOPS = 5000; result.TP = 125; break; case "Standard_GS2": result.HasSLA = true; result.IOPS = 10000; result.TP = 250; break; case "Standard_GS3": result.HasSLA = true; result.IOPS = 20000; result.TP = 500; break; case "Standard_GS4": result.HasSLA = true; result.IOPS = 40000; result.TP = 1000; break; case "Standard_GS5": result.HasSLA = true; result.IOPS = 80000; result.TP = 2000; break; case "Standard_M8-2ms": case "Standard_M8-4ms": case "Standard_M8ms": result.HasSLA = true; result.IOPS = 5000; result.TP = 125; break; case "Standard_M16-4ms": case "Standard_M16-8ms": case "Standard_M16ms": result.HasSLA = true; result.IOPS = 10000; result.TP = 250; break; case "Standard_M32-8ms": case "Standard_M32-16ms": case "Standard_M32ms": case "Standard_M32ls": case "Standard_M32ts": result.HasSLA = true; result.IOPS = 20000; result.TP = 500; break; case "Standard_M64ms": case "Standard_M64s": case "Standard_M64ls": case "Standard_M64-16ms": case "Standard_M64-32ms": result.HasSLA = true; result.IOPS = 40000; result.TP = 1000; break; case "Standard_M128s": case "Standard_M128ms": case "Standard_M128-32ms": case "Standard_M128-64ms": result.HasSLA = true; result.IOPS = 80000; result.TP = 2000; break; case "Standard_E64s_v3": case "Standard_D64s_v3": case "Standard_E64-16s_v3": case "Standard_E64-32s_v3": case "Standard_E64is_v3": result.HasSLA = true; result.IOPS = 80000; result.TP = 1200; break; default: break; } return(result); }
internal AzureSLA GetVMSLA(VirtualMachine virtualMachine) { var result = new AzureSLA(); result.HasSLA = false; switch (virtualMachine.HardwareProfile.VmSize) { case "Standard_DS1": case "Standard_DS1_v2": result.HasSLA = true; result.IOPS = "3200"; result.TP = "32"; break; case "Standard_DS2": case "Standard_DS2_v2": result.HasSLA = true; result.IOPS = "6400"; result.TP = "64"; break; case "Standard_DS3": case "Standard_DS3_v2": result.HasSLA = true; result.IOPS = "12800"; result.TP = "128"; break; case "Standard_DS4": case "Standard_DS4_v2": result.HasSLA = true; result.IOPS = "25600"; result.TP = "256"; break; case "Standard_DS11": case "Standard_DS11_v2": result.HasSLA = true; result.IOPS = "6400"; result.TP = "64"; break; case "Standard_DS12": case "Standard_DS12_v2": result.HasSLA = true; result.IOPS = "12800"; result.TP = "128"; break; case "Standard_DS13": case "Standard_DS13_v2": result.HasSLA = true; result.IOPS = "25600"; result.TP = "256"; break; case "Standard_DS14": case "Standard_DS14_v2": result.HasSLA = true; result.IOPS = "50000"; result.TP = "512"; break; case "Standard_GS1": result.HasSLA = true; result.IOPS = "5000"; result.TP = "125"; break; case "Standard_GS2": result.HasSLA = true; result.IOPS = "10000"; result.TP = "250"; break; case "Standard_GS3": result.HasSLA = true; result.IOPS = "20000"; result.TP = "500"; break; case "Standard_GS4": result.HasSLA = true; result.IOPS = "40000"; result.TP = "1000"; break; case "Standard_GS5": result.HasSLA = true; result.IOPS = "80000"; result.TP = "2000"; break; default: break; } return(result); }