OPTION(async_compressor_enabled, OPT_BOOL, false)
OPTION(async_compressor_type, OPT_STR, "snappy")
OPTION(async_compressor_threads, OPT_INT, 2)
-OPTION(async_compressor_set_affinity, OPT_BOOL, true)
-// example: ms_async_affinity_cores = 0,1
-// The number of coreset is expected to equal to ms_async_op_threads, otherwise
-// extra op threads will loop ms_async_affinity_cores again.
-OPTION(async_compressor_affinity_cores, OPT_STR, "")
OPTION(async_compressor_thread_timeout, OPT_INT, 5)
OPTION(async_compressor_thread_suicide_timeout, OPT_INT, 30)
compress_tp(g_ceph_context, "AsyncCompressor::compressor_tp", cct->_conf->async_compressor_threads, "async_compressor_threads"),
job_lock("AsyncCompressor::job_lock"),
compress_wq(this, c->_conf->async_compressor_thread_timeout, c->_conf->async_compressor_thread_suicide_timeout, &compress_tp) {
- vector<string> corestrs;
- get_str_vec(cct->_conf->async_compressor_affinity_cores, corestrs);
- for (vector<string>::iterator it = corestrs.begin();
- it != corestrs.end(); ++it) {
- string err;
- int coreid = strict_strtol(it->c_str(), 10, &err);
- if (err == "")
- coreids.push_back(coreid);
- else
- lderr(cct) << __func__ << " failed to parse " << *it << " in " << cct->_conf->async_compressor_affinity_cores << dendl;
- }
}
void AsyncCompressor::init()