# Where does dgraph store all its data on-disk?

**URL:** <https://discuss.dgraph.io/t/where-does-dgraph-store-all-its-data-on-disk/1567>\
**Category:** Users\
**Created:** [June 21, 2017, 12:10am UTC](https://discuss.dgraph.io/t/where-does-dgraph-store-all-its-data-on-disk/1567 "2017-06-21T00:10:35Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![georgecapsule8](https://avatars.discourse-cdn.com/v4/letter/g/ed8c4c/32.png) [@georgecapsule8](https://discuss.dgraph.io/u/georgecapsule8)\
**Post date:** [June 21, 2017, 12:10am UTC](https://discuss.dgraph.io/t/where-does-dgraph-store-all-its-data-on-disk/1567/1 "2017-06-21T00:10:35Z")

</div>

Where does dgraph store all its on-disk files ?

I’m doing some disk storage benchmarking and need to know the on-disk footprint for various use cases.

Currently, I specify write-ahead and posting lists directories via the “-p” and “-w”, setting both to the same directory. Then I run some mutations, wait for the batches to process, and then get the size of that directory.

Is there some other storage I might be missing ?

Thanks !

---

<div class="post-metadata">

**Author:** ![mrjn](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/mrjn/32/775_2.png) [@mrjn](https://discuss.dgraph.io/u/mrjn)\
**Post date:** [June 21, 2017, 9:23pm UTC](https://discuss.dgraph.io/t/where-does-dgraph-store-all-its-data-on-disk/1567/2 "2017-06-21T21:23:13Z")

</div>

> [@georgecapsule8](#):
>
> I specify write-ahead and posting lists directories via the “-p” and “-w”, setting both to the same directory.

Don’t do that. These directories need to be separate.

Dgraph stores it’s state in p directory, and write ahead log in w. If you want to check the on-disk files, you should write your data, and shutdown dgraph, so it will push everything it has in memory to disk. Note that the disk usage shown by w can vary depending upon how many logs it carries. These logs though get periodically deleted, and will get purged later.

---

<div class="post-metadata">

**Author:** ![georgecapsule8](https://avatars.discourse-cdn.com/v4/letter/g/ed8c4c/32.png) [@georgecapsule8](https://discuss.dgraph.io/u/georgecapsule8)\
**Post date:** [June 21, 2017, 9:29pm UTC](https://discuss.dgraph.io/t/where-does-dgraph-store-all-its-data-on-disk/1567/3 "2017-06-21T21:29:23Z")

</div>

Great thanks !

It looks like it takes a snapshot every so often as well. I assume that also flushed in-memory contents to disk ?

---

<div class="post-metadata">

**Author:** ![mrjn](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/mrjn/32/775_2.png) [@mrjn](https://discuss.dgraph.io/u/mrjn)\
**Post date:** [June 23, 2017, 1:00am UTC](https://discuss.dgraph.io/t/where-does-dgraph-store-all-its-data-on-disk/1567/4 "2017-06-23T01:00:14Z")

</div>

No. We don’t really take any snapshots. The data gets pushed out continuously.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex007/uploads/dgraph/original/2X/2/2b38fdece2abe5814f2e51bee69d1e67fc304b0a.png) [@system](https://discuss.dgraph.io/u/system)\
**Post date:** [November 28, 2017, 12:59am UTC](https://discuss.dgraph.io/t/where-does-dgraph-store-all-its-data-on-disk/1567/5 "2017-11-28T00:59:38Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
