Dgraph is not calling Badger vlog GC for "zw" directory

I found that for badger instance initialized here for Raft WALs (which goes to “zw” dir by default), value log GC is not setup.
On the other hand, for “p” and “w” directories, the badger value log GC is setup like this.

This leads to “zw” directory usage growing infinitely. I confirmed my “zw” directory contains “000000.vlog” which was generated 4 months ago. On the other hand, my “p” and “w” directories only contain very recent files (created a few days ago).

I have 2 questions:

  • Is this (i.e. not calling value log GC for Raft WALs) intentional? If so, why?
  • Is manually removing the vlog files an OK-thing to do? What is the worst-case consequence of manually removing the vlog files?

If there’s already an established / recommended way of cleaning up the contents of “zw” directory, please let me know. Thanks in advance!

Hey @Genki-S,

Is this (i.e. not calling value log GC for Raft WALs) intentional? If so, why?

I don’t think it’s intentional. I guess since the zw directory contains only information about transactions, the amount of data actually written to badger is very less and so we’ve never seen people complain. For instance, you have a zw directory which has a single vlog file that was created 4 months ago. I see here that the max value log file size is 64 mb and you have only of them them. That’s a very less amount of data.

Also, for badger GC to work it needs at least 2 value log (vlog) file. Since you have only one file, even if there was GC running, it wouldn’t have freed up any disk space.

I’ve created Zero instance doesn't run ValueLog GC · Issue #4642 · dgraph-io/dgraph · GitHub to keep track of this. Thanks for figuring this out @Genki-S :slight_smile:

Is manually removing the vlog files an OK-thing to do? What is the worst-case consequence of manually removing the vlog files?

You should not remove the vlog files manually. The vlog file serves as a WAL and you would always have some amount of data (64 mb to ~700 mb) in memory. If you remove the vlog files and Dgraph (badger) crashes, there is no way to recover the in memory data.

If there’s already an established/recommended way of cleaning up the contents of “zw” directory, please let me know. Thanks in advance!

RunValueLogGC would take care of clearing up the vlog files. You shouldn’t worry about clearing up the data.

Thanks @ibrahim for your detailed answer! Understood that I should not manually remove vlog files.

For instance, you have a zw directory which has a single vlog file that was created 4 months ago.

Apologies my writing was not clear, but this is not the case. I actually have 330 vlog files in my “zw” directory, which is consuming 16G in total. Here’s the full contents of my “zw” directory:

