Aerospike Config for a Small Server

709 views Asked by At

I'd like to know what the ideal Aerospike namespace configuration is for a mini (staging) server on Ubuntu 12.04 with 1 GB ram and 1 GHz CPU

Some requirements: 1. I'd like to persist data permanently on disk (not using it as a cache). 2. I'm only using a single node 3. I don't want a limit on the filesize of my data

Here's my current config snippet I'm using:

namespace default {
        replication-factor 1
        memory-size 1G
        default-ttl 0 # not sure if this is for cache or disk

        storage-engine device {
                file /opt/aerospike/data/default.dat
                filesize 2T
                data-in-memory true
        }
}

Thanks

1

There are 1 answers

3
kporter On BEST ANSWER
  1. Aerospike doesn't cache data-in-memory. If data-in-memory is set to true then all of your data must fit in RAM.
  2. On a single node you will not be affected by the replication-factor parameter.
  3. Aerospike has a limit of 2 TiB per file, but you can create multiple files of this size and Aerospike will distribute data across them. When going through a filesystem, having multiple files often helps. Also if you are going to use a filesystem then you may wan to look into disabling atime when mounting the disks.
  4. default-ttl is how long the server will keep a record after it is written by default (can be overridden by your application). A default-ttl of 0 mean to never expire or evict data.

Example config with multiple files:

namespace default {
        replication-factor 1
        memory-size 1G
        default-ttl 0 # (This applies to the primary index)

        storage-engine device {
                file /opt/aerospike/data/file0.dat
                file /opt/aerospike/data/file1.dat
                file /opt/aerospike/data/file2.dat
                file /opt/aerospike/data/file3.dat
                file /opt/aerospike/data/file4.dat
                file /opt/aerospike/data/file5.dat
                filesize 2T
                data-in-memory true
        }
}