自 Redis 6 supports multi-threaded IO , 在超过 2 个内核的机器上部署 Redis 有意义吗?它是否能够利用额外的内核,或者 2 个内核仍然是理想的(一个用于主线程,另一个用于处理 bgsave 和其他内务操作)?
同样,在 AWS ElastiCache 上使用具有 >2 个 vCPU 的实例类型是否有意义?
最佳答案
基于release notes ,我想是的。
这是那里的一些小信息:
Despite Redis’ well-deserved reputation for high performance, its single-threaded architecture has been controversial among engineers who wondered if Redis could be even faster. Redis 6 rings in a new era: while it retains a core single-threaded data-access interface, I/O is now threaded.
By delegating the time spent reading and writing to I/O sockets over to other threads, the Redis process can devote more cycles to manipulating, storing, and retrieving data—boosting overall performance. This improvement retains the transactional characteristics of previous versions, so you don’t have to rethink your applications to take advantage of the increased performance. Similarly, Redis’ single-threaded DEL command can now be configured to behave like the multi-thread UNLINK command that has been available since Redis version 4.
The performance of a local variable is almost always unbeatable, Finally, even a database as high performance as Redis will be much slower than accessing something from the stack or heap. Redis 6 adds a new technique for sophisticated client libraries to implement a client-side caching layer to store a subset of data in your own process. This implementation is smart enough to manage multiple updates to the same data and keep your data as in-sync as possible—while retaining the advantages of Redis with the speed of local variables.
你也可以用 redis-benchmark 检查/比较它或 memtier用于您的实例/工作负载配置文件。
关于amazon-web-services - Redis 6 可以利用多核 CPU 吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64261077/