@@ -16,19 +16,21 @@ local influxdb = grafana.influxdb;
1616 ||| ,
1717 ),
1818
19- local used_ratio (
19+ local used_panel (
2020 title,
2121 description,
2222 datasource,
2323 measurement,
2424 metric_name,
25+ format,
26+ labelY1
2527 ) = graph.new(
2628 title=title,
2729 description=description,
2830 datasource=datasource,
2931
30- format='percent' ,
31- labelY1='used ratio' ,
32+ format=format ,
33+ labelY1=labelY1 ,
3234 fill=0 ,
3335 decimals=2 ,
3436 sort='decreasing' ,
@@ -45,6 +47,22 @@ local influxdb = grafana.influxdb;
4547 ).where('metric_name' , '=' , metric_name).selectField('value' ).addConverter('mean' )
4648 ),
4749
50+ local used_ratio(
51+ title,
52+ description,
53+ datasource,
54+ measurement,
55+ metric_name,
56+ ) = used_panel(
57+ title,
58+ description,
59+ datasource,
60+ measurement,
61+ metric_name,
62+ format='percent' ,
63+ labelY1='used ratio'
64+ ),
65+
4866 quota_used_ratio(
4967 title='Used by slab allocator (quota_used_ratio)' ,
5068 description=|||
@@ -86,7 +104,7 @@ local influxdb = grafana.influxdb;
86104 ),
87105
88106 items_used_ratio(
89- title='Used only for tuples (items_used_ratio)' ,
107+ title='Used for tuples (items_used_ratio)' ,
90108 description=|||
91109 `items_used_ratio` = `items_used` / `items_size`.
92110
@@ -104,4 +122,116 @@ local influxdb = grafana.influxdb;
104122 measurement=measurement,
105123 metric_name='tnt_slab_items_used_ratio' ,
106124 ),
125+
126+ local used_memory(
127+ title,
128+ description,
129+ datasource,
130+ measurement,
131+ metric_name,
132+ ) = used_panel(
133+ title,
134+ description,
135+ datasource,
136+ measurement,
137+ metric_name,
138+ format='bytes' ,
139+ labelY1='in bytes' ,
140+ ),
141+
142+ quota_used(
143+ title='Used by slab allocator (quota_used)' ,
144+ description=|||
145+ Memory used by slab allocator (for both tuple and index slabs).
146+ ||| ,
147+
148+ datasource=null ,
149+ measurement=null ,
150+ ):: used_memory(
151+ title=title,
152+ description=description,
153+ datasource=datasource,
154+ measurement=measurement,
155+ metric_name='tnt_slab_quota_used' ,
156+ ),
157+
158+ quota_size(
159+ title='Slab allocator memory limit (quota_size)' ,
160+ description=|||
161+ Memory limit for slab allocator (as configured in the *memtx_memory* parameter).
162+ ||| ,
163+
164+ datasource=null ,
165+ measurement=null ,
166+ ):: used_memory(
167+ title=title,
168+ description=description,
169+ datasource=datasource,
170+ measurement=measurement,
171+ metric_name='tnt_slab_quota_size' ,
172+ ),
173+
174+ arena_used(
175+ title='Used for tuples and indexes (arena_used)' ,
176+ description=|||
177+ Memory used for both tuples and indexes.
178+ ||| ,
179+
180+ datasource=null ,
181+ measurement=null ,
182+ ):: used_memory(
183+ title=title,
184+ description=description,
185+ datasource=datasource,
186+ measurement=measurement,
187+ metric_name='tnt_slab_arena_used' ,
188+ ),
189+
190+ arena_size(
191+ title='Allocated for tuples and indexes (arena_size)' ,
192+ description=|||
193+ Memory allocated for both tuples and indexes by slab allocator.
194+ ||| ,
195+
196+ datasource=null ,
197+ measurement=null ,
198+ ):: used_memory(
199+ title=title,
200+ description=description,
201+ datasource=datasource,
202+ measurement=measurement,
203+ metric_name='tnt_slab_arena_size' ,
204+ ),
205+
206+ items_used(
207+ title='Used for tuples (items_used)' ,
208+ description=|||
209+ Memory used for only tuples.
210+ ||| ,
211+
212+ datasource=null ,
213+ measurement=null ,
214+ ):: used_memory(
215+ title=title,
216+ description=description,
217+ datasource=datasource,
218+ measurement=measurement,
219+ metric_name='tnt_slab_items_used' ,
220+ ),
221+
222+ items_size(
223+ title='Allocated for tuples (items_size)' ,
224+ description=|||
225+ Memory allocated for only tuples by slab allocator.
226+ ||| ,
227+
228+ datasource=null ,
229+ measurement=null ,
230+ ):: used_memory(
231+ title=title,
232+ description=description,
233+ datasource=datasource,
234+ measurement=measurement,
235+ metric_name='tnt_slab_items_size' ,
236+ ),
107237}
0 commit comments