-rw-r--r-- 1 root root  50M Nov 12 16:43 000000.vlog
-rw-r--r-- 1 root root  50M Nov 13 07:32 000001.vlog
-rw-r--r-- 1 root root  50M Nov 13 21:20 000002.vlog
-rw-r--r-- 1 root root  50M Nov 14 10:38 000003.vlog
-rw-r--r-- 1 root root  51M Nov 15 00:04 000004.vlog
-rw-r--r-- 1 root root  49M Nov 15 10:44 000005.vlog
-rw-r--r-- 1 root root  49M Nov 15 20:40 000006.vlog
-rw-r--r-- 1 root root  49M Nov 16 06:14 000007.vlog
-rw-r--r-- 1 root root  49M Nov 16 15:11 000008.vlog
-rw-r--r-- 1 root root  49M Nov 17 00:03 000009.vlog
-rw-r--r-- 1 root root  49M Nov 17 08:50 000010.vlog
-rw-r--r-- 1 root root  49M Nov 17 17:35 000011.vlog
-rw-r--r-- 1 root root  49M Nov 18 02:16 000012.vlog
-rw-r--r-- 1 root root  49M Nov 18 10:57 000013.vlog
-rw-r--r-- 1 root root  49M Nov 18 19:22 000014.vlog
-rw-r--r-- 1 root root  49M Nov 19 03:28 000015.vlog
-rw-r--r-- 1 root root  49M Nov 19 11:19 000016.vlog
-rw-r--r-- 1 root root  49M Nov 19 18:42 000017.vlog
-rw-r--r-- 1 root root  49M Nov 20 01:31 000018.vlog
-rw-r--r-- 1 root root  50M Nov 20 08:06 000019.vlog
-rw-r--r-- 1 root root  49M Nov 20 14:55 000020.vlog
-rw-r--r-- 1 root root  50M Nov 20 21:37 000021.vlog
-rw-r--r-- 1 root root  50M Nov 21 03:51 000022.vlog
-rw-r--r-- 1 root root  50M Nov 21 10:01 000023.vlog
-rw-r--r-- 1 root root  50M Nov 21 16:07 000024.vlog
-rw-r--r-- 1 root root  50M Nov 21 22:21 000025.vlog
-rw-r--r-- 1 root root  50M Nov 22 04:27 000026.vlog
-rw-r--r-- 1 root root  50M Nov 22 10:32 000027.vlog
-rw-r--r-- 1 root root  50M Nov 22 16:45 000028.vlog
-rw-r--r-- 1 root root  50M Nov 22 23:15 000029.vlog
-rw-r--r-- 1 root root  50M Nov 23 05:31 000030.vlog
-rw-r--r-- 1 root root  50M Nov 23 11:26 000031.vlog
-rw-r--r-- 1 root root  50M Nov 23 17:15 000032.vlog
-rw-r--r-- 1 root root  50M Nov 23 23:02 000033.vlog
-rw-r--r-- 1 root root  50M Nov 24 04:54 000034.vlog
-rw-r--r-- 1 root root  50M Nov 24 10:32 000035.vlog
-rw-r--r-- 1 root root  50M Nov 24 16:10 000036.vlog
-rw-r--r-- 1 root root  50M Nov 24 21:40 000037.vlog
-rw-r--r-- 1 root root  50M Nov 25 03:01 000038.vlog
-rw-r--r-- 1 root root  50M Nov 25 08:21 000039.vlog
-rw-r--r-- 1 root root  50M Nov 25 13:37 000040.vlog
-rw-r--r-- 1 root root  50M Nov 25 18:53 000041.vlog
-rw-r--r-- 1 root root  50M Nov 26 00:13 000042.vlog
-rw-r--r-- 1 root root  50M Nov 26 05:33 000043.vlog
-rw-r--r-- 1 root root  50M Nov 26 10:51 000044.vlog
-rw-r--r-- 1 root root  50M Nov 26 16:07 000045.vlog
-rw-r--r-- 1 root root  50M Nov 26 21:32 000046.vlog
-rw-r--r-- 1 root root  50M Nov 27 03:16 000047.vlog
-rw-r--r-- 1 root root  50M Nov 27 09:07 000048.vlog
-rw-r--r-- 1 root root  50M Nov 27 14:54 000049.vlog
-rw-r--r-- 1 root root  50M Nov 27 20:38 000050.vlog
-rw-r--r-- 1 root root  50M Nov 28 02:14 000051.vlog
-rw-r--r-- 1 root root  50M Nov 28 07:45 000052.vlog
-rw-r--r-- 1 root root  50M Nov 28 13:16 000053.vlog
-rw-r--r-- 1 root root  50M Nov 28 18:46 000054.vlog
-rw-r--r-- 1 root root  50M Nov 29 00:16 000055.vlog
-rw-r--r-- 1 root root  50M Nov 29 05:41 000056.vlog
-rw-r--r-- 1 root root  50M Nov 29 11:05 000057.vlog
-rw-r--r-- 1 root root  50M Nov 29 16:27 000058.vlog
-rw-r--r-- 1 root root  50M Nov 29 21:52 000059.vlog
-rw-r--r-- 1 root root  50M Nov 30 03:16 000060.vlog
-rw-r--r-- 1 root root  50M Nov 30 08:41 000061.vlog
-rw-r--r-- 1 root root  65M Dec  2 09:13 000062.vlog
-rw-r--r-- 1 root root  50M Dec  3 01:42 000063.vlog
-rw-r--r-- 1 root root  48M Dec  3 15:43 000064.vlog
-rw-r--r-- 1 root root  48M Dec  4 05:44 000065.vlog
-rw-r--r-- 1 root root  48M Dec  4 19:44 000066.vlog
-rw-r--r-- 1 root root  48M Dec  5 09:45 000067.vlog
-rw-r--r-- 1 root root  48M Dec  5 23:43 000068.vlog
-rw-r--r-- 1 root root  48M Dec  6 13:40 000069.vlog
-rw-r--r-- 1 root root  48M Dec  7 03:39 000070.vlog
-rw-r--r-- 1 root root  48M Dec  7 17:40 000071.vlog
-rw-r--r-- 1 root root  48M Dec  8 07:40 000072.vlog
-rw-r--r-- 1 root root  48M Dec  8 21:42 000073.vlog
-rw-r--r-- 1 root root  48M Dec  9 11:43 000074.vlog
-rw-r--r-- 1 root root  48M Dec 10 01:44 000075.vlog
-rw-r--r-- 1 root root  48M Dec 10 15:53 000076.vlog
-rw-r--r-- 1 root root  48M Dec 11 06:01 000077.vlog
-rw-r--r-- 1 root root  65M Dec 12 00:33 000078.vlog
-rw-r--r-- 1 root root  48M Dec 12 12:45 000079.vlog
-rw-r--r-- 1 root root  48M Dec 12 22:53 000080.vlog
-rw-r--r-- 1 root root  48M Dec 13 03:10 000081.vlog
-rw-r--r-- 1 root root  48M Dec 13 07:22 000082.vlog
-rw-r--r-- 1 root root  48M Dec 13 11:34 000083.vlog
-rw-r--r-- 1 root root  48M Dec 13 15:38 000084.vlog
-rw-r--r-- 1 root root  48M Dec 13 19:46 000085.vlog
-rw-r--r-- 1 root root  48M Dec 13 23:50 000086.vlog
-rw-r--r-- 1 root root  48M Dec 14 03:58 000087.vlog
-rw-r--r-- 1 root root  48M Dec 14 08:10 000088.vlog
-rw-r--r-- 1 root root  48M Dec 14 12:25 000089.vlog
-rw-r--r-- 1 root root  48M Dec 14 16:31 000090.vlog
-rw-r--r-- 1 root root  48M Dec 14 20:41 000091.vlog
-rw-r--r-- 1 root root  48M Dec 15 00:48 000092.vlog
-rw-r--r-- 1 root root  48M Dec 15 04:56 000093.vlog
-rw-r--r-- 1 root root  48M Dec 15 09:07 000094.vlog
-rw-r--r-- 1 root root  49M Dec 15 13:12 000095.vlog
-rw-r--r-- 1 root root  48M Dec 15 17:16 000096.vlog
-rw-r--r-- 1 root root  48M Dec 15 21:24 000097.vlog
-rw-r--r-- 1 root root  48M Dec 16 01:31 000098.vlog
-rw-r--r-- 1 root root  48M Dec 16 05:40 000099.vlog
-rw-r--r-- 1 root root  48M Dec 16 09:46 000100.vlog
-rw-r--r-- 1 root root  48M Dec 16 13:52 000101.vlog
-rw-r--r-- 1 root root  48M Dec 16 17:48 000102.vlog
-rw-r--r-- 1 root root  48M Dec 16 21:51 000103.vlog
-rw-r--r-- 1 root root  48M Dec 17 01:57 000104.vlog
-rw-r--r-- 1 root root  48M Dec 17 06:02 000105.vlog
-rw-r--r-- 1 root root  48M Dec 17 10:06 000106.vlog
-rw-r--r-- 1 root root  48M Dec 17 14:08 000107.vlog
-rw-r--r-- 1 root root  48M Dec 17 18:06 000108.vlog
-rw-r--r-- 1 root root  49M Dec 17 22:05 000109.vlog
-rw-r--r-- 1 root root  48M Dec 18 02:03 000110.vlog
-rw-r--r-- 1 root root  48M Dec 18 06:03 000111.vlog
-rw-r--r-- 1 root root  48M Dec 18 10:03 000112.vlog
-rw-r--r-- 1 root root  48M Dec 18 13:59 000113.vlog
-rw-r--r-- 1 root root  48M Dec 18 17:53 000114.vlog
-rw-r--r-- 1 root root  48M Dec 18 21:56 000115.vlog
-rw-r--r-- 1 root root  48M Dec 19 01:58 000116.vlog
-rw-r--r-- 1 root root  48M Dec 19 05:51 000117.vlog
-rw-r--r-- 1 root root  48M Dec 19 09:49 000118.vlog
-rw-r--r-- 1 root root  48M Dec 19 13:44 000119.vlog
-rw-r--r-- 1 root root  48M Dec 19 17:32 000120.vlog
-rw-r--r-- 1 root root  48M Dec 19 21:25 000121.vlog
-rw-r--r-- 1 root root  48M Dec 20 01:19 000122.vlog
-rw-r--r-- 1 root root  48M Dec 20 05:12 000123.vlog
-rw-r--r-- 1 root root  48M Dec 20 09:03 000124.vlog
-rw-r--r-- 1 root root  48M Dec 20 12:53 000125.vlog
-rw-r--r-- 1 root root  48M Dec 20 16:41 000126.vlog
-rw-r--r-- 1 root root  48M Dec 20 20:27 000127.vlog
-rw-r--r-- 1 root root  48M Dec 21 00:12 000128.vlog
-rw-r--r-- 1 root root  48M Dec 21 04:03 000129.vlog
-rw-r--r-- 1 root root  48M Dec 21 07:49 000130.vlog
-rw-r--r-- 1 root root  48M Dec 21 11:37 000131.vlog
-rw-r--r-- 1 root root  48M Dec 21 15:28 000132.vlog
-rw-r--r-- 1 root root  48M Dec 21 19:21 000133.vlog
-rw-r--r-- 1 root root  48M Dec 21 23:15 000134.vlog
-rw-r--r-- 1 root root  48M Dec 22 03:06 000135.vlog
-rw-r--r-- 1 root root  48M Dec 22 06:57 000136.vlog
-rw-r--r-- 1 root root  48M Dec 22 10:48 000137.vlog
-rw-r--r-- 1 root root  48M Dec 22 14:39 000138.vlog
-rw-r--r-- 1 root root  48M Dec 22 18:28 000139.vlog
-rw-r--r-- 1 root root  48M Dec 22 22:19 000140.vlog
-rw-r--r-- 1 root root  48M Dec 23 02:07 000141.vlog
-rw-r--r-- 1 root root  48M Dec 23 05:56 000142.vlog
-rw-r--r-- 1 root root  48M Dec 23 09:45 000143.vlog
-rw-r--r-- 1 root root  48M Dec 23 13:35 000144.vlog
-rw-r--r-- 1 root root  48M Dec 23 17:26 000145.vlog
-rw-r--r-- 1 root root  48M Dec 23 21:13 000146.vlog
-rw-r--r-- 1 root root  48M Dec 24 01:00 000147.vlog
-rw-r--r-- 1 root root  48M Dec 24 04:47 000148.vlog
-rw-r--r-- 1 root root  48M Dec 24 08:37 000149.vlog
-rw-r--r-- 1 root root  48M Dec 24 12:22 000150.vlog
-rw-r--r-- 1 root root  48M Dec 24 16:14 000151.vlog
-rw-r--r-- 1 root root  48M Dec 24 20:04 000152.vlog
-rw-r--r-- 1 root root  48M Dec 24 23:50 000153.vlog
-rw-r--r-- 1 root root  48M Dec 25 03:39 000154.vlog
-rw-r--r-- 1 root root  48M Dec 25 07:29 000155.vlog
-rw-r--r-- 1 root root  48M Dec 25 11:19 000156.vlog
-rw-r--r-- 1 root root  48M Dec 25 15:03 000157.vlog
-rw-r--r-- 1 root root  48M Dec 25 18:50 000158.vlog
-rw-r--r-- 1 root root  48M Dec 25 22:37 000159.vlog
-rw-r--r-- 1 root root  48M Dec 26 02:23 000160.vlog
-rw-r--r-- 1 root root  48M Dec 26 06:12 000161.vlog
-rw-r--r-- 1 root root  48M Dec 26 10:00 000162.vlog
-rw-r--r-- 1 root root  48M Dec 26 13:42 000163.vlog
-rw-r--r-- 1 root root  48M Dec 26 17:30 000164.vlog
-rw-r--r-- 1 root root  48M Dec 26 21:18 000165.vlog
-rw-r--r-- 1 root root  48M Dec 27 01:07 000166.vlog
-rw-r--r-- 1 root root  48M Dec 27 05:03 000167.vlog
-rw-r--r-- 1 root root  48M Dec 27 08:53 000168.vlog
-rw-r--r-- 1 root root  48M Dec 27 12:51 000169.vlog
-rw-r--r-- 1 root root  48M Dec 27 16:37 000170.vlog
-rw-r--r-- 1 root root  48M Dec 27 20:24 000171.vlog
-rw-r--r-- 1 root root  48M Dec 28 00:10 000172.vlog
-rw-r--r-- 1 root root  48M Dec 28 03:57 000173.vlog
-rw-r--r-- 1 root root  48M Dec 28 07:46 000174.vlog
-rw-r--r-- 1 root root  48M Dec 28 11:31 000175.vlog
-rw-r--r-- 1 root root  48M Dec 28 15:15 000176.vlog
-rw-r--r-- 1 root root  48M Dec 28 18:57 000177.vlog
-rw-r--r-- 1 root root  48M Dec 28 22:42 000178.vlog
-rw-r--r-- 1 root root  48M Dec 29 02:28 000179.vlog
-rw-r--r-- 1 root root  48M Dec 29 06:16 000180.vlog
-rw-r--r-- 1 root root  48M Dec 29 09:59 000181.vlog
-rw-r--r-- 1 root root  48M Dec 29 13:40 000182.vlog
-rw-r--r-- 1 root root  48M Dec 29 17:24 000183.vlog
-rw-r--r-- 1 root root  48M Dec 29 21:11 000184.vlog
-rw-r--r-- 1 root root  48M Dec 30 01:00 000185.vlog
-rw-r--r-- 1 root root  48M Dec 30 04:47 000186.vlog
-rw-r--r-- 1 root root  48M Dec 30 08:31 000187.vlog
-rw-r--r-- 1 root root  48M Dec 30 12:16 000188.vlog
-rw-r--r-- 1 root root  48M Dec 30 16:02 000189.vlog
-rw-r--r-- 1 root root  48M Dec 30 19:51 000190.vlog
-rw-r--r-- 1 root root  48M Dec 30 23:45 000191.vlog
-rw-r--r-- 1 root root  48M Dec 31 03:35 000192.vlog
-rw-r--r-- 1 root root  49M Dec 31 07:19 000193.vlog
-rw-r--r-- 1 root root  48M Dec 31 11:07 000194.vlog
-rw-r--r-- 1 root root  48M Dec 31 14:57 000195.vlog
-rw-r--r-- 1 root root  48M Dec 31 18:44 000196.vlog
-rw-r--r-- 1 root root  49M Dec 31 22:34 000197.vlog
-rw-r--r-- 1 root root  48M Jan  1 02:22 000198.vlog
-rw-r--r-- 1 root root  48M Jan  1 06:07 000199.vlog
-rw-r--r-- 1 root root  48M Jan  1 09:46 000200.vlog
-rw-r--r-- 1 root root  48M Jan  1 13:34 000201.vlog
-rw-r--r-- 1 root root  49M Jan  1 17:26 000202.vlog
-rw-r--r-- 1 root root  48M Jan  1 21:15 000203.vlog
-rw-r--r-- 1 root root  48M Jan  2 01:04 000204.vlog
-rw-r--r-- 1 root root  48M Jan  2 04:50 000205.vlog
-rw-r--r-- 1 root root  48M Jan  2 08:32 000206.vlog
-rw-r--r-- 1 root root  48M Jan  2 12:21 000207.vlog
-rw-r--r-- 1 root root  48M Jan  2 16:09 000208.vlog
-rw-r--r-- 1 root root  48M Jan  2 19:57 000209.vlog
-rw-r--r-- 1 root root  48M Jan  2 23:39 000210.vlog
-rw-r--r-- 1 root root  48M Jan  3 03:23 000211.vlog
-rw-r--r-- 1 root root  48M Jan  3 07:08 000212.vlog
-rw-r--r-- 1 root root  48M Jan  3 11:02 000213.vlog
-rw-r--r-- 1 root root  48M Jan  3 14:47 000214.vlog
-rw-r--r-- 1 root root  48M Jan  3 18:35 000215.vlog
-rw-r--r-- 1 root root  48M Jan  3 22:21 000216.vlog
-rw-r--r-- 1 root root  48M Jan  4 02:13 000217.vlog
-rw-r--r-- 1 root root  48M Jan  4 06:00 000218.vlog
-rw-r--r-- 1 root root  48M Jan  4 09:51 000219.vlog
-rw-r--r-- 1 root root  48M Jan  4 13:39 000220.vlog
-rw-r--r-- 1 root root  48M Jan  4 17:23 000221.vlog
-rw-r--r-- 1 root root  48M Jan  4 21:07 000222.vlog
-rw-r--r-- 1 root root  48M Jan  5 00:57 000223.vlog
-rw-r--r-- 1 root root  48M Jan  5 04:42 000224.vlog
-rw-r--r-- 1 root root  48M Jan  5 08:26 000225.vlog
-rw-r--r-- 1 root root  48M Jan  5 12:12 000226.vlog
-rw-r--r-- 1 root root  48M Jan  5 16:02 000227.vlog
-rw-r--r-- 1 root root  48M Jan  5 19:49 000228.vlog
-rw-r--r-- 1 root root  49M Jan  5 23:38 000229.vlog
-rw-r--r-- 1 root root  49M Jan  6 03:23 000230.vlog
-rw-r--r-- 1 root root  48M Jan  6 07:11 000231.vlog
-rw-r--r-- 1 root root  48M Jan  6 11:00 000232.vlog
-rw-r--r-- 1 root root  48M Jan  6 14:48 000233.vlog
-rw-r--r-- 1 root root  48M Jan  6 18:30 000234.vlog
-rw-r--r-- 1 root root  48M Jan  6 22:17 000235.vlog
-rw-r--r-- 1 root root  48M Jan  7 01:57 000236.vlog
-rw-r--r-- 1 root root  48M Jan  7 05:41 000237.vlog
-rw-r--r-- 1 root root  48M Jan  7 09:31 000238.vlog
-rw-r--r-- 1 root root  48M Jan  7 13:21 000239.vlog
-rw-r--r-- 1 root root  48M Jan  7 17:04 000240.vlog
-rw-r--r-- 1 root root  48M Jan  7 20:44 000241.vlog
-rw-r--r-- 1 root root  48M Jan  8 00:21 000242.vlog
-rw-r--r-- 1 root root  48M Jan  8 04:01 000243.vlog
-rw-r--r-- 1 root root  48M Jan  8 07:44 000244.vlog
-rw-r--r-- 1 root root  48M Jan  8 11:23 000245.vlog
-rw-r--r-- 1 root root  48M Jan  8 15:08 000246.vlog
-rw-r--r-- 1 root root  48M Jan  8 18:52 000247.vlog
-rw-r--r-- 1 root root  48M Jan  8 22:31 000248.vlog
-rw-r--r-- 1 root root  48M Jan  9 02:13 000249.vlog
-rw-r--r-- 1 root root  48M Jan  9 05:52 000250.vlog
-rw-r--r-- 1 root root  48M Jan  9 09:38 000251.vlog
-rw-r--r-- 1 root root  48M Jan  9 13:17 000252.vlog
-rw-r--r-- 1 root root  48M Jan  9 16:55 000253.vlog
-rw-r--r-- 1 root root  48M Jan  9 20:30 000254.vlog
-rw-r--r-- 1 root root  48M Jan 10 00:11 000255.vlog
-rw-r--r-- 1 root root  48M Jan 10 03:50 000256.vlog
-rw-r--r-- 1 root root  48M Jan 10 07:31 000257.vlog
-rw-r--r-- 1 root root  48M Jan 10 11:08 000258.vlog
-rw-r--r-- 1 root root  63M Jan 10 15:58 000259.vlog
-rw-r--r-- 1 root root  48M Jan 10 19:33 000260.vlog
-rw-r--r-- 1 root root  48M Jan 10 23:07 000261.vlog
-rw-r--r-- 1 root root  48M Jan 11 02:43 000262.vlog
-rw-r--r-- 1 root root  49M Jan 11 06:18 000263.vlog
-rw-r--r-- 1 root root  48M Jan 11 09:54 000264.vlog
-rw-r--r-- 1 root root  48M Jan 11 13:27 000265.vlog
-rw-r--r-- 1 root root  48M Jan 11 17:02 000266.vlog
-rw-r--r-- 1 root root  48M Jan 11 20:32 000267.vlog
-rw-r--r-- 1 root root  48M Jan 12 00:02 000268.vlog
-rw-r--r-- 1 root root  48M Jan 12 03:35 000269.vlog
-rw-r--r-- 1 root root  48M Jan 12 07:09 000270.vlog
-rw-r--r-- 1 root root  49M Jan 12 10:39 000271.vlog
-rw-r--r-- 1 root root  48M Jan 12 14:08 000272.vlog
-rw-r--r-- 1 root root  65M Jan 13 23:35 000273.vlog
-rw-r--r-- 1 root root  48M Jan 14 03:07 000274.vlog
-rw-r--r-- 1 root root  48M Jan 14 06:42 000275.vlog
-rw-r--r-- 1 root root  48M Jan 14 10:16 000276.vlog
-rw-r--r-- 1 root root  48M Jan 14 13:50 000277.vlog
-rw-r--r-- 1 root root  48M Jan 14 17:22 000278.vlog
-rw-r--r-- 1 root root  49M Jan 14 20:54 000279.vlog
-rw-r--r-- 1 root root  48M Jan 15 00:09 000280.vlog
-rw-r--r-- 1 root root  48M Jan 15 03:25 000281.vlog
-rw-r--r-- 1 root root  48M Jan 15 06:42 000282.vlog
-rw-r--r-- 1 root root  48M Jan 15 10:02 000283.vlog
-rw-r--r-- 1 root root  48M Jan 15 13:18 000284.vlog
-rw-r--r-- 1 root root  48M Jan 15 16:45 000285.vlog
-rw-r--r-- 1 root root  48M Jan 15 20:11 000286.vlog
-rw-r--r-- 1 root root  65M Jan 16 00:49 000287.vlog
-rw-r--r-- 1 root root  48M Jan 16 04:21 000288.vlog
-rw-r--r-- 1 root root  48M Jan 16 07:49 000289.vlog
-rw-r--r-- 1 root root  48M Jan 16 11:20 000290.vlog
-rw-r--r-- 1 root root  48M Jan 16 14:51 000291.vlog
-rw-r--r-- 1 root root  48M Jan 16 18:21 000292.vlog
-rw-r--r-- 1 root root  48M Jan 16 21:49 000293.vlog
-rw-r--r-- 1 root root  48M Jan 17 01:16 000294.vlog
-rw-r--r-- 1 root root  58M Jan 17 06:08 000295.vlog
-rw-r--r-- 1 root root  48M Jan 17 09:39 000296.vlog
-rw-r--r-- 1 root root  48M Jan 17 13:05 000297.vlog
-rw-r--r-- 1 root root  48M Jan 17 16:34 000298.vlog
-rw-r--r-- 1 root root  48M Jan 17 20:04 000299.vlog
-rw-r--r-- 1 root root  48M Jan 17 23:25 000300.vlog
-rw-r--r-- 1 root root  49M Jan 18 02:50 000301.vlog
-rw-r--r-- 1 root root  49M Jan 18 06:19 000302.vlog
-rw-r--r-- 1 root root  48M Jan 18 09:49 000303.vlog
-rw-r--r-- 1 root root  48M Jan 18 13:10 000304.vlog
-rw-r--r-- 1 root root  49M Jan 18 16:38 000305.vlog
-rw-r--r-- 1 root root  48M Jan 18 20:03 000306.vlog
-rw-r--r-- 1 root root  48M Jan 18 23:27 000307.vlog
-rw-r--r-- 1 root root  48M Jan 19 02:51 000308.vlog
-rw-r--r-- 1 root root  49M Jan 19 06:13 000309.vlog
-rw-r--r-- 1 root root  48M Jan 19 09:38 000310.vlog
-rw-r--r-- 1 root root  48M Jan 19 13:04 000311.vlog
-rw-r--r-- 1 root root  49M Jan 19 16:32 000312.vlog
-rw-r--r-- 1 root root  48M Jan 19 19:59 000313.vlog
-rw-r--r-- 1 root root  48M Jan 19 23:19 000314.vlog
-rw-r--r-- 1 root root  48M Jan 20 02:43 000315.vlog
-rw-r--r-- 1 root root  48M Jan 20 06:07 000316.vlog
-rw-r--r-- 1 root root  48M Jan 20 09:31 000317.vlog
-rw-r--r-- 1 root root  49M Jan 20 12:59 000318.vlog
-rw-r--r-- 1 root root  48M Jan 20 16:24 000319.vlog
-rw-r--r-- 1 root root  48M Jan 20 19:49 000320.vlog
-rw-r--r-- 1 root root  48M Jan 20 23:17 000321.vlog
-rw-r--r-- 1 root root  48M Jan 21 02:51 000322.vlog
-rw-r--r-- 1 root root  48M Jan 21 06:26 000323.vlog
-rw-r--r-- 1 root root  48M Jan 21 10:01 000324.vlog
-rw-r--r-- 1 root root  48M Jan 21 13:44 000325.vlog
-rw-r--r-- 1 root root  48M Jan 21 17:19 000326.vlog
-rw-r--r-- 1 root root  48M Jan 21 20:55 000327.vlog
-rw-r--r-- 1 root root  48M Jan 22 00:30 000328.vlog
-rw-r--r-- 1 root root  48M Jan 22 04:03 000329.vlog
-rw-r--r-- 1 root root 599K Jan 22 04:06 000330.vlog
-rw-r--r-- 1 root root  70M Jan 17 22:29 000357.sst
-rw-r--r-- 1 root root  70M Jan 20 08:04 000376.sst
-rw-r--r-- 1 root root  70M Jan 21 23:59 000389.sst
-rw-r--r-- 1 root root  21M Jan 21 23:59 000390.sst
-rw-r--r-- 1 root root  33M Jan 22 04:03 000391.sst
-rw-r--r-- 1 root root    2 Jan 17 01:58 LOCK
-rw-r--r-- 1 root root 7.6K Jan 22 04:03 MANIFEST

