# Relationship to parameter memory-size and filesize

**URL:** <https://discuss.aerospike.com/t/relationship-to-parameter-memory-size-and-filesize/157>\
**Category:** Configuration\
**Created:** [August 16, 2014, 12:05am UTC](https://discuss.aerospike.com/t/relationship-to-parameter-memory-size-and-filesize/157 "2014-08-16T00:05:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![oldforum](https://avatars.discourse-cdn.com/v4/letter/o/13edae/32.png) [@oldforum](https://discuss.aerospike.com/u/oldforum)\
**Post date:** [August 16, 2014, 12:05am UTC](https://discuss.aerospike.com/t/relationship-to-parameter-memory-size-and-filesize/157/1 "2014-08-16T00:05:46Z")

</div>

I’m using Aerospike In-Memory + HDD disk Persistence.

What’s the relationship to parameter memory-size and filesize in aerospike.conf? Shall they be equal or filesize \> memory-size? (Any formula for it?) (Assume only one data file used)

```auto
namespace test {
        replication-factor 2
        memory-size 50G
        default-ttl 0 # Never expire/evict.
        ldt-enabled true

        storage-engine device {
               file /aerospike/data/test.dat
               filesize 64G
               data-in-memory true # Store data in memory in addition to file.
        }
}

```

---

<div class="post-metadata">

**Author:** ![bayoukingpin](https://avatars.discourse-cdn.com/v4/letter/b/e68b1a/32.png) [@bayoukingpin](https://discuss.aerospike.com/u/bayoukingpin)\
**Post date:** [August 16, 2014, 12:06am UTC](https://discuss.aerospike.com/t/relationship-to-parameter-memory-size-and-filesize/157/2 "2014-08-16T00:06:32Z")

</div>

We have some good formulas in the capacity planning page explaining overheads and memory:

[http://www.aerospike.com/docs/operations/plan/capacity/](http://www.aerospike.com/docs/operations/plan/capacity/)

As a rule of Thumb for data in-memory with Persistence on Disk:

Filesize = 2 x (Memory Size)

Remember that each record with have an overhead of 64 bytes in memory for the primary index.

and 128k on disk (default write block size)
