see_also:
- rgw_thread_pool_size
with_legacy: true
+- name: rgw_d4n_l1_datacache_persistent_path
+ type: str
+ level: advanced
+ desc: path for the directory for storing the local cache objects data for d4n
+ default: /tmp/rgw_d4n_datacache/
+ services:
+ - rgw
+ with_legacy: true
+- name: rgw_d4n_l1_datacache_size
+ type: size
+ level: advanced
+ desc: datacache maximum size on disk in bytes
+ default: 1_G
+ services:
+ - rgw
+ with_legacy: true
+- name: rgw_d4n_l1_evict_cache_on_start
+ type: bool
+ level: advanced
+ desc: clear the content of the persistent data cache directory on start
+ default: true
+ services:
+ - rgw
+ with_legacy: true
+- name: rgw_d4n_l1_fadvise
+ type: int
+ level: advanced
+ desc: posix_fadvise() flag for access pattern of cache files
+ long_desc: for example to bypass the page-cache -
+ POSIX_FADV_DONTNEED=4
+ default: 4
+ services:
+ - rgw
+ with_legacy: true
+- name: rgw_d4n_libaio_aio_threads
+ type: int
+ level: advanced
+ desc: specifies the maximum number of worker threads that may be used by libaio
+ default: 20
+ services:
+ - rgw
+ see_also:
+ - rgw_thread_pool_size
+ with_legacy: true
+- name: rgw_d4n_libaio_aio_num
+ type: int
+ level: advanced
+ desc: specifies the maximum number of simultaneous I/O requests that libaio expects to enqueue
+ default: 64
+ services:
+ - rgw
+ see_also:
+ - rgw_thread_pool_size
+ with_legacy: true
- name: rgw_backend_store
type: str
level: advanced
D4NFilterDriver::D4NFilterDriver(Driver* _next) : FilterDriver(_next)
{
rgw::cache::Partition partition_info;
- partition_info.location = g_conf()->rgw_d3n_l1_datacache_persistent_path;
+ partition_info.location = g_conf()->rgw_d4n_l1_datacache_persistent_path;
partition_info.name = "d4n";
partition_info.type = "read-cache";
- partition_info.size = g_conf()->rgw_d3n_l1_datacache_size;
+ partition_info.size = g_conf()->rgw_d4n_l1_datacache_size;
cacheDriver = new rgw::cache::SSDDriver(partition_info);
objDir = new rgw::d4n::ObjectDirectory();
}
try {
if (efs::exists(partition_info.location)) {
- if (cct->_conf->rgw_d3n_l1_evict_cache_on_start) {
+ if (cct->_conf->rgw_d4n_l1_evict_cache_on_start) {
ldpp_dout(dpp, 5) << "initialize: evicting the persistent storage directory on start" << dendl;
for (auto& p : efs::directory_iterator(partition_info.location)) {
efs::remove_all(p.path());
#if defined(HAVE_LIBAIO) && defined(__GLIBC__)
// libaio setup
struct aioinit ainit{0};
- ainit.aio_threads = cct->_conf.get_val<int64_t>("rgw_d3n_libaio_aio_threads");
- ainit.aio_num = cct->_conf.get_val<int64_t>("rgw_d3n_libaio_aio_num");
+ ainit.aio_threads = cct->_conf.get_val<int64_t>("rgw_d4n_libaio_aio_threads");
+ ainit.aio_num = cct->_conf.get_val<int64_t>("rgw_d4n_libaio_aio_num");
ainit.aio_idle_time = 120;
aio_init(&ainit);
#endif
ldpp_dout(dpp, 0) << "ERROR: AsyncWriteRequest::prepare_libaio_write_op: open file failed, errno=" << errno << ", location='" << location.c_str() << "'" << dendl;
return r;
}
- if (dpp->get_cct()->_conf->rgw_d3n_l1_fadvise != POSIX_FADV_NORMAL)
- posix_fadvise(fd, 0, 0, dpp->get_cct()->_conf->rgw_d3n_l1_fadvise);
+ if (dpp->get_cct()->_conf->rgw_d4n_l1_fadvise != POSIX_FADV_NORMAL)
+ posix_fadvise(fd, 0, 0, dpp->get_cct()->_conf->rgw_d4n_l1_fadvise);
cb->aio_fildes = fd;
data = malloc(len);
ldpp_dout(dpp, 1) << "ERROR: SSDCache: " << __func__ << "(): can't open " << file_path << " : " << " error: " << err << dendl;
return -err;
}
- if (cct->_conf->rgw_d3n_l1_fadvise != POSIX_FADV_NORMAL) {
- posix_fadvise(aio_cb->aio_fildes, 0, 0, g_conf()->rgw_d3n_l1_fadvise);
+ if (cct->_conf->rgw_d4n_l1_fadvise != POSIX_FADV_NORMAL) {
+ posix_fadvise(aio_cb->aio_fildes, 0, 0, g_conf()->rgw_d4n_l1_fadvise);
}
bufferptr bp(read_len);