My “p” and “w” directories are taking only ~500M, so “zw” occupying 16G is actually a bit of a real problem.

16G     /var/local/dgraph/dgraph-data/zw
265M    /var/local/dgraph/dgraph-data/w
355M    /var/local/dgraph/dgraph-data/p
17G     /var/local/dgraph/dgraph-data/

It seems my environment is making too many Raft transactions? I’ll investigate further, but if you happen to have an idea why this is happening, please let me know. I’m running Dgraph using docker like below:

/usr/bin/docker run --rm -p 5080:5080 -p 6080:6080 -p 8080:8080 -p 9080:9080 -p 8000:8000 -v /var/local/dgraph/dgraph-data:/dgraph --name dgraph dgraph/dgraph:v1.1.0 dgraph zero
/usr/bin/docker exec dgraph dgraph alpha --lru_mb 2048 --zero localhost:5080
/usr/bin/docker exec dgraph dgraph-ratel

Hey @Genki-S, this looks a serious issue to me. Without GC the zw directory will keep growing.

It seems my environment is making too many Raft transactions? I’ll investigate further, but if you happen to have an idea why this is happening, please let me know. I’m running Dgraph using docker like below:

That might not be the case. My understanding was we insert one key for multiple transaction timestamps but I could be wrong.

I think the issue here is the missing value log GC. We’ll take up Zero instance doesn't run ValueLog GC · Issue #4642 · dgraph-io/dgraph · GitHub on priority. Thank you once again for figuring out that GC was not being run for raft WAL.

Thanks for providing me with further info and taking up the issue on priority. I’ve subscribed to the GitHub issue and will catch up there, so please regard this thread as completed, thank you so much for your help.

Super glad I could contribute to the product I like :smile: Thank you and all Dgraph team for your awesome work!

Thank you for your help @Genki-S :slight_smile: