mirror of
https://github.com/ceph/ceph
synced 2025-01-20 10:01:45 +00:00
osd: remove osd_auto_weight function
This is essentially dead code. Signed-off-by: Sage Weil <sage@redhat.com>
This commit is contained in:
parent
01b5085235
commit
b1ab103412
@ -631,7 +631,6 @@ OPTION(osd_deep_scrub_interval, OPT_FLOAT, 60*60*24*7) // once a week
|
||||
OPTION(osd_deep_scrub_stride, OPT_INT, 524288)
|
||||
OPTION(osd_deep_scrub_update_digest_min_age, OPT_INT, 2*60*60) // objects must be this old (seconds) before we update the whole-object digest on scrub
|
||||
OPTION(osd_scan_list_ping_tp_interval, OPT_U64, 100)
|
||||
OPTION(osd_auto_weight, OPT_BOOL, false)
|
||||
OPTION(osd_class_dir, OPT_STR, CEPH_LIBDIR "/rados-classes") // where rados plugins are stored
|
||||
OPTION(osd_open_classes_on_start, OPT_BOOL, true)
|
||||
OPTION(osd_check_for_log_corruption, OPT_BOOL, false)
|
||||
|
@ -1350,37 +1350,6 @@ int OSD::mkfs(CephContext *cct, ObjectStore *store, const string &dev,
|
||||
sb.whoami = whoami;
|
||||
sb.compat_features = get_osd_initial_compat_set();
|
||||
|
||||
// benchmark?
|
||||
if (cct->_conf->osd_auto_weight) {
|
||||
bufferlist bl;
|
||||
bufferptr bp(1048576);
|
||||
bp.zero();
|
||||
bl.push_back(bp);
|
||||
dout(0) << "testing disk bandwidth..." << dendl;
|
||||
utime_t start = ceph_clock_now(cct);
|
||||
object_t oid("disk_bw_test");
|
||||
for (int i=0; i<1000; i++) {
|
||||
ObjectStore::Transaction *t = new ObjectStore::Transaction;
|
||||
t->write(META_COLL, hobject_t(sobject_t(oid, 0)), i*bl.length(), bl.length(), bl);
|
||||
store->queue_transaction_and_cleanup(NULL, t);
|
||||
}
|
||||
store->sync();
|
||||
utime_t end = ceph_clock_now(cct);
|
||||
end -= start;
|
||||
dout(0) << "measured " << (1000.0 / (double)end) << " mb/sec" << dendl;
|
||||
ObjectStore::Transaction tr;
|
||||
tr.remove(META_COLL, hobject_t(sobject_t(oid, 0)));
|
||||
ret = store->apply_transaction(tr);
|
||||
if (ret) {
|
||||
derr << "OSD::mkfs: error while benchmarking: apply_transaction returned "
|
||||
<< ret << dendl;
|
||||
goto umount_store;
|
||||
}
|
||||
|
||||
// set osd weight
|
||||
sb.weight = (1000.0 / (double)end);
|
||||
}
|
||||
|
||||
bufferlist bl;
|
||||
::encode(sb, bl);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user