You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rename lru cache metrics to the same "dgraph_lru" prefix. (#2714)
* Rename lru cache metrics with a "dgraph_lru" prefix.
* Rename dgraph_evicted_lists_total to dgraph_lru_evicted_total.
* docs: Update metrics section for `dgraph_lru` prefixed metrics.
* Rename EvictedPls variable to LcacheEvicts for consistency with other Lcache vars.
* Add TODO about moving away from Prometheus's expvar collector.
* Reflow metrics docs to 100-columns.
The disk metrics let you track the disk activity of the Dgraph process. Dgraph does not interact directly with the filesystem. Instead it relies on [Badger](https://github.com/dgraph-io/badger) to read from and write to disk.
1403
+
The disk metrics let you track the disk activity of the Dgraph process. Dgraph does not interact
1404
+
directly with the filesystem. Instead it relies on [Badger](https://github.com/dgraph-io/badger) to
1405
+
read from and write to disk.
1403
1406
1404
1407
Metrics | Description
1405
1408
------- | -----------
@@ -1413,9 +1416,12 @@ The disk metrics let you track the disk activity of the Dgraph process. Dgraph d
1413
1416
1414
1417
### Memory Metrics
1415
1418
1416
-
The memory metrics let you track the memory usage of the Dgraph process. The idle and inuse metrics gives you a better sense of the active memory usage of the Dgraph process. The process memory metric shows the memory usage as measured by the operating system.
1419
+
The memory metrics let you track the memory usage of the Dgraph process. The idle and inuse metrics
1420
+
gives you a better sense of the active memory usage of the Dgraph process. The process memory metric
1421
+
shows the memory usage as measured by the operating system.
1417
1422
1418
-
By looking at all three metrics you can see how much memory a Dgraph process is holding from the operating system and how much is actively in use.
1423
+
By looking at all three metrics you can see how much memory a Dgraph process is holding from the
1424
+
operating system and how much is actively in use.
1419
1425
1420
1426
Metrics | Description
1421
1427
------- | -----------
@@ -1425,21 +1431,28 @@ By looking at all three metrics you can see how much memory a Dgraph process is
1425
1431
1426
1432
### LRU Cache Metrics
1427
1433
1428
-
The LRU cache metrics let you track on how well the posting list cache is being used. You can measure the cache capacity with the max posting list size (see data metrics below), which may correlate with `dgraph_evicted_lists_total` is growing.
1434
+
The LRU cache metrics let you track on how well the posting list cache is being used.
1429
1435
1430
-
Metrics | Description
1431
-
------- | -----------
1432
-
`dgraph_cache_hits_total` | Total number of cache hits for posting lists in Dgraph.
1433
-
`dgraph_cache_miss_total` | Total number of cache misses for posting lists in Dgraph.
1434
-
`dgraph_cache_race_total` | Total number of cache races when getting posting lists in Dgraph.
1435
-
`dgraph_evicted_lists_total` | Total number of posting lists evicted from LRU cache. A large number here could indicate a large posting list.
1436
-
`dgraph_lcache_capacity_bytes` | Current size of the LRU cache. The max value should be close to the size specified by `--lru_mb`.
1437
-
`dgraph_lcache_keys_total` | Total number of keys in the LRU cache.
1438
-
`dgraph_lcache_size_bytes` | Size in bytes of the LRU cache.
1436
+
You can track `dgraph_lru_capacity_bytes`, `dgraph_lru_evicted_total`, and `dgraph_max_list_bytes`
1437
+
(see the [Data Metrics]({{< relref "#data-metrics" >}})) to determine if the cache size should be
1438
+
adjusted. A high number of evictions can indicate a large posting list that repeatedly is inserted
1439
+
and evicted from the cache due to insufficient sizing. The LRU cache size can be tuned with the option
1440
+
`--lru_mb`.
1441
+
1442
+
Metrics | Description
1443
+
------- | -----------
1444
+
`dgraph_lru_hits_total` | Total number of cache hits for posting lists in Dgraph.
1445
+
`dgraph_lru_miss_total` | Total number of cache misses for posting lists in Dgraph.
1446
+
`dgraph_lru_race_total` | Total number of cache races when getting posting lists in Dgraph.
1447
+
`dgraph_lru_evicted_total` | Total number of posting lists evicted from LRU cache.
1448
+
`dgraph_lru_capacity_bytes` | Current size of the LRU cache. The max value should be close to the size specified by `--lru_mb`.
1449
+
`dgraph_lru_keys_total` | Total number of keys in the LRU cache.
1450
+
`dgraph_lru_size_bytes` | Size in bytes of the LRU cache.
1439
1451
1440
1452
### Data Metrics
1441
1453
1442
-
The data metrics let you track the [posting list]({{< ref "/design-concepts/index.md#posting-list" >}}) store.
1454
+
The data metrics let you track the [posting list]({{< ref "/design-concepts/index.md#posting-list"
0 commit comments