C++ Memory Model: Migrating from X86 to ARM

02ARM, C++, General, x86Tags: , , , , ,

Over the past years, we have seen a shift in processors from the previously dominant x86 architecture to the more energy-efficient (and often cheaper) ARM architecture. This trend is true for both consumer hardware, e.g., Apple’s M1 SoC and also server hardware, e.g. AWS’s Gravitron processor. Given that the ARM architecture has a more relaxed memory model, this might have some subtle impact on C++ programs…

With the introduction of multi-threaded execution in C++11, the standard also introduced a memory model. For many developers, this memory model is one of the least well-understood parts of the C++ standard and a common source of confusion. While an in-depth explanation of the C++ memory model is beyond this blog post’s scope, we will cover some basics and take a brief look at two of the most common hardware memory models and how the C++ memory model maps to these hardware models.

But first, let’s take a step back and consider why we need a memory model in the first place.

More info

ArangoML Series: Multi-Model Collaboration

00ArangoML, General, Graphs, Machine LearningTags: , , ,

Multi-Model Machine Learning

This article looks at how a team collaborating on a real-world machine learning project benefits from using a multi-model database for capturing ML meta-data.

The specific points discussed in this article are how:

  • The graph data model is superior to relational for ML meta-data storage.
  • Storing ML experiment objects is natural with multi-model.
  • ArangoML promotes collaboration due to the flexibility of multi-model.
  • ArangoML provides ops logging and performance analysis.
ArangoML Pipeline Complete pipeline - ArangoDB Machine Learning
More info

ArangoML Series: Intro to NetworkX Adapter

00ArangoML, General, Graphs, how to, Machine LearningTags: , , , , ,

This post is the fifth in a series of posts introducing the ArangoML features and tools. This post introduces the NetworkX adapter, which makes it easy to analyze your graphs stored in ArangoDB with NetworkX.

In this post we:

  • Briefly introduce NetworkX
  • Explore the IMDB user rating dataset
  • Showcase the ArangoDB integration of NetworkX
  • Explore the centrality measures of the data using NetworkX
  • Store the experiment with arangopipe

This notebook is just a slice of the full-sized notebook available in the ArangoDB NetworkX adapter repository. It is summarized here to better fit the blog post format and provide a quick introduction to using the NetworkX adapter. 

ArangoML Pipeline Cloud graphic showing an example machine learning pipeline
More info

ArangoML Part 4: Detecting Covariate Shift in Datasets

00ArangoML, General, Graphs, Machine LearningTags: ,

This post is the fourth in a series of posts introducing ArangoML and showcasing its benefits to your machine learning pipelines. Until now, we have focused on ArangoML’s ability to capture metadata for your machine learning projects, but it does much more. 

In this post we:

  • Introduce the concept of covariate shift in datasets
  • Showcase the built-in dataset shift detection API
ArangoML Pipeline Complete pipeline - ArangoDB Machine Learning
More info

A story of a memory leak in GO: How to properly use time.After()

00GeneralTags: ,

Recently, we decided to investigate why our application ARANGOSYNC for synchronizing two ArangoDB clusters across data centers used up a lot of memory – around 2GB in certain cases. The environment contained ~1500 shards with 5000 GOroutines. Thanks to tools like pprof (to profile CPU and memory usage) it was very easy to identify the issue. The GO profiler showed us that memory was allocated in the function time.After() and it accumulated up to nearly 1GB. The memory was not released so it was clear that we had a memory leak. We will explain how memory leaks can occur using the time.After() function through three examples.

More info

Do you like ArangoDB?
icon-githubStar this project on GitHub.
close-link