我是靠谱客的博主 美好白云,最近开发中收集的这篇文章主要介绍Redis怎么扩展为多CPU(多核),觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

原文地址:http://redis.io/topics/faq

Redis is single threaded. How can I exploit multiple CPU / cores?

It's very unlikely that CPU becomes your bottleneck with Redis, as usually Redis is either memory or network bound. For instance, using pipelining Redis running on an average Linux system can deliver even 500k requests per second, so if your application mainly uses O(N) or O(log(N)) commands, it is hardly going to use too much CPU.

However, to maximize CPU usage you can start multiple instances of Redis in the same box and treat them as different servers. At some point a single box may not be enough anyway, so if you want to use multiple CPUs you can start thinking of some way to shard earlier.

You can find more information about using multiple Redis instances in the Partitioning page.



最后

以上就是美好白云为你收集整理的Redis怎么扩展为多CPU(多核)的全部内容,希望文章能够帮你解决Redis怎么扩展为多CPU(多核)所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(41)

评论列表共有 0 条评论

立即
投稿
返回
顶部