Linux on Azure

Linux on Azure: Optimizing Cost, Performance, and Security

September 23, 2020

Topics: Azure NetApp Files AzureAdvanced8 minute read

What Is Linux on Azure?

Azure Virtual Machines (VM) are a commonly used resource in Azure, enabling scalable, on-demand computing to users. VMs are a foundation of Azure’s Infrastructure as a Service (IaaS) offering. These machines enable you to create custom environments that can serve as remote desktops, application hosts, or workload processors. One of the benefits of VMs over other Azure resources is that you can specify exactly what OS you want your environment to have.

In Azure, this means you can select from a range of supported Linux distributions. Through the Azure Marketplace, you can currently find machine images for Ubuntu, Debian, SUSE Linux Enterprise, CentOS, CoreOS, and Red Hat Enterprise. Azure is also actively working with a variety of Linux communities to add support for more distributions.

Additionally, you can bring your own Linux image if the distribution you want isn’t currently available in the Marketplace. To do this, you need to create and upload the version as a Linux virtual hard drive (VHD) which you can then attach to your VM.

In this article, you will learn:

Types of Linux Virtual Machines in Azure

When planning to run Linux in Azure, you need to choose a machine type that fits your workload requirements. There are six categories of VMs to choose from with subtypes or “sizes” of each.

Type

Description

Sizes

General purpose

Designed to provide a balance of CPU-to-memory. Common uses include low to medium traffic web servers, small to medium databases, and development and testing environments.

B, Dsv2, Dsv3, Dsv4, Dv2, Dv3, Dv4, Dasv4, Dav4, DC, DCv2, Ddv4, Ddsv4, Av2

Compute optimized

Designed to prioritize CPU over memory resources. Common uses include application servers, batch processing, network appliances, and medium traffic web servers.

Fsv2

Memory optimized

Designed to prioritize memory over CPU resources. Common uses include in-memory analytics, relational database server, and medium to large caches.

Esv3, Esv4, Ev3, Ev4, Easv4, Eav4, Edv4, Edsv4, Mv2, M, DSv2, Dv2

Storage optimized

Designed for high IO and disk throughout. Common uses include transactional databasing, data warehouses, and big data.

Lsv2

GPU

Designed for accelerated processing with one or more GPUs. Common uses include training deep learning models, video editing, and heavy graphic rendering.

NC, NCv2, NCv3, ND, NDv2 (Preview), NV, NVv3, NVv4

High performance compute

Designed to provide high CPU resources and high-throughput networking. Common use cases include big data analytics, predictive models, and data streaming.

H, HC, HB, HBv2

For more information, you can see details in the official documentation here.

Linux VM Pricing Models

After your machine type is selected, there are three main payment models you can choose from.

Pay as you go
The pay as you go model charges for any compute resources you use by the second. It requires no contracts and is billed after use. You can scale use as needed and on-demand.

This model is recommended for users who:

  • Want to control cost without giving up flexibility
  • Have high priority applications with variable workloads
  • Want to develop or test applications on VMs

Reserved VM Instances
Reserved instances are VMs that you agree to use for a one or three year period and pay for in advance. In exchange for this commitment, you get a 72% discount over pay as you go pricing. These instances are still somewhat flexible and you can return or exchange instances as needed.

This model is recommended for users who:

  • Have applications with predictable workloads
  • Want or need to budget in advance
  • Have long term workloads or plans

Spot Pricing
Spot pricing is an option that enables you to access surplus capacity from random servers. With this method, your cost is discounted by up to 90% off pay as you go costs but sacrifice reliability.

The availability of these machines is unpredictable, although there are usually resources available. However, where resources are located changes frequently and your workloads are booted if the host server requests the resources you’re using.

This model is recommended for users who:

  • Are on a very tight budget
  • Are using low priority applications that can be interrupted without issue
  • Have flexible workloads with no SLA or timeframe

Best Practices To Optimize Azure Linux VMs Costs

Optimizing your cloud costs is an essential part of ensuring that cloud resources are budget friendly and maximizing your ROI. Although some workloads do not allow for much flexibility, there are some practices that can help reduce your costs for most use cases.

Consider B-Series VMs

B-series machines are designed for burst processing and are best used for workloads that are usually idle with occasional activity peaks. These VMs are always available and enable you to work within throughput and IO caps over a given period. This helps reduce your cost by ensuring that you aren’t paying for the maximum amount of capacity at all times.

Find the Right Resource Size

Right-sizing your VMs helps ensure that you are not paying for excess resources or impeding performance with too few resources. Azure offers tools to help you right-size and you can use metrics available through Azure Portal to gauge your current use. In general, if you are using 50% or less of your allotted resources, it’s safe to downsize.

Azure Spot VMs for Batch Processing

While Spot VMs are not suited for many common uses, these machines are good for interruptible processes, like batch processing. Any workloads that you would typically run in the background of your machines can be considered for these VMs.

Take Advantage of Azure Hybrid Benefit

Hybrid Benefit is an option that enables you to bring existing SQL and Windows Server licenses to your VMs. Rather than paying for this licensing with your machine costs, you can continue paying down existing technical debt without interrupting your operations.

Best Practices To Secure and Optimize Azure Linux VMs

In addition to optimizing costs, you should pay attention to maximizing the security and performance of your VMs. Investing in resources without ensuring their functionality or privacy negates any cost savings you might achieve.

Optimize Networking

Network performance varies by VM size, so you need to ensure that the size you choose provides adequate bandwidth. You might also consider adopting VMs that support Accelerated Networking. This functionality provides low latency and CPU utilization via single-root input/output virtualization (SR-IOV) bypasses.

Security Center

Azure Security Center is a native service that you can use to evaluate your security posture in Azure. It can identify potential vulnerabilities and recommend fixes to increase your security. You can also use Security Center to monitor your VMs and applications and manage security though policies.

Backup

Although Azure offers durability guarantees, you should still backup your VMs for disaster recovery purposes. You can manually perform these backups or use Azure Backup to script automatic backups during off-hours.

Linux on Azure with Azure NetApp Files

Azure NetApp Files is a Microsoft Azure file storage service built on NetApp technology, giving you the file capabilities in Azure even your core business applications require.

Get enterprise-grade data management and storage to Azure so you can manage your workloads and applications with ease, and move all of your file-based applications to the cloud.

Azure NetApp Files solves availability and performance challenges for enterprises that want to move mission-critical applications to the cloud, including workloads like HPC, SAP, Linux, Oracle and SQL Server workloads, Windows Virtual Desktop, and more.

In particular, Azure NetApp Files allows you to migrate your Linux applications to Azure–even your business-critical workloads–with extreme file throughput with sub-millisecond response times.

Want to get started? See Azure NetApp Files for yourself with a free demo.

Learn More About Linux on Azure

Read more in our series of guides about Linux on Azure

Ready to Solve Your Enterprise Linux File Requirements in Azure?
Azure provides robust support for Linux workloads, provided you familiarize yourself with its capabilities. This means understanding what resources are available to you in Azure and through its partnerships with services like Azure NetApp Files.

This article explains common challenges of using Linux file shares in the cloud, how you can set up files shares easily with Azure NetApp Files, and a few benefits of using Azure NetApp Files.

Read more: Ready to Solve Your Enterprise Linux File Requirements in Azure?

Build Your Own Azure NFS? Wrestling Linux File Shares into Cloud
Deploying Linux file shares in the cloud can present a challenge which may cause organizations to delay migration. This works temporarily but movement to the cloud is inevitable for many organizations and putting it off may end up costing you more.

This article explains what files services are available in Azure, what Azure NetApp Files is and the benefits it provides, and how you can use Azure NetApp Files to move Linux file shares easily.

Read more: Build Your Own Azure NFS? Wrestling Linux File Shares into Cloud

Linux on Azure Workload Migration: Challenges and Solutions
Migrating workloads to the cloud can be time consuming and challenging. While moving data you need to ensure that your production system continues to operate smoothly while ensuring that your new system is ready for a smooth transition.

This article explains some challenges you may face when migrating Linux workloads to Azure, how Azure NetApp Files can make the process easier, and how Azure NetApp Files features support smooth migrations in general.

Read more: Linux on Azure Workload Migration: Challenges and Solutions

Azure NetApp Files Benchmarks
When choosing a solution to support your Linux workloads in Azure, it’s important to understand how it performs. This includes benchmarking throughput and IOPS for scale out and scale up operations.

This article highlights important benchmarks for Linux with Azure NetApp Files.

Read more: Azure NetApp Files Benchmarks

NetApp Predicts: More Than 80% of Azure VMs Will be Linux
Linux workloads are increasingly popular for enterprise workloads and this number is expected to continue climbing. This growth is driving the need for comprehensive support of Linux in all cloud environments, including Azure.

This is a webinar covering how Azure NetApp Files supports Linux in Azure and how you can use it to run Linux workloads in the cloud.

Read more: NetApp Predicts: More Than 80% of Azure VMs Will be Linux


See Our Additional Guides on Key IaaS Topics

Together with our content partners, we have authored in-depth guides on several other topics that can also be useful as you explore the world of IaaS.

Cloud Migration

Learn about cloud migration and what major challenges to expect when implementing a cloud migration strategy in your organization. 

See top articles in our cloud migration strategy guide:

AWS Migration

Learn about Amazon’s basic framework for migration, and how to plan for common challenges that affect almost every migration project.

See top articles in our AWS migration guide:

AWS High Availability

Discover how highly available systems are reliable and resilient and see how AWS can help you achieve high availability for cloud workloads, across 3 dimensions.

See top articles in our AWS high availability guide:

AWS EBS

Learn what is AWS EBS and how to perform common EBS operations. Including five highly useful EBS features that can help you optimize performance and billing. 

See top articles in our guide to AWS EBS:

AWS Cost

Learn how Amazon Web Services (AWS) prices its cloud services and what you can do to optimize your costs in the Amazon cloud.

See top articles in our AWS cost optimization guide:

AWS EFS

Learn about AWS EFS, your backup options, how to optimize performance, see a brief comparison of EFS vs EBS vs S3, and discover how Cloud Volumes ONTAP can help.

See top articles in our guide to AWS EFS:

Azure Migration

Learn about aspects of considerations when implementing Azure migration: migration models, state assessment, storage configuration, security, and maintenance. 

See top articles in our Azure migration guide:

Azure Cost Management

Learn about tools and practices that can help you manage and optimize costs on the Microsoft Azure cloud.

See top articles in our Azure cost management:

Azure High Availability

High availability is one of the major benefits of cloud services. The guarantee that your data will remain accessible is critical to supporting high priority workloads and applications and is the reason many move to the cloud in the first place.

This guide explains what high availability is and how to optimize Azure high availability.

See top articles in our Azure high availability guide:

SAP on Azure

Learn about all SAP solutions offered as a service on Azure, including HANA, S/4HANA, NetWeaver and Hybris, migration considerations and best practices.

See top articles in our guide to SAP on Azure:

Kubernetes in Azure

Authored by NetApp

Learn how to run Kubernetes clusters and containerized applications in Azure, using the Azure Kubernetes Service (AKS), Azure Container Instances (ACI), and related services.

HPC on Azure

Discover services and techniques for cloud-based HPC, including unique Azure HPC features and use cases. 

See top articles in our guide to HPC on Azure:

VDI on Azure

Learn what options are available for VDI on Azure. Understand how the architecture works and discover best practices for VDI deployments.

See top articles in our guide to VDI on Azure:

Google Cloud Migration

Learn how to migrate your workloads and data to Google Cloud, including in-depth comparisons between GCP and other cloud providers, tools, strategies, costs, and more.

See top articles in our guide on Google Cloud migration:

VMware Cloud

Learn how VMware partners with public cloud providers to help users run virtualized workloads in a cloud environment.

See top articles in our guide on VMware Cloud:

AWS FSx

Learn about Amazon FSx, a fully managed service that lets you run managed Windows Server and Lustre file systems to support high performance and high throughput data scenarios.

Google Cloud Pricing

Learn how Google Cloud prices its cloud services and what you can do to optimize and reduce your costs in Google Cloud.

Kubernetes on AWS

Learn how to run Kubernetes clusters and containerized applications in AWS, using the Elastic Kubernetes Service (EKS), Amazon Fargate, and related services.

Cloud Data Services

-