Use io_uring SQ size for ringloop capacity - otherwise get_sqe could return NULL when space_left() was > 0 under load
Test / buildenv (push) Successful in 9s Details
Test / build (push) Successful in 2m41s Details
Test / test_cas (push) Successful in 8s Details
Test / make_test (push) Successful in 31s Details
Test / test_change_pg_size (push) Successful in 7s Details
Test / test_change_pg_count (push) Successful in 37s Details
Test / test_create_nomaxid (push) Successful in 7s Details
Test / test_etcd_fail (push) Successful in 1m11s Details
Test / test_add_osd (push) Successful in 1m54s Details
Test / test_interrupted_rebalance (push) Successful in 1m17s Details
Test / test_interrupted_rebalance_imm (push) Successful in 1m24s Details
Test / test_change_pg_count_ec (push) Failing after 3m6s Details
Test / test_failure_domain (push) Successful in 8s Details
Test / test_snapshot (push) Successful in 18s Details
Test / test_interrupted_rebalance_ec_imm (push) Successful in 1m42s Details
Test / test_minsize_1 (push) Successful in 11s Details
Test / test_rm (push) Successful in 11s Details
Test / test_move_reappear (push) Successful in 17s Details
Test / test_snapshot_chain (push) Successful in 1m0s Details
Test / test_snapshot_down (push) Successful in 19s Details
Test / test_snapshot_ec (push) Failing after 3m5s Details
Test / test_splitbrain (push) Successful in 12s Details
Test / test_snapshot_chain_ec (push) Failing after 3m5s Details
Test / test_snapshot_down_ec (push) Failing after 3m6s Details
Test / test_rebalance_verify_ec (push) Failing after 42s Details
Test / test_rebalance_verify_imm (push) Successful in 2m47s Details
Test / test_rebalance_verify (push) Successful in 3m14s Details
Test / test_rebalance_verify_ec_imm (push) Successful in 2m38s Details
Test / test_interrupted_rebalance_ec (push) Failing after 10m5s Details
Test / test_write_no_same (push) Successful in 11s Details
Test / test_write (push) Failing after 3m6s Details
Test / test_write_xor (push) Failing after 3m5s Details
Test / test_heal_pg_size_2 (push) Failing after 3m45s Details
Test / test_heal_csum_32k_dj (push) Failing after 4m41s Details
Test / test_heal_csum_32k (push) Successful in 4m28s Details
Test / test_heal_ec (push) Failing after 10m12s Details
Test / test_heal_csum_4k_dmj (push) Failing after 4m27s Details
Test / test_scrub (push) Successful in 53s Details
Test / test_heal_csum_32k_dmj (push) Failing after 10m16s Details
Test / test_scrub_zero_osd_2 (push) Successful in 59s Details
Test / test_heal_csum_4k_dj (push) Failing after 4m24s Details
Test / test_scrub_pg_size_3 (push) Successful in 1m7s Details
Test / test_scrub_xor (push) Failing after 3m14s Details
Test / test_scrub_pg_size_6_pg_minsize_4_osd_count_6_ec (push) Failing after 3m6s Details
Test / test_scrub_ec (push) Failing after 3m7s Details
Test / test_heal_csum_4k (push) Failing after 10m9s Details

Raise default io_uring size to 1024 for the same effective capacity as previously
kv-debug
Vitaliy Filippov 2023-11-20 03:03:33 +03:00
parent 6b33ae973d
commit b5c020ce0b
12 changed files with 18 additions and 18 deletions

View File

@ -331,7 +331,7 @@ static int run(cli_tool_t *p, json11::Json::object cfg)
{
// Create client
json11::Json cfg_j = cfg;
p->ringloop = new ring_loop_t(512);
p->ringloop = new ring_loop_t(RINGLOOP_DEFAULT_SIZE);
p->epmgr = new epoll_manager_t(p->ringloop);
p->cli = new cluster_client_t(p->ringloop, p->epmgr->tfd, cfg_j);
// Smaller timeout by default for more interactiveness

View File

@ -245,7 +245,7 @@ int disk_tool_t::resize_copy_data()
{
iodepth = 32;
}
ringloop = new ring_loop_t(iodepth < 512 ? 512 : iodepth);
ringloop = new ring_loop_t(iodepth < RINGLOOP_DEFAULT_SIZE ? RINGLOOP_DEFAULT_SIZE : iodepth);
dsk.data_fd = open(dsk.data_device.c_str(), O_DIRECT|O_RDWR);
if (dsk.data_fd < 0)
{

View File

@ -130,7 +130,7 @@ static int bs_init(struct thread_data *td)
config[p.first] = p.second.dump();
}
}
bsd->ringloop = new ring_loop_t(512);
bsd->ringloop = new ring_loop_t(RINGLOOP_DEFAULT_SIZE);
bsd->epmgr = new epoll_manager_t(bsd->ringloop);
bsd->bs = new blockstore_t(config, bsd->ringloop, bsd->epmgr->tfd);
while (1)

View File

