Showing posts with label Microsoft Azure portal. Show all posts
Showing posts with label Microsoft Azure portal. Show all posts

Saturday, 13 April 2024

Advancing memory leak detection with AIOps—introducing RESIN

Advancing memory leak detection with AIOps—introducing RESIN

In the ever-evolving landscape of cloud computing, memory leaks represent a persistent challenge—affecting performance, stability, and ultimately, the user experience. Therefore, memory leak detection is important to cloud service quality. Memory leaks happen when memory is allocated but not released in a timely manner unintentionally. It causes potential performance degradation of the component and possible crashes of the operation system (OS). Even worse, it often affects other processes running on the same machine, causing them to be slowed down or even killed.

Given the impact of memory leak issues, there are many studies and solutions for memory leak detection. Traditional detection solutions fall into two categories: static and dynamic detection. The static leak detection techniques analyze software source code and deduce potential leaks whereas the dynamic method detects leak through instrumenting a program and tracks the object references at runtime.

However, these conventional techniques for detecting memory leaks are not adequate to meet the needs of leak detection in a cloud environment. The static approaches have limited accuracy and scalability, especially for leaks that result from cross-component contract violations, which need rich domain knowledge to capture statically. In general, the dynamic approaches are more suitable for a cloud environment. However, they are intrusive and require extensive instrumentations. Furthermore, they introduce high runtime overhead which is costly for cloud services.

Introducing RESIN


Today, we are introducing RESIN, an end-to-end memory leak detection service designed to holistically address memory leaks in large cloud infrastructure. RESIN has been used in Microsoft Azure production and demonstrated effective leak detection with high accuracy and low overhead.

RESIN system workflow


A large cloud infrastructure could consist of hundreds of software components owned by different teams. Prior to RESIN, memory leak detection was an individual team’s effort in Microsoft Azure. As shown in Figure 1, RESIN utilizes a centralized approach, which conducts leak detection in multi-stages for the benefit of low overhead, high accuracy, and scalability. This approach does not require access to components’ source code or extensive instrumentation or re-compilation.

Advancing memory leak detection with AIOps—introducing RESIN

Figure 1: RESIN workflow

RESIN conducts low-overhead monitoring using monitoring agents to collect memory telemetry data at host level. A remote service is used to aggregate and analyze data from different hosts using a bucketization-pivot scheme. When leaking is detected in a bucket, RESIN triggers an analysis on the process instances in the bucket. For highly suspicious leaks identified, RESIN performs live heap snapshotting and compares it to regular heap snapshots in a reference database. After generating multiple heap snapshots, RESIN runs diagnosis algorithm to localize the root cause of the leak and generates a diagnosis report to attach to the alert ticket to assist developers for further analysis—ultimately, RESIN automatically mitigates the leaking process.

Detection algorithms


There are unique challenges in memory leak detection in cloud infrastructure:

  • Noisy memory usage caused by changing workload and interference in the environment results in high noise in detection using static threshold-based approach.
  • Memory leak in production systems are usually fail-slow faults that could last days, weeks, or even months and it can be difficult to capture gradual change over long periods of time in a timely manner.
  • At the scale of Azure global cloud, it’s not practical to collect fine-grained data over long period of time.

To address these challenges, RESIN uses a two-level scheme to detect memory leak symptoms: A global bucket-based pivot analysis to identify suspicious components and a local individual process leak detection to identify leaking processes.

With the bucket-based pivot analysis at component level, we categorize raw memory usage into a number of buckets and transform the usage data into summary about number of hosts in each bucket. In addition, a severity score for each bucket is calculated based on the deviations and host count in the bucket. Anomaly detection is performed on the time-series data of each bucket of each component. The bucketization approach not only robustly represents the workload trend with noise tolerance but also reduces computational load of the anomaly detection.

However, detection at component level only is not sufficient for developers to investigate the leak efficiently because, normally, many processes run on a component. When a leaking bucket is identified at the component level, RESIN runs a second-level detection scheme at the process granularity to narrow down the scope of investigation. It outputs the suspected leaking process, its start and end time, and the severity score.

Diagnosis of detected leaks


Once a memory leak is detected, RESIN takes a snapshot of live heap, which contains all memory allocations referenced by running application, and analyzes the snapshots to pinpoint the root cause of the detected leak. This makes memory leak alert actionable.

RESIN also leverages Windows heap manager’s snapshot capability to perform live profiling. However, the heap collection is expensive and could be intrusive to the host’s performance. To minimize overhead caused by heap collection, a few considerations are considered to decide how snapshots are taken.

  • The heap manager only stores limited information in each snapshot such as stack trace and size for each active allocation in each snapshot.
  • RESIN prioritizes candidate hosts for snapshotting based on leak severity, noise level, and customer impact. By default, the top three hosts in the suspected list are selected to ensure successful collection.
  • RESIN utilizes a long-term, trigger-based strategy to ensure the snapshots capture the complete leak. To facilitate the decision regarding when to stop the trace collection, RESIN analyzes memory growth patterns (such as steady, spike, or stair) and takes a pattern-based approach to decide the trace completion triggers.
  • RESIN uses a periodical fingerprinting process to build reference snapshots, which is compared with the snapshot of suspected leaking process to support diagnosis.
  • RESIN analyzes the collected snapshots to output stack traces of the root.

