Basic of dgraph

I want to understand the basic of dgraph server.
I am using windows 10 with 16GB RAM in it.
No cluster installed.
I want to run dgraph server.
what should be my basic and fundamental configuration so that it won’t break at any time, and also tell me the meaning of them.

Like what’s P and W and zw folders are and files inside them. I have gone through the tutorial but haven’t found anything about files inside these folders.

The help text for for Dgraph Zero and Dgraph Server options gives a better idea of what the directories store:

$ dgraph zero --help
  -w, --wal string                    Directory storing WAL. (default "zw")
$ dgraph server -h
  -p, --postings string                  Directory to store posting lists. (default "p")
  -w, --wal string                       Directory to store raft write-ahead logs. (default "w")

Dgraph stores everything via Badger. All the files within each the directories and the file formats are Badger-specific.

1 Like

Hey thanks for this info, but this is something i have already seen.

Can you describe what info you’re looking for?

I wanted to know that, where exactly the actual data get stored.

like in which folder, if we have three (P, W and ZW) and exactly in which file (vlog or ssl)

For the most part, all committed data gets stored in the p directory. The write-ahead logs (w and zw) can also store mutations at points in time before being committed and moved to the p directory. In case Dgraph crashes, the write ahead logs can be replayed back.

The files in each directory are specific to Badger. The data is both stored in the vlog and sst files. Feel free to file a GitHub issue to Badger about adding more documentation about the vlog, sst, and MANIFEST file.

1 Like

ok thanks a lot man.