@ -225,7 +225,7 @@ public:
cfg = obj;
}
// Create client
ringloop = new ring_loop_t(512);
ringloop = new ring_loop_t(RINGLOOP_DEFAULT_SIZE);
epmgr = new epoll_manager_t(ringloop);
cli = new cluster_client_t(ringloop, epmgr->tfd, cfg);
if (!inode)

View File

@ -124,7 +124,7 @@ void nfs_proxy_t::run(json11::Json cfg)
cfg = obj;
}
// Create client
ringloop = new ring_loop_t(512);
ringloop = new ring_loop_t(RINGLOOP_DEFAULT_SIZE);
epmgr = new epoll_manager_t(ringloop);
cli = new cluster_client_t(ringloop, epmgr->tfd, cfg);
cmd = new cli_tool_t();

View File

@ -58,7 +58,7 @@ int main(int narg, char *args[])
}
signal(SIGINT, handle_sigint);
signal(SIGTERM, handle_sigint);
ring_loop_t *ringloop = new ring_loop_t(512);
ring_loop_t *ringloop = new ring_loop_t(RINGLOOP_DEFAULT_SIZE);
osd = new osd_t(config, ringloop);
while (1)
{

View File

@ -17,7 +17,7 @@ ring_loop_t::ring_loop_t(int qd)
{
throw std::runtime_error(std::string("io_uring_queue_init: ") + strerror(-ret));
}
free_ring_data_ptr = *ring.cq.kring_entries;
free_ring_data_ptr = *ring.sq.kring_entries;
ring_datas = (struct ring_data_t*)calloc(free_ring_data_ptr, sizeof(ring_data_t));
free_ring_data = (int*)malloc(sizeof(int) * free_ring_data_ptr);
if (!ring_datas || !free_ring_data)

View File

@ -15,6 +15,8 @@
#include <functional>
#include <vector>
#define RINGLOOP_DEFAULT_SIZE 1024
static inline void my_uring_prep_rw(int op, struct io_uring_sqe *sqe, int fd, const void *addr, unsigned len, off_t offset)
{
// Prepare a read/write operation without clearing user_data
@ -139,11 +141,9 @@ public:
if (free_ring_data_ptr == 0)
return NULL;
struct io_uring_sqe* sqe = io_uring_get_sqe(&ring);
if (sqe)
{
*sqe = { 0 };
io_uring_sqe_set_data(sqe, ring_datas + free_ring_data[--free_ring_data_ptr]);
}
assert(sqe);
*sqe = { 0 };
io_uring_sqe_set_data(sqe, ring_datas + free_ring_data[--free_ring_data_ptr]);
return sqe;
}
inline void set_immediate(const std::function<void()> cb)

View File

@ -30,7 +30,7 @@ void stub_exec_op(osd_messenger_t *msgr, osd_op_t *op);
int main(int narg, char *args[])
{
ring_consumer_t looper;
ring_loop_t *ringloop = new ring_loop_t(512);
ring_loop_t *ringloop = new ring_loop_t(RINGLOOP_DEFAULT_SIZE);
epoll_manager_t *epmgr = new epoll_manager_t(ringloop);
osd_messenger_t *msgr = new osd_messenger_t();
msgr->osd_num = 1351;

View File

@ -11,7 +11,7 @@ int main(int narg, char *args[])
config["meta_device"] = "./test_meta.bin";
config["journal_device"] = "./test_journal.bin";
config["data_device"] = "./test_data.bin";
ring_loop_t *ringloop = new ring_loop_t(512);
ring_loop_t *ringloop = new ring_loop_t(RINGLOOP_DEFAULT_SIZE);
epoll_manager_t *epmgr = new epoll_manager_t(ringloop);
blockstore_t *bs = new blockstore_t(config, ringloop, epmgr->tfd);

View File

@ -68,7 +68,7 @@ int main(int narg, char *args[])
| cfg["inode_id"].uint64_value();
uint64_t base_ver = 0;
// Create client
auto ringloop = new ring_loop_t(512);
auto ringloop = new ring_loop_t(RINGLOOP_DEFAULT_SIZE);
auto epmgr = new epoll_manager_t(ringloop);
auto cli = new cluster_client_t(ringloop, epmgr->tfd, cfg);
cli->on_ready([&]()

View File

@ -114,7 +114,7 @@ vitastor_c *vitastor_c_create_qemu_uring(QEMUSetFDHandler *aio_set_fd_handler, v
ring_loop_t *ringloop = NULL;
try
{
ringloop = new ring_loop_t(512);
ringloop = new ring_loop_t(RINGLOOP_DEFAULT_SIZE);
}
catch (std::exception & e)
{
@ -136,7 +136,7 @@ vitastor_c *vitastor_c_create_uring(const char *config_path, const char *etcd_ho
ring_loop_t *ringloop = NULL;
try
{
ringloop = new ring_loop_t(512);
ringloop = new ring_loop_t(RINGLOOP_DEFAULT_SIZE);
}
catch (std::exception & e)
{
@ -167,7 +167,7 @@ vitastor_c *vitastor_c_create_uring_json(const char **options, int options_len)
ring_loop_t *ringloop = NULL;
try
{
ringloop = new ring_loop_t(512);
ringloop = new ring_loop_t(RINGLOOP_DEFAULT_SIZE);
}
catch (std::exception & e)
{