diff --git a/cpp/cdc/CDC.cpp b/cpp/cdc/CDC.cpp index 4f72d86a..4dfbae41 100644 --- a/cpp/cdc/CDC.cpp +++ b/cpp/cdc/CDC.cpp @@ -415,6 +415,13 @@ private: _shared.ownPorts[i/2].store(ntohs(addr.sin_port)); } else { LOG_DEBUG(_env, "bound shard %s sock to port %s", i/2, ntohs(addr.sin_port)); + // CDC req/resps are very small (say 50bytes), so this gives us space for + // 20k responses, which paired with the high timeout we currently set in production + // (1s) should give us high throughput without retrying very often. + int bufSize = 1<<20; + if (setsockopt(sock, SOL_SOCKET, SO_RCVBUF, (void*)&bufSize, sizeof(bufSize)) < 0) { + throw SYSCALL_EXCEPTION("setsockopt"); + } } } diff --git a/kmod/super.c b/kmod/super.c index 08bc2f18..060655d8 100644 --- a/kmod/super.c +++ b/kmod/super.c @@ -189,7 +189,7 @@ static struct eggsfs_fs_info* eggsfs_init_fs_info(const char* dev_name) { if (err != 0) { goto out_socket; } INIT_DELAYED_WORK(&eggsfs_info->shuckle_refresh_work, eggsfs_shuckle_refresh_work); - schedule_delayed_work(system_long_wq, &eggsfs_info->shuckle_refresh_work, eggsfs_shuckle_refresh_time_jiffies); + queue_delayed_work(system_long_wq, &eggsfs_info->shuckle_refresh_work, eggsfs_shuckle_refresh_time_jiffies); eggsfs_info("mount successful"); return eggsfs_info;