Mitigation of detected leaks


When a memory leak is detected, RESIN attempts to automatically mitigate the issue to avoid further customer impact. Depending on the nature of the leak, a few types of mitigation actions are taken to mitigate the issue. RESIN uses a rule-based decision tree to choose a mitigation action that minimizes the impact.

If the memory leak is localized to a single process or Windows service, RESIN attempts the lightest mitigation by simply restarting the process or the service. OS reboot can resolve software memory leaks but takes a much longer time and can cause virtual machine downtime and as such, is normally reserved as the last resort. For a non-empty host, RESIN utilizes solutions such as Project Tardigrade, which skips hardware initialization and only performs a kernel soft reboot, after live virtual machine migration, to minimize user impact. A full OS reboot is performed only when the soft reboot is ineffective.

RESIN stops applying mitigation actions to a target once the detection engine no longer considers the target leaking.

Result and impact of memory leak detection


RESIN has been running in production in Azure since late 2018 and to date, it has been used to monitor millions of host nodes and hundreds of host processes daily. Overall, we achieved 85% precision and 91% recall with RESIN memory leak detection, despite the rapidly growing scale of the cloud infrastructure monitored.

The end-to-end benefits brought by RESIN are clearly demonstrated by two key metrics:

1. Virtual machine unexpected reboots: the average number of reboots per one hundred thousand hosts per day due to low memory.
2. Virtual machine allocation error: the ratio of erroneous virtual machine allocation requests due to low memory.

Between September 2020 and December 2023, the virtual machine reboots were reduced by nearly 100 times, and allocation error rates were reduced by over 30 times. Furthermore, since 2020, no severe outages have been caused by Azure host memory leaks.

Source: microsoft.com

Saturday, 16 December 2023

Create new ways to serve your mission with Microsoft Azure Space

Create new ways to serve your mission with Microsoft Azure Space

Since launching Microsoft Azure Space, we’ve been focused on three main goals:

1. Connect anyone, anywhere, at any security level, back to the full power and potential of the Microsoft Cloud. This includes working with exciting space start-ups like Muon Space and True Anomaly as well as government agencies like the United States Space Force.

2. Enable real-time analysis across petabytes of data gathered on orbit, so that our customers can take immediate action that delivers on their mission.

3. Empower developers to develop, deploy, and run their applications on orbit.

Create new ways to serve your mission with Microsoft Azure Space

As customers and partners have adopted and experimented with the Azure Space portfolio, new and interesting use cases are emerging that illustrate what’s possible. Today, we are excited to share some of those customer stories, along with updates for Azure Orbital Ground Station, Azure Orbital’s software development kit, and Microsoft Planetary Computer. While it is still early days, these stories offer a glimpse at understanding how an accessible space layer can transform the way organizations across the public and private sectors serve their missions.

Satellite operators are using Azure Orbital Ground Station for spacecraft communications


Delivering space data to Earth requires a secure, robust ground network with low latency and high throughput—presenting various challenges for the operator. Opportunities for satellite contacts are limited by ground station coverage, and it can be difficult and expensive to achieve sufficient capacity.

Azure Space is enabling partner-powered, space-to-cloud transmissions with end-to-end support for space data downlink, processing, storage, analytics, and dissemination. Azure Orbital Ground Station provides easy, secure access to communication products and services required to support all phases of satellite missions—from launch to operations and decommissioning. Mission operations are seamless with self-service scheduling of contacts in Microsoft Azure with a managed data path.

Muon Space collaborates with Microsoft for its first two launches


As previously announced, Muon Space selected Microsoft to support its first-ever launch, using Azure Orbital Ground Station as the sole ground provider for their MuSat-1 mission. Muon Space is ramping up for the launch of its second satellite, MuSat-2, in early 2024—again leveraging Azure Orbital Ground Station to bring down data gathered by a prototype microwave sensor. Muon Space will provide space weather and ionospheric data to the United States Space Force.

“Launch and early operations is always a very stressful period for satellite operators. With Azure Orbital, we achieved contact with MuSat-1 within six minutes of separation from the launch vehicle. This early success, along with our continuous on-orbit operations, gives us confidence to use Azure Orbital for future missions.”

Paige Holland, Operations Automation Lead, Muon Space

Create new ways to serve your mission with Microsoft Azure Space

Azure Orbital Ground Station for government customers


We’ve seen increasing momentum with commercial customers adopting Azure Orbital Ground Station. Azure Orbital Ground Station is now available in preview within the Microsoft Azure Government region. Introducing Azure Orbital Ground Station into Azure Government enables government customers to fully leverage a global partner ecosystem of ground stations, cloud modems, self-service scheduling, and a managed data path.

True Anomaly and Viasat are leveraging Azure Orbital Ground Station in Azure Government for space domain awareness


