이 문서에서는 컴퓨팅 서비스에 대해 입증된 FinOps 사례 컬렉션을 간략하게 설명합니다. Azure에서 비용을 최적화하고, 효율성을 향상시키고, 컴퓨팅 리소스에 대한 인사이트를 얻는 방법에 대한 지침을 제공합니다. 이러한 사례는 VM(가상 머신), AKS(Azure Kubernetes Service) 및 Azure Functions와 같은 컴퓨팅 서비스 유형에 따라 분류됩니다.
Azure Kubernetes Service
AKS(Azure Kubernetes Service) 컨테이너화된 애플리케이션 배포 및 관리를 간소화합니다. 서버리스 Kubernetes, 통합 CI/CD 환경 및 엔터프라이즈급 보안 및 거버넌스를 제공합니다.
관련 리소스:
- Azure Kubernetes Service 제품 페이지
- Azure Kubernetes Service 가격 책정
- Azure Kubernetes Service 설명서
- AKS 기준 아키텍처
쿼리: AKS 클러스터 세부 정보
이 ARG 쿼리는 Azure 환경의 AKS 클러스터에 대한 자세한 정보를 검색합니다.
범주
리소스 관리
쿼리
resources
| where type == "microsoft.containerservice/managedclusters"
| extend AgentPoolProfiles = properties.agentPoolProfiles
| mvexpand AgentPoolProfiles
| project
id,
ProfileName = tostring(AgentPoolProfiles.name),
Sku = tostring(sku.name),
Tier = tostring(sku.tier),
mode = AgentPoolProfiles.mode,
AutoScaleEnabled = AgentPoolProfiles.enableAutoScaling,
SpotVM = AgentPoolProfiles.scaleSetPriority,
VMSize = tostring(AgentPoolProfiles.vmSize),
nodeCount = tostring(AgentPoolProfiles.['count']),
minCount = tostring(AgentPoolProfiles.minCount),
maxCount = tostring(AgentPoolProfiles.maxCount),
location,
resourceGroup,
subscriptionId,
AKSname = name
AKS 클러스터에 스폿 VM 사용
권장 사항: AKS 에이전트 풀에 스폿 VM을 사용하여 내결함성이 있는 중단 가능한 워크로드에 대한 컴퓨팅 비용을 절감합니다.
AKS의 스폿 VM 소개
Spot VM 사용하지 않는 Azure 용량을 크게 절감합니다. Azure 용량을 다시 필요로 하는 경우 Azure 인프라는 스폿 VM을 제거합니다. 스폿 VM은 일괄 처리 작업, 개발/테스트 환경 및 대규모 컴퓨팅 워크로드와 같은 중단을 처리할 수 있는 워크로드에 유용합니다.
자동 크기 조정을 사용하지만 스폿 VM을 활용하지 않는 AKS 클러스터는 필요 이상으로 비용을 지불할 수 있습니다. 중단 가능한 워크로드에 스폿 VM을 사용하도록 설정하면 컴퓨팅 비용을 크게 줄일 수 있습니다. 이 권장 사항은 중단을 허용할 수 있는 워크로드를 실행하는 클러스터에만 적용됩니다. 모든 워크로드가 스폿 VM에 적합한 것은 아닙니다.
메모
FinOps 허브는 스폿 VM이 없는 AKS 클러스터를 옵트인 권장 사항으로 자동으로 식별할 수 있습니다. 자세히알아보세요.
쿼리: 스폿 VM이 없는 AKS 클러스터
다음 ARG 쿼리를 사용하여 스폿 VM을 사용하지 않는 자동 크기 조정을 사용하도록 설정된 AKS 클러스터를 식별합니다.
범주
Optimization
쿼리
resources
| where type == 'microsoft.containerservice/managedclusters'
| mvexpand AgentPoolProfiles = properties.agentPoolProfiles
| where AgentPoolProfiles.enableAutoScaling == true
and isnull(AgentPoolProfiles.scaleSetPriority)
| project
ResourceId = id,
AKSName = name,
ProfileName = tostring(AgentPoolProfiles.name),
VMSize = tostring(AgentPoolProfiles.vmSize),
NodeCount = tostring(AgentPoolProfiles.['count']),
MinCount = tostring(AgentPoolProfiles.minCount),
MaxCount = tostring(AgentPoolProfiles.maxCount),
Region = location,
ResourceGroupName = resourceGroup,
SubscriptionId = subscriptionId
가상 머신
Azure VM(가상 머신)은 Azure에서 제공하는 여러 유형의주문형 확장성 컴퓨팅 리소스 중 하나입니다. 일반적으로 다른 선택 항목보다 컴퓨팅 환경을 더 많이 제어해야 하는 경우 VM을 선택합니다.
Azure VM은 가상화를 실행하는 물리적 하드웨어를 구입 및 유지 관리할 필요 없이 가상화의 유연성을 제공합니다. 그러나 VM에서 실행되는 소프트웨어 구성, 패치 및 설치와 같은 작업을 수행하여 VM을 유지 관리해야 합니다.
관련 리소스:
- 가상 머신 제품 페이지
- 가상 머신 가격 책정
- 가상 머신 설명서
- 확장 가능한 주문형 컴퓨팅 대한 Azure 서비스
가상 머신 할당 해제
권장 사항: 사용되지 않는 컴퓨팅 요금을 방지하기 위해 VM 할당을 취소합니다. VM을 할당 해제 없이 중지하지 마십시오.
비활성 VM 정보
VM에는 중지됨 및 할당 취소라는 두 가지 비활성 상태가 있습니다.
중지된 VM은 운영 체제 내에서 종료되었습니다(예: 종료 명령 사용). 중지된 VM은 전원이 꺼지지만 Azure는 여전히 CPU 및 메모리와 같은 컴퓨팅 리소스를 예약합니다. 컴퓨팅 리소스는 예약되어 있고 다른 VM에서 사용할 수 없으므로 이러한 VM에는 컴퓨팅 요금이 계속 발생합니다.
할당 취소된 VM은 Azure Portal, CLI, PowerShell 또는 기타 클라이언트 도구에서 클라우드 관리 API를 통해 중지됩니다. VM 할당이 취소되면 Azure는 해당 컴퓨팅 리소스를 해제합니다. 컴퓨팅 리소스가 릴리스되므로 이러한 VM에는 컴퓨팅 요금이 발생하지 않습니다. 그러나 중지된 VM과 할당 취소된 VM 모두 디스크의 스토리지 요금과 같이 컴퓨팅과 관련이 없는 요금이 계속 발생한다는 점에 유의해야 합니다.
메모
FinOps 허브는 할당 취소되지 않은 중지된 VM을 자동으로 식별할 수 있습니다. 자세히알아보세요.
중지된 VM 식별
다음 ARG(Azure Resource Graph) 쿼리를 사용하여 할당 취소되지 않은 중지된 VM을 식별합니다. 전원 상태, 위치, 리소스 그룹 및 구독 ID에 대한 세부 정보를 검색합니다.
resources
| where type =~ 'microsoft.compute/virtualmachines'
| extend PowerState = tostring(properties.extended.instanceView.powerState.displayStatus)
| where PowerState !in =('VM deallocated', 'VM running')
| project
ResourceId = id,
PowerState,
Region = location,
ResourceGroupName = resourceGroup,
SubscriptionId = subscriptionId
약정 할인 사용
권장 사항: 약정 할인을 사용하여 정가에 비해 최대 72%까지 절약할 수 있습니다.
약정 할인 정보
약정 할인은 지정된 기간 또는 기간(일반적으로 1년 또는 3년)에 Azure 서비스를 사용하기로 약속하는 조직에 제공되는 재정적 인센티브입니다. 조직은 기간 동안 고정된 사용량 또는 지출(비용)에 동의함으로써 정가에 비해 상당한 할인(최대 72%)의 혜택을 누릴 수 있습니다. 할인은 적격 리소스에 적용되어 조직이 클라우드 비용을 절감하는 동시에 예산에서 유연성과 예측 가능성을 제공할 수 있도록 지원합니다.
약정 할인에 대한 자세한 내용은 속도 최적화 기능참조하세요.
가상 머신 약정 할인 적용 범위 측정
다음 FinOps 허브 쿼리를 사용하여 전체 VM 약정 할인 범위를 측정합니다.
Costs
| where ResourceType =~ 'Virtual machine'
| where x_SkuMeterCategory startswith 'Virtual Machines'
//
// Join with prices to filter out ineligible SKUs
| extend tmp_MeterKey = strcat(substring(ChargePeriodStart, 0, 7), x_SkuMeterId)
| project tmp_MeterKey, EffectiveCost, PricingCategory, CommitmentDiscountCategory, ResourceName, x_ResourceGroupName, SubAccountName, BillingCurrency
| join kind=leftouter (
Prices
| where x_SkuMeterCategory startswith 'Virtual Machines'
| summarize sp = countif(x_SkuPriceType == 'SavingsPlan'), ri = countif(x_SkuPriceType == 'ReservedInstance')
by tmp_MeterKey = strcat(substring(x_EffectivePeriodStart, 0, 7), x_SkuMeterId)
| project tmp_MeterKey, x_CommitmentDiscountSpendEligibility = iff(sp == 0, 'Not Eligible', 'Eligible'), x_CommitmentDiscountUsageEligibility = iff(ri == 0, 'Not Eligible', 'Eligible')
) on tmp_MeterKey
| extend x_CommitmentDiscountUsageEligibility = iff(isempty(x_CommitmentDiscountUsageEligibility), '(missing prices)', x_CommitmentDiscountUsageEligibility)
| extend x_CommitmentDiscountSpendEligibility = iff(isempty(x_CommitmentDiscountSpendEligibility), '(missing prices)', x_CommitmentDiscountSpendEligibility)
//
// Sum costs
| summarize
TotalCost = sum(EffectiveCost),
OnDemandCost = sumif(EffectiveCost, PricingCategory == 'Standard'),
SpotCost = sumif(EffectiveCost, PricingCategory == 'Dynamic'),
CommittedCost = sumif(EffectiveCost, PricingCategory == 'Committed'),
CommittedSpendCost = sumif(EffectiveCost, CommitmentDiscountCategory == 'Spend'),
CommittedUsageCost = sumif(EffectiveCost, CommitmentDiscountCategory == 'Usage')
by x_CommitmentDiscountUsageEligibility, x_CommitmentDiscountSpendEligibility, BillingCurrency
| extend OnDemandPercent = round(OnDemandCost / TotalCost * 100, 2)
| extend CoveragePercent = round(CommittedCost / TotalCost * 100, 2)
| extend CoverageUsagePercent = round(CommittedUsageCost / TotalCost * 100, 2)
| extend CoverageSpendPercent = round(CommittedSpendCost / TotalCost * 100, 2)
| order by CoveragePercent desc
다음 쿼리를 사용하여 약정 할인 적용 범위를 포함하여 VM당 비용 분석을 측정합니다.
Costs
| where ResourceType =~ 'Virtual machine'
| where x_SkuMeterCategory startswith 'Virtual Machines'
//
// Join with prices to filter out ineligible SKUs
| extend tmp_MeterKey = strcat(substring(ChargePeriodStart, 0, 7), x_SkuMeterId)
| project tmp_MeterKey, EffectiveCost, PricingCategory, CommitmentDiscountCategory, ResourceName, x_ResourceGroupName, SubAccountName, BillingCurrency
| join kind=leftouter (
Prices
| where x_SkuMeterCategory startswith 'Virtual Machines'
| summarize sp = countif(x_SkuPriceType == 'SavingsPlan'), ri = countif(x_SkuPriceType == 'ReservedInstance')
by tmp_MeterKey = strcat(substring(x_EffectivePeriodStart, 0, 7), x_SkuMeterId)
| project tmp_MeterKey, x_CommitmentDiscountSpendEligibility = iff(sp == 0, 'Not Eligible', 'Eligible'), x_CommitmentDiscountUsageEligibility = iff(ri == 0, 'Not Eligible', 'Eligible')
) on tmp_MeterKey
| extend x_CommitmentDiscountUsageEligibility = iff(isempty(x_CommitmentDiscountUsageEligibility), '(missing prices)', x_CommitmentDiscountUsageEligibility)
| extend x_CommitmentDiscountSpendEligibility = iff(isempty(x_CommitmentDiscountSpendEligibility), '(missing prices)', x_CommitmentDiscountSpendEligibility)
//
// Sum costs by resource
| summarize
TotalCost = sum(EffectiveCost),
OnDemandCost = sumif(EffectiveCost, PricingCategory == 'Standard'),
SpotCost = sumif(EffectiveCost, PricingCategory == 'Dynamic'),
CommittedCost = sumif(EffectiveCost, PricingCategory == 'Committed'),
CommittedSpendCost = sumif(EffectiveCost, CommitmentDiscountCategory == 'Spend'),
CommittedUsageCost = sumif(EffectiveCost, CommitmentDiscountCategory == 'Usage')
by ResourceName, x_ResourceGroupName, SubAccountName, x_CommitmentDiscountUsageEligibility, x_CommitmentDiscountSpendEligibility, BillingCurrency
| extend OnDemandPercent = round(OnDemandCost / TotalCost * 100, 2)
| extend CoveragePercent = round(CommittedCost / TotalCost * 100, 2)
| extend CoverageUsagePercent = round(CommittedUsageCost / TotalCost * 100, 2)
| extend CoverageSpendPercent = round(CommittedSpendCost / TotalCost * 100, 2)
| order by CoveragePercent desc
FinOps 허브에 대한 자세한 내용은 FinOps 허브참조하세요.
쿼리: 가상 머신 확장 집합 세부 정보
이 쿼리는 SKU, 스폿 VM 우선 순위 및 우선 순위 혼합 정책에 따라 Azure 환경에서 Virtual Machine Scale Sets를 분석합니다. 비용 최적화 및 리소스 관리 전략에 대한 인사이트를 제공합니다.
범주
리소스 관리
쿼리
resources
| where type =~ 'microsoft.compute/virtualmachinescalesets'
| extend SpotVMs = tostring(properties.virtualMachineProfile.priority)
| extend SpotPriorityMix = tostring(properties.priorityMixPolicy)
| extend SKU = tostring(sku.name)
| extend resourceGroup = strcat('/subscriptions/', subscriptionId, '/resourceGroups/', resourceGroup)
| project id, SKU, SpotVMs, SpotPriorityMix, subscriptionId, resourceGroup, location
Managed Disks로 마이그레이션
권장 사항: 관리되지 않는 디스크를 사용하여 VM을 관리 디스크로 마이그레이션하여 안정성을 향상시키고, 관리를 간소화하며, 관리되지 않는 디스크의 사용 중지를 준비합니다.
관리되지 않는 디스크 정보
비관리형 디스크는 VHD 파일을 Azure Storage 계정에 페이지 Blob으로 저장하므로, 스토리지 계정의 용량, 성능 및 보안을 직접 관리해야 합니다. 관리 디스크는 스토리지 계정 관리를 처리하여 디스크 관리를 간소화하고, 가용성 집합을 통해 안정성을 높이고, 보다 세부적인 액세스 제어를 제공하며, 디스크 암호화 및 버스팅과 같은 최신 기능을 지원합니다. Microsoft 관리되지 않는 디스크의 사용 중지를 발표했기 때문에 관리 디스크로 마이그레이션하는 것은 비용 최적화 및 규정 준수 단계입니다.
메모
FinOps 허브는 관리되지 않는 디스크를 사용하여 VM을 자동으로 식별할 수 있습니다. 자세히알아보세요.
관리되지 않는 디스크를 사용하여 VM 식별
다음 ARG 쿼리를 사용하여 관리되지 않는 디스크를 계속 사용하는 VM을 식별합니다.
resources
| where type =~ 'microsoft.compute/virtualmachines'
| where isnull(properties.storageProfile.osDisk.managedDisk)
| project
ResourceId = tolower(id),
ResourceName = name,
OsDiskVhd = tostring(properties.storageProfile.osDisk.vhd.uri),
Region = location,
ResourceGroupName = resourceGroup,
SubscriptionId = subscriptionId
쿼리: 가상 머신 프로세서 유형 분석
이 쿼리는 Azure 환경의 VM에서 사용하는 프로세서 유형(ARM, AMD 또는 Intel)을 식별합니다. 워크로드 성능 및 비용 효율성을 최적화하는 데 유용한 다양한 프로세서 아키텍처에서 VM의 배포를 이해하는 데 도움이 됩니다.
범주
리소스 관리
쿼리
resources
| where type == 'microsoft.compute/virtualmachines'
| extend vmSize = properties.hardwareProfile.vmSize
| extend processorType = case(
// ARM Processors
vmSize has "Epsv5"
or vmSize has "Epdsv5"
or vmSize has "Dpsv5"
or vmSize has "Dpdsv", "ARM",
// AMD Processors
vmSize has "Standard_D2a"
or vmSize has "Standard_D4a"
or vmSize has "Standard_D8a"
or vmSize has "Standard_D16a"
or vmSize has "Standard_D32a"
or vmSize has "Standard_D48a"
or vmSize has "Standard_D64a"
or vmSize has "Standard_D96a"
or vmSize has "Standard_D2as"
or vmSize has "Standard_D4as"
or vmSize has "Standard_D8as"
or vmSize has "Standard_D16as"
or vmSize has "Standard_D32as"
or vmSize has "Standard_D48as"
or vmSize has "Standard_D64as"
or vmSize has "Standard_D96as", "AMD",
"Intel"
)
| project vmName = name, processorType, vmSize, resourceGroup
Windows VM에 Azure 하이브리드 혜택 사용
권장 사항: 기존 온-프레미스 Windows Server 라이선스를 사용하여 라이선스 비용을 줄이기 위해 Windows VM에 Azure 하이브리드 혜택 사용하도록 설정합니다.
Windows용 Azure 하이브리드 혜택 정보
Azure 하이브리드 혜택을 사용하면 소프트웨어 보증 또는 Windows Server 구독에서 온-프레미스 Windows Server 라이선스를 사용하여 Azure Windows VM을 저렴한 비용으로 실행할 수 있습니다. 각 VM에서 전체 Windows Server 라이선스를 지불하는 대신 기존 라이선스를 가져오고 기본 컴퓨팅 비용만 지불할 수 있습니다. 이 권장 사항은 조직에서 온-프레미스 Windows Server 라이선스를 한정한 경우에만 적용됩니다.
메모
FinOps Hubs 옵트인 권장 사항으로 Azure 하이브리드 혜택 않고 Windows VM을 자동으로 식별할 수 있습니다. 자세히알아보세요.
쿼리: Azure 하이브리드 혜택이 없는 Windows VM
다음 ARG 쿼리를 사용하여 Azure 하이브리드 혜택 활용하지 않는 Windows VM 및 확장 집합을 식별합니다. 이 쿼리는 이미 라이선스가 할인된 개발/테스트 구독을 제외합니다.
범주
Optimization
쿼리
resourcecontainers
| where type =~ 'Microsoft.Resources/subscriptions'
| where tostring(properties.subscriptionPolicies.quotaId) !has 'MSDNDevTest_2014-09-01'
| project SubscriptionName = name, subscriptionId
| join (
resources
| where type =~ 'microsoft.compute/virtualmachines'
or type =~ 'microsoft.compute/virtualMachineScaleSets'
| where tostring(properties.storageProfile.osDisk.osType) == 'Windows'
or tostring(properties.virtualMachineProfile.storageProfile.osDisk.osType) == 'Windows'
| where tostring(properties.['licenseType']) !has 'Windows'
and tostring(properties.virtualMachineProfile.['licenseType']) != 'Windows_Server'
| project
ResourceId = id,
ResourceName = name,
VMSize = tostring(properties.hardwareProfile.vmSize),
LicenseType = tostring(properties.['licenseType']),
Region = location,
ResourceGroupName = resourceGroup,
subscriptionId
) on subscriptionId
| project
ResourceId,
ResourceName,
VMSize,
LicenseType,
Region,
ResourceGroupName,
SubscriptionName,
SubscriptionId = subscriptionId
SQL VM에 Azure 하이브리드 혜택 사용
권장 사항: 기존 온-프레미스 SQL Server 라이선스를 사용하여 라이선스 비용을 줄이기 위해 SQL Server VM에 Azure 하이브리드 혜택 사용하도록 설정합니다.
SQL VM에 대한 Azure 하이브리드 혜택 정보
SQL ServerAzure 하이브리드 혜택
메모
FinOps Hubs 옵트인 권장 사항으로 Azure 하이브리드 혜택 않고 SQL VM을 자동으로 식별할 수 있습니다. 자세히알아보세요.
쿼리: Azure 하이브리드 혜택 미적용 SQL 가상 머신
다음 ARG 쿼리를 사용하여 Azure 하이브리드 혜택 활용하지 않는 SQL Server VM을 식별합니다. 이 쿼리는 개발/테스트 구독 및 Developer/Express 버전을 제외합니다.
범주
Optimization
쿼리
resourcecontainers
| where type =~ 'Microsoft.Resources/subscriptions'
| where tostring(properties.subscriptionPolicies.quotaId) !has 'MSDNDevTest_2014-09-01'
| project SubscriptionName = name, subscriptionId
| join (
resources
| where type =~ 'Microsoft.SqlVirtualMachine/SqlVirtualMachines'
and tostring(properties.['sqlServerLicenseType']) != 'AHUB'
| project
ResourceId = id,
ResourceName = name,
LicenseType = tostring(properties.['sqlServerLicenseType']),
SQLVersion = tostring(properties.['sqlImageOffer']),
SQLSKU = tostring(properties.['sqlImageSku']),
Region = location,
ResourceGroupName = resourceGroup,
subscriptionId
) on subscriptionId
| join (
resources
| where type =~ 'Microsoft.Compute/virtualMachines'
| project
ResourceName = tolower(name),
VMSize = tostring(properties.hardwareProfile.vmSize),
subscriptionId
) on ResourceName
| where SQLSKU != 'Developer' and SQLSKU != 'Express'
| project
ResourceId,
ResourceName,
VMSize,
LicenseType,
SQLVersion,
SQLSKU,
Region,
ResourceGroupName,
SubscriptionName,
SubscriptionId = subscriptionId
피드백 제공
빠른 검토를 통해 어떻게 하고 있는지 알려주세요. 이러한 검토를 사용하여 FinOps 도구 및 리소스를 개선하고 확장합니다.
특정 항목을 찾고 있는 경우 기존 항목에 투표하거나 새 아이디어를 만듭니다. 다른 사용자와 아이디어를 공유하여 더 많은 표를 얻습니다. 우리는 가장 많은 표를 가진 아이디어에 초점을 맞추고 있습니다.
관련 콘텐츠
관련 리소스:
관련 제품:
관련 솔루션: