Linux on Azure

Linux on Azure: Optimizing Cost, Performance, and Security

[Azure, Azure NetApp Files, Advanced, 8 minute read, Linux on Azure]

What Is Linux on Azure?

Azure Virtual Machines (VM) are a commonly used resource in Azure, enabling scalable, on-demand computing to users. 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

-