Aggregate per-pool statistics in mon

This commit is contained in:
Vitaliy Filippov
2021-07-03 23:14:44 +03:00
parent 30bb602681
commit b66160a7ad
3 changed files with 71 additions and 4 deletions
+1
View File
@@ -244,6 +244,7 @@ async function optimize_change({ prev_pgs: prev_int_pgs, osd_tree, pg_size = 3,
{
return null;
}
// FIXME: use parity_chunks with parity_space instead of pg_minsize
const pg_effsize = Math.min(pg_minsize, Object.keys(osd_tree).length)
+ Math.max(0, Math.min(pg_size, Object.keys(osd_tree).length) - pg_minsize) * parity_space;
const pg_count = prev_int_pgs.length;