diff options
author | dormando <dormando@rydia.net> | 2023-03-13 21:47:54 -0700 |
---|---|---|
committer | dormando <dormando@rydia.net> | 2023-03-26 16:48:37 -0700 |
commit | 595758ad02ac3ab57ae981c9d736563812861eaf (patch) | |
tree | aec2940c0794667c1c1dfb3c17ad3f6074f2c2dd /proto_proxy.c | |
parent | 6d767eb78ae256375cfe23a0a91ea6e12e046d6b (diff) | |
download | memcached-595758ad02ac3ab57ae981c9d736563812861eaf.tar.gz |
proxy: rip out io_uring code
with the event handler rewrite the IO thread scales much better (up to
8-12 worker threads), leaving the io_uring code in the dust.
realistically io_uring won't be able to beat the event code if you're
using kernels older than 6.2, which is brand new. Instead of carrying
all this code around and having people randomly try it to get more
performance, I want to rip it out of the way and add it back in later
when it makes sense.
I am using mcshredder as a platform to learn and keep up to date with
io_uring, and will port over its usage pattern when it's time.
Diffstat (limited to 'proto_proxy.c')
-rw-r--r-- | proto_proxy.c | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/proto_proxy.c b/proto_proxy.c index 9a6736b..e99f893 100644 --- a/proto_proxy.c +++ b/proto_proxy.c @@ -154,11 +154,6 @@ void *proxy_init(bool use_uring) { ctx->tunables.connect.tv_sec = 5; ctx->tunables.retry.tv_sec = 3; ctx->tunables.read.tv_sec = 3; -#ifdef HAVE_LIBURING - ctx->tunables.connect_ur.tv_sec = 5; - ctx->tunables.retry_ur.tv_sec = 3; - ctx->tunables.read_ur.tv_sec = 3; -#endif // HAVE_LIBURING STAILQ_INIT(&ctx->manager_head); lua_State *L = luaL_newstate(); @@ -173,15 +168,7 @@ void *proxy_init(bool use_uring) { ctx->proxy_io_thread = t; proxy_init_event_thread(t, ctx, NULL); -#ifdef HAVE_LIBURING - if (t->use_uring) { - pthread_create(&t->thread_id, NULL, proxy_event_thread_ur, t); - } else { - pthread_create(&t->thread_id, NULL, proxy_event_thread, t); - } -#else pthread_create(&t->thread_id, NULL, proxy_event_thread, t); -#endif // HAVE_LIBURING thread_setname(t->thread_id, "mc-prx-io"); _start_proxy_config_threads(ctx); |