Movatterモバイル変換


[0]ホーム

URL:


Skip to content
DEV Community
Log in Create account

DEV Community

Cover image for Automated Aerospike All Flash Setup
Aerospike profile imageKen Tune
Ken Tune forAerospike

Posted on

     

Automated Aerospike All Flash Setup

Introduction

Aerospike is a key value database maximising SSD/Flash technology in order to offer best in class throughput and latency at petabyte scale.

Standard Aerospike usage will have the primary key index in DRAM and the data on SSD. Although Aerospike's usage of DRAM is very low at 64 bytes per object, for very large numbers of objects (100bn+) users might wish to consider the all-flash mode in which the primary key index is also placed on disk. More detail atall flash usage.

There are a number of non-trivial steps to go through to set up all flash. For that reason I've extendedaerospike-ansible to allow automation of this process. This article walks through the automated process. It's envisaged that this will be useful for those evaluating the feature, or looking to get up and running with it quickly.

A working knowledge ofaerospike-ansible is assumed. Thisintroductory article may also be useful.

All Flash Calculations

In order to correctly configure a system for all flash, you need to know the number ofpartition-tree-sprigs that are appropriate for the object count you will have in your database. You can think of a partition tree sprig as a mini primary key index - we use these in order to have a lower depth primary key tree, allowing us to lookup record location more rapidly. More detail atsprigs.

It's important for all-flash because we size the system so the sprigs fit inside single disk blocks, minimising read and write overhead.

You can find details of the calculationhere, but to make life easier a spreadsheet can be found inaerospike-ansible atassets/all-flash-calculator.xlsx.

all-flash-calculator.xlsx

Populate the yellow cells - # of objects, replication factor and object size.

The spreadsheet will calculate required partition-tree-sprigs.

It will also determine the fraction of available disk space that should be given over to the primary key index, based on the object size. In the screenshot, we can see that for 100m records, replication factor 2, average record size 1024 bytes, the overhead per record is 172 bytes and the overall record footprint is 2220 bytes, so approx 1/13 of the disk space should be allocated to the index.

Using Aerospike-Ansible

Invars/cluster-config.yml

  • Setpartitions_per_device to the value given in the spreadsheet - 13 in the example. The first partition on each device is used for the all flash index to ensure the correct index:data disk space ratio.
  • Addpartition_free_sprigs: YOUR_VALUE - YOUR_VALUE would be 1024 for this example

You will also need to

  • Setall_flash: true
  • Setenterprise: true
  • Provide a path to a valid Aerospike feature key usingfeature_key: /your/path/to/key. You must therefore be either a licensed Aerospike customer, or running an Aerospike trial.

Having done that

ansible-playbook aws-setup-plus-aerospike-install.yml

You should check that the aggregate disk space across your cluster exceeds the amount recommended in the spreadsheet.

Verification

Once the setup process is complete, log into one of your cluster nodes

./scripts/cluster-quick-ssh.sh
Enter fullscreen modeExit fullscreen mode

then accessasadm (admin tool) followed byinfo command

asadm

The index type comes up as 'flash' as per the highlight.

Data Load

You can follow the instructions inbenchmarking to quickly load some data into the new configuration.

As before, we can use asadm to examine the (highlighted) disk footprint of the primary key index for (in this case) 10m records (20m includes replicas).

asadm-2

Conclusion

Theaerospike-ansible tooling makes it easy to set up all flash for Aerospike and benefit from the DRAM saving it offers.


Cover imageMichał Mancewicz

Top comments(0)

Subscribe
pic
Create template

Templates let you quickly answer FAQs or store snippets for re-use.

Dismiss

Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment'spermalink.

For further actions, you may consider blocking this person and/orreporting abuse

NoSQL Data Platfom

Are you developing on Aerospike and want to contribute to our dev community?
Our community repo is on GitHub and we’d love to hear how you’re using Aerospike by contributing articles to our community.

More fromAerospike

DEV Community

We're a place where coders share, stay up-to-date and grow their careers.

Log in Create account

[8]ページ先頭

©2009-2025 Movatter.jp