Hybrid configurations for aerospike?

setup

#1

I want to configure my aerospike in such way that half of my data is kept in memory and half on SSD. I have total data of 23G.I went through the document on aerospike website about how to configure aerospike and I have tried the following configurations:

service {
    user root
    group root
    paxos-single-replica-limit 1 # Number of nodes where the replica count is automatically reduced to 1.
    pidfile /var/run/aerospike/asd.pid
    service-threads 8
    transaction-queues 8
    transaction-threads-per-queue 4
    proto-fd-max 15000
}

logging {
    # Log file must be an absolute path.
    file /var/log/aerospike/aerospike.log {
            context any info
    }
}

network {
    service {
            address any
            port 3000
    }

    heartbeat {
            mode multicast
            address 239.1.99.222
            port 9918

            # To use unicast-mesh heartbeats, comment out the 3 lines above and
            # use the following 4 lines instead.
            # mode mesh
           # port 3002
           # mesh-address 10.1.1.1
           #  mesh-port 3002

            interval 150
            timeout 10
    }

    fabric {
            port 3001
    }

    info {
            port 3003
    }
 }

    namespace nas  {
     replication-factor 1
   memory-size 27G
   high-water-memory-pct 99
   high-water-disk-pct   99
   storage-engine device {
            file /sd4/aerospikedata/nas
            filesize 50G
            data-in-memory true
    }
}

namespace scratch {
    replication-factor 1
    memory-size 6G
    high-water-memory-pct 99
    high-water-disk-pct   99
    data-in-index true
    single-bin true
    storage-engine device {
            file /sd4/aerospikedata/scratch
            filesize 30G
            data-in-memory true
    }
}

But the problem is that It puts all 23G in memory and also on drive.this is not what i want. How can i modify it achieve what I desire? Any kind of help would be appreciated. Regards


#2

Hammad,

In configuration supported by Aerospike, data is either entirely in memory or entirely on disk.

Can you elaborate on the reasons you are attempting to store some part of the data in memory. Is it the performance concern, or is it some kind of warm and cold data.

– Raj


#3

Yes Sir, It is performance concerned. I don’t have enough ram to store all my data in it. So i thought may be i can store partial data in memory and partial on SD. I was thinking of something like a cache. The records which are read more should be kept in memory and the remaining on the SD. So isn’t there a way other than me explicitly storing portions of data to SD and in memory?