# About data\_in\_memory

**URL:** <https://discuss.aerospike.com/t/about-data-in-memory/3324>\
**Category:** General Discussion\
**Created:** [August 25, 2016, 10:56am UTC](https://discuss.aerospike.com/t/about-data-in-memory/3324 "2016-08-25T10:56:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kiss01](https://avatars.discourse-cdn.com/v4/letter/k/aca169/32.png) [@kiss01](https://discuss.aerospike.com/u/kiss01)\
**Post date:** [August 25, 2016, 10:56am UTC](https://discuss.aerospike.com/t/about-data-in-memory/3324/1 "2016-08-25T10:56:17Z")

</div>

Hi,there, I am new using aerospike.If I set data\_in\_memory true ,the data will store in memory? or it will store in memory and disk.Thanks a lot.

---

<div class="post-metadata">

**Author:** ![rbotzer](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.aerospike.com/rbotzer/32/2114_2.png) [@rbotzer](https://discuss.aerospike.com/u/rbotzer)\
**Post date:** [August 25, 2016, 4:15pm UTC](https://discuss.aerospike.com/t/about-data-in-memory/3324/2 "2016-08-25T16:15:09Z")

</div>

The metadata about each record is always kept in the in-memory [primary index](http://www.aerospike.com/docs/architecture/primary-index.html), while each namespace defines what its [storage](http://www.aerospike.com/docs/operations/configure/namespace/storage) will be. All the records in a given namespace will be stored in the same way. That can be in-memory without persistence, in-memory with persistence, on Disk, or in the index (if the data is small enough).
