Skip to content

Commit f148334

Browse files
DifferentialOrangevasiliy-t
authored andcommitted
Translate panel text to English based on docs, rework slab panels code
Translate panel title, description and content to English based on Tarantool docs. Move target from every slab panel to "used" panel template function.
1 parent 6c09fad commit f148334

File tree

2 files changed

+35
-40
lines changed

2 files changed

+35
-40
lines changed

tarantool/slab.libsonnet

Lines changed: 27 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,20 @@ local influxdb = grafana.influxdb;
88
{
99
monitor_info(
1010
):: text.new(
11-
title='Инструкции по мониторингу slab',
11+
title='Slab allocator monitoring information',
1212
content=|||
13-
`quota_used_ratio` > 90%, `arena_used_ratio` > 90%, 50% < `items_used_ratio` < 90% – высокая фрагментация памяти.
13+
`quota_used_ratio` > 90%, `arena_used_ratio` > 90%, 50% < `items_used_ratio` < 90% – your memory is highly fragmented. See [docs](https://www.tarantool.io/en/doc/1.10/reference/reference_lua/box_slab/#lua-function.box.slab.info) for more info.
1414
15-
`quota_used_ratio` > 90%, `arena_used_ratio` > 90%, `items_used_ratio` > 90% – заканчиваются резервы памяти, необходимо увеличить параметр *memtx_memory*.
15+
`quota_used_ratio` > 90%, `arena_used_ratio` > 90%, `items_used_ratio` > 90% – you are running out of memory. You should consider increasing Tarantool’s memory limit (*box.cfg.memtx_memory*).
1616
|||,
1717
),
1818

1919
local used_ratio(
2020
title,
2121
description,
2222
datasource,
23+
measurement,
24+
metric_name,
2325
) = graph.new(
2426
title=title,
2527
description=description,
@@ -33,17 +35,20 @@ local influxdb = grafana.influxdb;
3335
legend_current=true,
3436
legend_values=true,
3537
legend_sortDesc=true
38+
).addTarget(
39+
influxdb.target(
40+
measurement=measurement
41+
).where('metric_name', '=', metric_name).selectField('value').addConverter('mean')
3642
),
3743

3844
quota_used_ratio(
39-
title='Выделено памяти для распределения slab (quota_used_ratio)',
45+
title='Used by slab allocator (quota_used_ratio)',
4046
description=|||
41-
`quota_used_ratio` – отношение `quota_used` к `quota_size`.
47+
`quota_used_ratio` = `quota_used` / `quota_size`.
4248
43-
`quota_used` – это объем памяти, уже выделенный для распределения slab.
49+
`quota_used` – used by slab allocator (for both tuple and index slabs).
4450
45-
`quota_size` – максимальный объем памяти, который механизм распределения slab может использовать как для кортежей,
46-
так и для индексов (равно значению параметра *memtx_memory*).
51+
`quota_size` – memory limit for slab allocator (as configured in the *memtx_memory* parameter).
4752
|||,
4853

4954
datasource=null,
@@ -52,22 +57,18 @@ local influxdb = grafana.influxdb;
5257
title=title,
5358
description=description,
5459
datasource=datasource,
55-
).addTarget(
56-
influxdb.target(
57-
measurement=measurement
58-
).where('metric_name', '=', 'tnt_slab_quota_used_ratio').selectField('value').addConverter('mean')
60+
measurement=measurement,
61+
metric_name='tnt_slab_quota_used_ratio',
5962
),
6063

6164
arena_used_ratio(
62-
title='Утилизация памяти, выделенной под кортежи и индексы (arena_used_ratio)',
65+
title='Used for tuples and indexes (arena_used_ratio)',
6366
description=|||
64-
`arena_used_ratio` – отношение `arena_used` к `arena_size`.
67+
`arena_used_ratio` = `arena_used` / `arena_size`.
6568
66-
`arena_used` – это эффективный объем памяти, используемый для кортежей и индексов
67-
(не включая выделенные, но в данный момент свободные slab’ы).
69+
`arena_used` – used for both tuples and indexes.
6870
69-
`arena_size` – это общий объем памяти, используемый для кортежей и индексов
70-
(включая выделенные, но в данный момент свободные slab’ы).
71+
`arena_size` – allocated for both tuples and indexes.
7172
|||,
7273

7374
datasource=null,
@@ -76,22 +77,18 @@ local influxdb = grafana.influxdb;
7677
title=title,
7778
description=description,
7879
datasource=datasource,
79-
).addTarget(
80-
influxdb.target(
81-
measurement=measurement
82-
).where('metric_name', '=', 'tnt_slab_arena_used_ratio').selectField('value').addConverter('mean')
80+
measurement=measurement,
81+
metric_name='tnt_slab_arena_used_ratio',
8382
),
8483

8584
items_used_ratio(
86-
title='Утилизация памяти, выделенной под кортежи (items_used_ratio)',
85+
title='Used only for tuples (items_used_ratio)',
8786
description=|||
88-
`items_used_ratio` – отношение `items_used` к `items_size`.
87+
`items_used_ratio` = `items_used` / `items_size`.
8988
90-
`items_used` – это эффективный объем памяти (не включая выделенные, но в данный момент свободные slab’ы),
91-
который используется только для кортежей, а не для индексов.
89+
`items_used` – used only for tuples.
9290
93-
`items_size` – это общий объем памяти (включая выделенные, но в данный момент свободные slab’ы),
94-
который используется только для кортежей, а не для индексов.
91+
`items_size` – allocated only for tuples.
9592
|||,
9693

9794
datasource=null,
@@ -100,9 +97,7 @@ local influxdb = grafana.influxdb;
10097
title=title,
10198
description=description,
10299
datasource=datasource,
103-
).addTarget(
104-
influxdb.target(
105-
measurement=measurement
106-
).where('metric_name', '=', 'tnt_slab_items_used_ratio').selectField('value').addConverter('mean')
100+
measurement=measurement,
101+
metric_name='tnt_slab_items_used_ratio',
107102
),
108103
}

tests/InfluxDB/dashboard_compiled.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
"type": "row"
7373
},
7474
{
75-
"content": "`quota_used_ratio` > 90%, `arena_used_ratio` > 90%, 50% < `items_used_ratio` < 90% – высокая фрагментация памяти.\n\n`quota_used_ratio` > 90%, `arena_used_ratio` > 90%, `items_used_ratio` > 90% – заканчиваются резервы памяти, необходимо увеличить параметр *memtx_memory*.\n",
75+
"content": "`quota_used_ratio` > 90%, `arena_used_ratio` > 90%, 50% < `items_used_ratio` < 90% – your memory is highly fragmented. See [docs](https://www.tarantool.io/en/doc/1.10/reference/reference_lua/box_slab/#lua-function.box.slab.info) for more info.\n\n`quota_used_ratio` > 90%, `arena_used_ratio` > 90%, `items_used_ratio` > 90% – you are running out of memory. You should consider increasing Tarantool’s memory limit (*box.cfg.memtx_memory*).\n",
7676
"datasource": null,
7777
"gridPos": {
7878
"h": 3,
@@ -82,7 +82,7 @@
8282
},
8383
"id": 3,
8484
"mode": "markdown",
85-
"title": "Инструкции по мониторингу slab",
85+
"title": "Slab allocator monitoring information",
8686
"type": "text"
8787
},
8888
{
@@ -92,7 +92,7 @@
9292
"dashes": false,
9393
"datasource": "${DS_INFLUXDB}",
9494
"decimals": 2,
95-
"description": "`quota_used_ratio` – отношение `quota_used` к `quota_size`.\n\n`quota_used` – это объем памяти, уже выделенный для распределения slab.\n\n`quota_size` – максимальный объем памяти, который механизм распределения slab может использовать как для кортежей,\nтак и для индексов (равно значению параметра *memtx_memory*).\n",
95+
"description": "`quota_used_ratio` = `quota_used` / `quota_size`.\n\n`quota_used` – used by slab allocator (for both tuple and index slabs).\n\n`quota_size` – memory limit for slab allocator (as configured in the *memtx_memory* parameter).\n",
9696
"fill": 0,
9797
"gridPos": {
9898
"h": 8,
@@ -173,7 +173,7 @@
173173
"thresholds": [ ],
174174
"timeFrom": null,
175175
"timeShift": null,
176-
"title": "Выделено памяти для распределения slab (quota_used_ratio)",
176+
"title": "Used by slab allocator (quota_used_ratio)",
177177
"tooltip": {
178178
"shared": true,
179179
"sort": 0,
@@ -215,7 +215,7 @@
215215
"dashes": false,
216216
"datasource": "${DS_INFLUXDB}",
217217
"decimals": 2,
218-
"description": "`arena_used_ratio` – отношение `arena_used` к `arena_size`.\n\n`arena_used` – это эффективный объем памяти, используемый для кортежей и индексов\n(не включая выделенные, но в данный момент свободные slab’ы).\n\n`arena_size` – это общий объем памяти, используемый для кортежей и индексов\n(включая выделенные, но в данный момент свободные slab’ы).\n",
218+
"description": "`arena_used_ratio` = `arena_used` / `arena_size`.\n\n`arena_used` – used for both tuples and indexes.\n\n`arena_size` – allocated for both tuples and indexes.\n",
219219
"fill": 0,
220220
"gridPos": {
221221
"h": 8,
@@ -296,7 +296,7 @@
296296
"thresholds": [ ],
297297
"timeFrom": null,
298298
"timeShift": null,
299-
"title": "Утилизация памяти, выделенной под кортежи и индексы (arena_used_ratio)",
299+
"title": "Used for tuples and indexes (arena_used_ratio)",
300300
"tooltip": {
301301
"shared": true,
302302
"sort": 0,
@@ -338,7 +338,7 @@
338338
"dashes": false,
339339
"datasource": "${DS_INFLUXDB}",
340340
"decimals": 2,
341-
"description": "`items_used_ratio` – отношение `items_used` к `items_size`.\n\n`items_used` – это эффективный объем памяти (не включая выделенные, но в данный момент свободные slab’ы),\nкоторый используется только для кортежей, а не для индексов.\n\n`items_size` – это общий объем памяти (включая выделенные, но в данный момент свободные slab’ы),\nкоторый используется только для кортежей, а не для индексов.\n",
341+
"description": "`items_used_ratio` = `items_used` / `items_size`.\n\n`items_used` – used only for tuples.\n\n`items_size` – allocated only for tuples.\n",
342342
"fill": 0,
343343
"gridPos": {
344344
"h": 8,
@@ -419,7 +419,7 @@
419419
"thresholds": [ ],
420420
"timeFrom": null,
421421
"timeShift": null,
422-
"title": "Утилизация памяти, выделенной под кортежи (items_used_ratio)",
422+
"title": "Used only for tuples (items_used_ratio)",
423423
"tooltip": {
424424
"shared": true,
425425
"sort": 0,

0 commit comments

Comments
 (0)