amazon-web-services - Redis 6 可以利用多核 CPU 吗?

标签 amazon-web-services redis amazon-elasticache

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/

相关文章:

amazon-web-services - 连接到 Amazon EC2 实例突然挂起

mysql - 亚马逊网络服务 mysql2 数据库

amazon-web-services - Cloudformation init - 安装多个包

database - Redis中的限制列表长度

python - AWS ElastiCache 描述 CacheClusters

git - AWS Elastic Beanstalk [远程拒绝](拒绝 Hook )

python - 如何在redis缓存中使用django-redis hset操作

node.js:为什么 NODE_DEBUG=1 不起作用? (试图调试 require() 错误)

amazon-web-services - 使用传输中加密连接到 AWS ElastiCache + 来自 redis-cli+stunnel 以外的客户端的身份验证

amazon-web-services - 从对等 VPC 连接到 Elasticache Redis 集群