- 浏览: 1011149 次
- 性别:
- 来自: 杭州
文章分类
- 全部博客 (826)
- 硬件 (8)
- 软件 (24)
- 软件工程 (34)
- JAVA (229)
- C/C++/C# (77)
- JavaScript (8)
- PHP (1)
- Ruby (3)
- MySQL (14)
- 数据库 (19)
- 心情记事 (12)
- 团队管理 (19)
- Hadoop (1)
- spring (22)
- mybatis(ibatis) (7)
- tomcat (16)
- velocity (0)
- 系统架构 (6)
- JMX (8)
- proxool (1)
- 开发工具 (16)
- python (10)
- JVM (27)
- servlet (5)
- JMS (26)
- ant (2)
- 设计模式 (5)
- 智力题 (2)
- 面试题收集 (1)
- 孙子兵法 (16)
- 测试 (1)
- 数据结构 (7)
- 算法 (22)
- Android (11)
- 汽车驾驶 (1)
- lucene (1)
- memcache (12)
- 技术架构 (7)
- OTP-Erlang (7)
- memcached (17)
- redis (20)
- 浏览器插件 (3)
- sqlite (3)
- Heritrix (9)
- Java线程 (1)
- scala (0)
- Mina (6)
- 汇编 (2)
- Netty (15)
- libevent (0)
- CentOS (12)
- mongod (5)
- mac os (0)
最新评论
-
kingasdfg:
你这里面存在一个错误添加多个任务 应该是这样的 /** * ...
Quartz的任务的临时启动和暂停和恢复【转】 -
kyzeng:
纠正一个错误,long型对应的符号是J,不是L。
Jni中C++和Java的参数传递 -
zhaohaolin:
抱歉,兄弟,只是留下作记录,方便学习,如果觉得资料不好,可以到 ...
netty的个人使用心得【转】 -
cccoooccooco:
谢谢!自己一直以为虚机得使用网线才可以与主机连接呢。。
主机网卡无网线连接与虚拟机通信 -
yuqilin001:
要转别人的东西,请转清楚点嘛,少了这么多类,误人子弟
netty的个人使用心得【转】
I’ve been testing Redis 2.0.0-rc3 in the hopes of upgrading our clusters very soon. I really want to take advantage of hashes and various tweaks and enhancements that are in the 2.0 tree . I was also curious about the per-key memory overhead and wanted to get a sense of how many keys we’d be able to store in our ten machine cluster. I assumed (well, hoped) that we’d be able to handle 1 billion keys, so I decided to put it to the test.
I installed redis-2.0.0-rc3 (reported as the 1.3.16 development version) on two hosts: host1 (master) and host2 (slave).
Then I ran two instances of a simple Perl script on host1:
#!/usr/bin/perl -w $|++; use strict; use Redis; my $r = Redis->new(server => 'localhost:63790') or die "$!"; for my $key (1..100_000_000) { my $val = int(rand($key)); $r->set("$$:$key", $val) or die "$!"; } exit; __END__
Basically that creates 100,000,000 keys with randomly chosen integer values. They keys are “$pid:$num” where $pid is the process id (so I could run multiple copies). In Perl the variable $$ is the process id. Before running the script, I created a “foo” key with the value “bar” to check that replication was working. Once everything looked good, I fired up two copies of the script and watched.
I didn’t time the execution, but I’m pretty sure I took a bit longer than 1 hour–definitely less than 2 hours. The final memory usage on both hosts was right about 24GB.
Here’s the output of INFO from both:
Master:
redis_version:1.3.16 redis_git_sha1:00000000 redis_git_dirty:0 arch_bits:64 multiplexing_api:epoll process_id:10164 uptime_in_seconds:10701 uptime_in_days:0 connected_clients:1 connected_slaves:1 blocked_clients:0 used_memory:26063394000 used_memory_human:24.27G changes_since_last_save:79080423 bgsave_in_progress:0 last_save_time:1279930909 bgrewriteaof_in_progress:0 total_connections_received:19 total_commands_processed:216343823 expired_keys:0 hash_max_zipmap_entries:64 hash_max_zipmap_value:512 pubsub_channels:0 pubsub_patterns:0 vm_enabled:0 role:master db0:keys=200000001,expires=0
Slave:
redis_version:1.3.16 redis_git_sha1:00000000 redis_git_dirty:0 arch_bits:64 multiplexing_api:epoll process_id:5983 uptime_in_seconds:7928 uptime_in_days:0 connected_clients:2 connected_slaves:0 blocked_clients:0 used_memory:26063393872 used_memory_human:24.27G changes_since_last_save:78688774 bgsave_in_progress:0 last_save_time:1279930921 bgrewriteaof_in_progress:0 total_connections_received:11 total_commands_processed:214343823 expired_keys:0 hash_max_zipmap_entries:64 hash_max_zipmap_value:512 pubsub_channels:0 pubsub_patterns:0 vm_enabled:0 role:slave master_host:host1 master_port:63790 master_link_status:up master_last_io_seconds_ago:512 db0:keys=200000001,expires=0
This tells me that on a 32GB box, it’s not unreasonable to host 200,000,000 keys (if their values are sufficiently small). Since I was hoping for 100,000,000 with likely lager values, I think this looks very promising. With a 10 machine cluster, that easily gives us 1,000,000,000 keys.
In case you’re wondering, the redis.conf on both machines looked like this.
daemonize yes pidfile /var/run/redis-0.pid port 63790 timeout 300 save 900 10000 save 300 1000 dbfilename dump-0.rdb dir /u/redis/data/ loglevel notice logfile /u/redis/log/redis-0.log databases 64 glueoutputbuf yes
The resulting dump file (dump-0.rdb) was 1.8GB in size.
I’m looking forward to the official 2.0.0 release.
- Share this:
- Share
JDM Logo Shaped Key Blanks K's Logo, Silvia Logo, 5 Colors
www.Rotary13B1.com/Silvia_Key_Blank
specializes in the manufacture of blank keys, color key. OEM and ODM
www.golden-key.com.tw
发表评论
-
Redis入门教程
2011-07-12 22:08 2157入门教程,仅供菜鸟。 ... -
Redis数据库介绍
2011-07-12 22:07 28171. Redis是什么 这个问题的结果影响了我们怎么用R ... -
redis-sharding – 一个 Redis Proxy【转】
2011-04-28 01:43 1647redis-sharding 是一个由perl写的 Redis ... -
redis 运维实际经验纪录之一【转】
2011-04-26 11:30 1181发表于 2010/05/25 由 ... -
1,250,000,000 Key/Value Pairs in Redis 2.0.0-rc3 on a 32GB Machine【转】
2011-04-26 11:28 909Posted on July 25, 20 ... -
Redis配置文件各项参数说明【转】
2011-04-26 11:00 1623最近一个项目用到Redis ... -
Redis配置主从服务器【转】
2011-04-26 10:31 1271redis配置主从服务器 R ... -
More Redis internals: Tracing a GET & SET【转】
2011-04-26 10:09 1862In my previous article , I too ... -
深入Redis内部-Redis 源码讲解【转】
2011-04-26 10:08 603Redis 作为 NoSQL 数据库的杰出代表,一直广受关注, ... -
redis安装配置及使用【转】
2011-04-26 09:03 15672011-03-27 20:41 http://cod ... -
Redis安装配置【转】
2011-04-26 09:02 2043http://bbs.linuxtone.org/thread ... -
闲聊Redis【转】
2011-04-26 09:00 1157Redis 是一个有趣 的项目,与其把它说成键值存储、键 ... -
redis知识点整理【转】
2011-04-25 22:40 1061xmind做的笔记,可惜只能截图 关键字: ... -
jedis线程池的代码【转】
2011-04-25 22:36 2799备忘:(本机i5的测试数据:redis线程执行时间是:2118 ... -
在多台服务器上简单实现Redis的数据主从复制【转】
2011-04-25 22:27 1215Redis的主从复制功能非常强大,一个mas ter可以拥有 ... -
归档Redis在Windows,linux平台下的安装配置【转】
2011-04-25 22:25 2212为了方便查阅资料,特将网上搜索到的Redis相关安装配置进行归 ... -
Redis在Windows下的使用[转]
2011-04-25 22:24 1154Windows版的Redis可到此处下载,非官方版http:/ ... -
windows下redis和memcached的性能对比测试【转】
2011-04-25 22:19 1696在windows下测试了redis和memcached的性能, ... -
膜拜Redis【转】
2011-04-25 21:14 983膜拜Redis 2009年06月18 ...
相关推荐
安装完成后,您可以使用`redis-cli`客户端进行交互式操作,或通过编程语言的Redis客户端库与服务器通信。 总结,Redis 2.0.0-x64 server是一个重要的版本,它提供了一组强大而灵活的数据结构和特性,适用于高性能、...
tomcat-redis-session-manager-2.0.0.jar,可用于Tomcat8下Redis的Session共享,亲测可用,还需要下载另外两个jar包:commons-pool2-2.4.2.jar和jedis-2.9.0.jar,maven仓库有,此处不再上传
redis-stack-server-7.2.0-v9.arm64.snap redis-stack-server-7.2.0-v9.bionic.arm64.tar.gz redis-stack-server-7.2.0-v9.bionic.x86_64.tar.gz redis-stack-server-7.2.0-v9.bullseye.x86_64.tar.gz redis-stack-...
tomcat-redis-session-manager-2.0.0.jar jedis-2.5.2.jar commons-pool2-2.2.jar 2.修改 conf 目录下的 context.xml 文件 host="localhost" port="6379" database="0" maxInactiveInterval="60" /> ...
3. **配置灵活性**: `tomcat-redis-session-manager-2.0.0`提供了丰富的配置选项,允许开发者自定义Redis连接参数,如主机地址、端口、密码,以及Session过期策略等。 4. **性能优化**: 使用了高效的序列化和反序列...
php_redis-4.1.0rc3-7.0-ts-vc14-x86.zip windows+redis
在本案例中,我们讨论的是Redis的3.0.0 Release Candidate 5(rc5)版本的安装包,文件名为"redis-3.0.0-rc5.tar.gz"。这个版本在正式发布3.0.0之前,是一个测试版,用于发现并修复潜在问题,以确保最终版本的稳定性...
在压缩包中的两个jar文件,`tomcat8-redis-session-manager-2.0.0.jar`和`tomcat7-redis-session-manager-2.0.0.jar`,分别对应Tomcat8和Tomcat7的实现。这两个jar包包含了实现session与Redis交互的所有必要组件,如...
tomcat-redis-session-manager-1.2-tomcat-7-java-7tomcat-redis-session-manager-1.2-tomcat-7-java-7tomcat-redis-session-manager-1.2-tomcat-7-java-7tomcat-redis-session-manager-1.2-tomcat-7-java-7tomcat-...
如果我们在一个网站上登录了账号和密码,登录成功的信息存放在后端服务器A上,那么如果我们刷新后,将会登录到服务器B上 这个时候,我们需要重新登录,如果做了session共享后,登录信息会缓存到redis中,我们就不...
redis-5.0.14-1.el7.remi.x86_64.rpm安装包(含有部署手册) redis-5.0.14-1.el7.remi.x86_64.rpm安装包(含有部署手册) redis-5.0.14-1.el7.remi.x86_64.rpm安装包(含有部署手册) redis-5.0.14-1.el7.remi.x86_64.rpm...
tomcat8.5 redis-session-manager 支持8.5 亲测 <Valve className="com.s.tomcat.redissessions.RedisSessionHandlerValve"/> host="192.168.10.162" port="6379" database="0" password="trj123456" ...
实现多个tomcat之间session共享问题,将此jar包放入tomcat lib目录,并在content.xml中配置如下: <Valve className="com.orangefunction.tomcat.redissessions.RedisSessionHandlerValve" /> ...
redis-5.0.5.redis-5.0.5.redis-5.0.5.redis-5.0.5.redis-5.0.5.redis-5.0.5.redis-5.0.5.redis-5.0.5.redis-5.0.5.redis-5.0.5.redis-5.0.5.redis-5.0.5.redis-5.0.5.redis-5.0.5.redis-5.0.5.redis-5.0.5.redis-...
**Redis 全面检查工具:redis-full-check** Redis 是一款高性能的键值存储系统,广泛应用于缓存、数据库和消息中间件等场景。在实际应用中,为了确保 Redis 的稳定性和数据一致性,需要定期对 Redis 实例进行健康...
【标题】"tomcat-redis-session-manager包集合下载(tomcat8)"涉及的主要知识点是将Redis集成到Tomcat中管理会话(session),以提高Web应用的性能和可扩展性。 【描述】中提到的"所需的tomcat-redis-session-...
【标题】"tomcat-redis-session-manager jar包"是一个用于集成Redis进行Session管理的Java库,特别设计用于Apache Tomcat服务器。这个库使得在多台Tomcat服务器之间共享和协调用户的Session数据成为可能,从而提高了...
for key in keys: pipe.get(key) responses = pipe.execute() ``` 总的来说,`redis-py-cluster`是Python开发者在处理Redis集群时的重要工具,它提供了方便、健壮的接口,使得在Python应用中使用Redis集群变得...