1 / 19
文档名称:

redis深入浅出-阮若夷.ppt

格式:ppt   页数:19页
下载后只包含 1 个 PPT 格式的文档,没有任何的图纸或源代码,查看文件列表

如果您已付费下载过本站文档,您可以点这里二次下载

分享

预览

redis深入浅出-阮若夷.ppt

上传人:825790901 2016/4/18 文件大小:0 KB

下载得到文件列表

redis深入浅出-阮若夷.ppt

相关文档

文档介绍

文档介绍:redis 深入浅出 Agenda ? Feature&Architecture ? Admin&capcity forecast ? Replication ? Presistence ? Table design Feature redis memcached data structure string|list|hash|set|zset string thread model third(main thread, two auxiliary thread) many demultiplexer libevent( 3 rd library ) persistence yes no replication yes no design weak no String ? Set hello world ? Set hello 1234567 ? Set hello 1234 List ? Lpush list aaaa c ? Double link list, so can lpush,rpush,lpop,rpop Zipmap Hset test hello world Hset test aliyun dba Zipmap defect:Zmlen one bytes, only 253 subkey Architecture Rehash Cache forecast string 类型的内存大小= 键值个数* (dictEntry 大小+ redisObject 大小+ 包含 key 的 sds 大小+ 包含 value 的 sds 大小) + bucket 个数* 4 zipmap 类型的内存大小= hashkey 个数* (dictEntry 大小+ redisObject 大小+ 包含 key 的 sds 大小+ subkey 的总大小) + bucket 个数* 4 Jemalloc size class Admin ? (static), config set(dynamic) – maxmemory <bytes> – Appendfsync everysec(fsync pagecache to disk) – hash-max-zipmap-entries 512 – hash-max-zipmap-value 64