Allow to override pg_stripe_size
parent
53f6aba3e6
commit
79bf57b6e2
13
osd.cpp
13
osd.cpp
|
@ -139,6 +139,18 @@ void osd_t::parse_config(blockstore_config_t & config)
|
|||
if (autosync_interval > MAX_AUTOSYNC_INTERVAL)
|
||||
autosync_interval = DEFAULT_AUTOSYNC_INTERVAL;
|
||||
}
|
||||
if (config.find("client_queue_depth") != config.end())
|
||||
{
|
||||
client_queue_depth = strtoull(config["client_queue_depth"].c_str(), NULL, 10);
|
||||
if (client_queue_depth < 128)
|
||||
client_queue_depth = 128;
|
||||
}
|
||||
if (config.find("pg_stripe_size") != config.end())
|
||||
{
|
||||
pg_stripe_size = strtoull(config["pg_stripe_size"].c_str(), NULL, 10);
|
||||
if (!pg_stripe_size || !bs_block_size || pg_stripe_size < bs_block_size || (pg_stripe_size % bs_block_size) != 0)
|
||||
pg_stripe_size = DEFAULT_PG_STRIPE_SIZE;
|
||||
}
|
||||
recovery_queue_depth = strtoull(config["recovery_queue_depth"].c_str(), NULL, 10);
|
||||
if (recovery_queue_depth < 1 || recovery_queue_depth > MAX_RECOVERY_QUEUE)
|
||||
recovery_queue_depth = DEFAULT_RECOVERY_QUEUE;
|
||||
|
@ -506,7 +518,6 @@ void osd_t::exec_op(osd_op_t *cur_op)
|
|||
{
|
||||
exec_show_config(cur_op);
|
||||
}
|
||||
// FIXME: Do not handle operations immediately, manage some sort of a queue instead
|
||||
else if (cur_op->req.hdr.opcode == OSD_OP_READ)
|
||||
{
|
||||
continue_primary_read(cur_op);
|
||||
|
|
4
osd.h
4
osd.h
|
@ -48,6 +48,7 @@
|
|||
#define DEFAULT_AUTOSYNC_INTERVAL 5
|
||||
#define MAX_RECOVERY_QUEUE 2048
|
||||
#define DEFAULT_RECOVERY_QUEUE 4
|
||||
#define DEFAULT_PG_STRIPE_SIZE 4*1024*1024 // 4 MB by default
|
||||
|
||||
//#define OSD_STUB
|
||||
|
||||
|
@ -197,6 +198,7 @@ class osd_t
|
|||
bool run_primary = false;
|
||||
std::string bind_address;
|
||||
int bind_port, listen_backlog;
|
||||
// FIXME: Implement client queue depth limit
|
||||
int client_queue_depth = 128;
|
||||
bool allow_test_ops = true;
|
||||
int receive_buffer_size = 9000;
|
||||
|
@ -243,7 +245,7 @@ class osd_t
|
|||
int inflight_ops = 0;
|
||||
blockstore_t *bs;
|
||||
uint32_t bs_block_size, bs_disk_alignment;
|
||||
uint64_t pg_stripe_size = 4*1024*1024; // 4 MB by default
|
||||
uint64_t pg_stripe_size = DEFAULT_PG_STRIPE_SIZE;
|
||||
ring_loop_t *ringloop;
|
||||
timerfd_manager_t *tfd = NULL;
|
||||
|
||||
|
|
Loading…
Reference in New Issue