Skip to content

Commit

Permalink
ceph: view osd commit/apply latency
Browse files Browse the repository at this point in the history
  • Loading branch information
maurerdietmar committed Jan 23, 2014
1 parent 92e4d5f commit eadc695
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 19 deletions.
4 changes: 4 additions & 0 deletions PVE/API2/Ceph.pm
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,10 @@ __PACKAGE__->register_method ({
$new->{total_space} = ($stat->{kb} || 1) * 1024;
$new->{bytes_used} = ($stat->{kb_used} || 0) * 1024;
$new->{percent_used} = ($new->{bytes_used}*100)/$new->{total_space};
if (my $d = $stat->{fs_perf_stat}) {
$new->{commit_latency_ms} = $d->{commit_latency_ms};
$new->{apply_latency_ms} = $d->{apply_latency_ms};
}
}

$newnodes->{$e->{id}} = $new;
Expand Down
74 changes: 55 additions & 19 deletions www/manager/node/Ceph.js
Original file line number Diff line number Diff line change
Expand Up @@ -448,6 +448,8 @@ Ext.define('PVE.node.CephOsdTree', {
{ type: 'number', name: 'percent_used' },
{ type: 'integer', name: 'bytes_used' },
{ type: 'integer', name: 'total_space' },
{ type: 'integer', name: 'apply_latency_ms' },
{ type: 'integer', name: 'commit_latency_ms' },
{ type: 'number', name: 'crush_weight' }],
stateful: false,
selModel: sm,
Expand Down Expand Up @@ -501,29 +503,63 @@ Ext.define('PVE.node.CephOsdTree', {
},
width: 60
},
{
text: gettext('Size'),
dataIndex: 'total_space',
align: 'right',
renderer: function(value, metaData, rec) {
if (rec.data.type !== 'osd') {
return '';
{
header: gettext('Used'),
columns: [
{
text: '%',
dataIndex: 'percent_used',
align: 'right',
renderer: function(value, metaData, rec) {
if (rec.data.type !== 'osd') {
return '';
}
return Ext.util.Format.number(value, '0.00');
},
width: 80
},
{
text: gettext('Total'),
dataIndex: 'total_space',
align: 'right',
renderer: function(value, metaData, rec) {
if (rec.data.type !== 'osd') {
return '';
}
return PVE.Utils.render_size(value);
},
width: 100
}
return PVE.Utils.render_size(value);
},
width: 100
]
},
{
text: gettext('Used') + ' %',
dataIndex: 'percent_used',
align: 'right',
renderer: function(value, metaData, rec) {
if (rec.data.type !== 'osd') {
return '';
header: gettext('Latency (ms)'),
columns: [
{
text: 'Apply',
dataIndex: 'apply_latency_ms',
align: 'right',
renderer: function(value, metaData, rec) {
if (rec.data.type !== 'osd') {
return '';
}
return value;
},
width: 60
},
{
text: 'Commit',
dataIndex: 'commit_latency_ms',
align: 'right',
renderer: function(value, metaData, rec) {
if (rec.data.type !== 'osd') {
return '';
}
return value;
},
width: 60
}
return Ext.util.Format.number(value, '0.00');
},
width: 80
]
}
],
listeners: {
Expand Down

0 comments on commit eadc695

Please sign in to comment.