True Anomaly selected Microsoft and Viasat to provide ground support for its upcoming launch of two Jackal spacecrafts—autonomous orbital vehicles for rendezvous and proximity operations. True Anomaly will schedule satellite contacts at Viasat Real Time Earth (RTE) sites using Azure Orbital Ground Station in Azure Government.

“Azure Orbital Ground Station’s managed data path makes it easy to connect to a global ground network. With one click of a button on Azure, we gain access to all Viasat Real Time Earth sites and simply indicate where the data from our spacecraft should land, while Microsoft handles the orchestration and connectivity. Working within Azure Government lets us meet our customers where they are.”

Jared Kirkpatrick, Jackal Block 1 Project Manager, True Anomaly

Create new ways to serve your mission with Microsoft Azure Space

Provisioning fiber to Viasat sites


To provide customers with their data as quickly and securely as possible, Microsoft is provisioning high-speed, real-time cloud connectivity to select Viasat RTE sites, allowing customers to stream multi-gigabit per second downlinks.

“Viasat is collaborating with Microsoft to enable low-touch access to space communication solutions for our customers like True Anomaly. Azure Orbital Ground Station offers a common data plane and API to access our global antenna network that includes very high throughput data downlinks over Ka-band.”

Aaron Hawkins, Real Time Earth Director for Strategic Partnerships, Viasat

Create new ways to serve your mission with Microsoft Azure Space

Gaining insights from space data


As the volume and value of space data continues to grow, having easy and affordable access to ground infrastructure will play a central role in serving customers’ mission-critical operations. So too will be the ability of customers to access and analyze near real-time data gathered from space.

The future of the cloud will incorporate space solutions such as satellite connectivity and Earth observational data. Space-based sensors observing Earth and satellite data will increasingly be used to improve our data insights on the ground.

The latest episode in the Microsoft Future of the Cloud Webinar series explores the role of space data in creating “a planetary computer for a sustainable future.”

Watch the series to learn about:

  • Leveraging the potential of the cloud and space to enable data-driven decision making for your organization and missions.
  • How Microsoft Planetary Computer supports global efforts of environmental sustainability and Earth science by enabling developers to build tools for measuring, monitoring, modeling, and managing healthy ecosystems.
  • The potential opportunities that a new Azure Space data solution built on the Microsoft Planetary Computer will create for Microsoft’s customers to unlock the full potential of their Earth observation data.

Empowering developers to build, deploy, and operate on-orbit


Empowering any developer to build and deploy applications into space will be critical to lowering the barrier to entry for participating in the space industry. Azure Orbital’s software development kit provides satellite operators with the tools and capabilities to unlock new business models and enable mission requirements.

Loft Orbital customer onboarding for virtual missions on YAM-6 is now open


Over the past two years, Microsoft and Loft Orbital have been collaborating to lower the barriers to entry for space. A key pillar in this collaboration has been the enablement of “virtual missions,” making it easier for developers to access space capabilities without having to develop or launch their own hardware in space, and instead by simply writing software applications.

YAM-6 is the first satellite fully dedicated to offering this capability. Last week, we announced that YAM-6 is now publicly accepting customers for virtual missions for 2024. General availability is planned for April 2024.

“Our joint product offering leverages Loft’s space infrastructure and Microsoft’s cloud and ground infrastructure to make it simple for anyone to deploy AI applications in space at scale. YAM-6 is supported by the Azure Orbital product portfolio, including Azure Orbital Ground Station, Azure Orbital space edge on-orbit application framework.”

Pierre Damien Vaujour, Cofounder and Chief Executive Officer, Loft Orbital

Create new ways to serve your mission with Microsoft Azure Space

Space Compass leveraging virtual missions to prove out concepts quickly


Space Compass—a joint venture company between NTT, Japanese Information and Communications Technology (ICT) leader, and SKY Perfect JSAT Corporation, Asia’s largest satellite operator—is on a multi-year mission to deploy space-edge computing capabilities together with an ultra-speed optical data relay network. This will allow space data users to utilize real-time data much more efficiently in the cloud environment (see Figure 1).

Over the past three months, Space Compass has been working with Microsoft to explore use cases in an effort to better understand and demonstrate the value of on-orbit processing, and how to shape their future space infrastructure to support it.

“We are very excited to closely collaborate with the Microsoft team to develop a cutting-edge space computing solution. This is one of our key initiatives to realize the Space Integrated Computing Network.”

Shigehiro Hori, Co-Chief Executive Officer, Space Compass

Create new ways to serve your mission with Microsoft Azure Space

Space Compass will be running a virtual mission on YAM-6 to demonstrate AI-based ship detection. This demonstration paves the way and de-risks future missions that will be flown on Space Compasses’ own satellites.

Create new ways to serve your mission with Microsoft Azure Space
Figure 1: Ship detection program.

Both Microsoft and Space Compass believe in the power of on-orbit processing, bringing AI to the edge in space with high-speed connectivity to the cloud.

Source: microsoft.com