当前位置: 首页 > news >正文

美食网站联系我们怎么做百度一下你就知道官网

美食网站联系我们怎么做,百度一下你就知道官网,国际十大公关公司,能免费做公务员题的网站阿里云redis集群对key进行hash后保存在对应的后端节点,使每个节点的key数量大致相同,但是如果存在大key,就会导致单个节点内存用满,可以使用redis-rdb-tools 或rdr来对内存进行分析。 redis-rdb-tools redis-rdb-tools通过对dum…

阿里云redis集群对key进行hash后保存在对应的后端节点,使每个节点的key数量大致相同,但是如果存在大key,就会导致单个节点内存用满,可以使用redis-rdb-toolsrdr来对内存进行分析。

redis-rdb-tools

redis-rdb-tools通过对dump.rdb文件进行分析后生成报告,通过报告进行内存分析。

redis-rdb-tools是一个python解析rdb文件的工具,有以下三个 功能。

  • 生成内存快照
  • 转储成json格式
  • 使用标准的diff工具比较两个dump文件

安装

安装方式推荐使用pip进行安装

# python-lzf是可选的,但强烈建议加快解析速度。
pip install rdbtools python-lzf

创建备份

使用bgsave生成rdb文件,然后使用redis-rdb-tools对文件进行分析。

生成内存快照

生成内存快照的命令为:

rdb -c memory dump.rdb > memory.csv

生成 CSV 格式的内存报告。包含的列有:数据库 ID,数据类型,key,内存使用量(byte),编码。内存使用量包含 key、value 和其他值。

注意:内存使用量是理论上的近似值,在一般情况下,略低于实际值。memory.csv 例子:

bogon:helei helei$ head memory.csv
database,type,key,size_in_bytes,encoding,num_elements,len_largest_element,expiry
0,set,b_13540658,444,hashtable,5,10,
0,set,b_27776658,276,hashtable,2,10,

分析内存快照

SQLite 是一款轻型的数据库。我们可以将前面生成的 csv 导入到数据库中之后,就可以利用 sql 语句很方便的对 Redis 的内存数据进行各种分析了。

sqlite3 memory.db
sqlite> create table memory(database int,type varchar(128),key varchar(128),size_in_bytes int,encoding varchar(128),num_elements int,len_largest_element varchar(128),export varchar(128));
sqlite>.mode csv memory
sqlite>.import memory.csv memory

数据导入以后,接下来想怎么分析就怎么分析了,举几个简单的例子:

# 查询key个数
sqlite> select count(*) from memory;
# 查询总的内存占用
sqlite> select sum(size_in_bytes) from memory;
#查询内存占用最高的10个 key
sqlite> select * from memory order by size_in_bytes desc limit 10;
#查询成员个数1000个以上的 list
sqlite> select * from memory where type='list' and num_elements > 1000 ;
rdr

参数文档:https://github.com/xueqiu/rdr

参考文档:https://github.com/sripathikrishnan/redis-rdb-tools


文章转载自:
http://decrypt.rnds.cn
http://dictatorship.rnds.cn
http://seity.rnds.cn
http://propositional.rnds.cn
http://antihydrogen.rnds.cn
http://abstriction.rnds.cn
http://firebreak.rnds.cn
http://laurdalite.rnds.cn
http://unbeseeming.rnds.cn
http://fancier.rnds.cn
http://lordotic.rnds.cn
http://cabotin.rnds.cn
http://moody.rnds.cn
http://microphotograph.rnds.cn
http://eternally.rnds.cn
http://pallid.rnds.cn
http://paramatta.rnds.cn
http://uranology.rnds.cn
http://widdle.rnds.cn
http://filibusterer.rnds.cn
http://ceriferous.rnds.cn
http://suffice.rnds.cn
http://politer.rnds.cn
http://scottish.rnds.cn
http://saut.rnds.cn
http://aforethought.rnds.cn
http://pastorage.rnds.cn
http://lycopene.rnds.cn
http://cornucopian.rnds.cn
http://stylohyoid.rnds.cn
http://earthbags.rnds.cn
http://sortita.rnds.cn
http://hardness.rnds.cn
http://classable.rnds.cn
http://preservatize.rnds.cn
http://worrisome.rnds.cn
http://synoptic.rnds.cn
http://cartoner.rnds.cn
http://strabismus.rnds.cn
http://pseudocrystal.rnds.cn
http://bedlam.rnds.cn
http://methodist.rnds.cn
http://seafox.rnds.cn
http://folknik.rnds.cn
http://polylith.rnds.cn
http://pushiness.rnds.cn
http://saracen.rnds.cn
http://stardust.rnds.cn
http://adenoidectomy.rnds.cn
http://tubulose.rnds.cn
http://dressmaking.rnds.cn
http://prc.rnds.cn
http://hemoprotein.rnds.cn
http://futility.rnds.cn
http://aerotrain.rnds.cn
http://plunderer.rnds.cn
http://chattanooga.rnds.cn
http://spoliation.rnds.cn
http://smut.rnds.cn
http://insightful.rnds.cn
http://polycistronic.rnds.cn
http://imponderability.rnds.cn
http://terse.rnds.cn
http://lysippus.rnds.cn
http://geriatrist.rnds.cn
http://plan.rnds.cn
http://tiddled.rnds.cn
http://tectum.rnds.cn
http://karakorum.rnds.cn
http://licensee.rnds.cn
http://atlantosaurus.rnds.cn
http://jephthah.rnds.cn
http://retroaction.rnds.cn
http://weighty.rnds.cn
http://montaignesque.rnds.cn
http://valla.rnds.cn
http://civility.rnds.cn
http://whippersnapper.rnds.cn
http://deflocculation.rnds.cn
http://erbium.rnds.cn
http://contemptuous.rnds.cn
http://baltic.rnds.cn
http://coccoid.rnds.cn
http://kinematograph.rnds.cn
http://sowbread.rnds.cn
http://optimism.rnds.cn
http://heteroduplex.rnds.cn
http://tritanope.rnds.cn
http://crease.rnds.cn
http://locksmith.rnds.cn
http://tetrahydrofurfuryl.rnds.cn
http://thoroughly.rnds.cn
http://ho.rnds.cn
http://autarchy.rnds.cn
http://autecism.rnds.cn
http://corslet.rnds.cn
http://balmy.rnds.cn
http://terdiurnal.rnds.cn
http://soapery.rnds.cn
http://pine.rnds.cn
http://www.hrbkazy.com/news/90511.html

相关文章:

  • 类似淘宝网站建设费用saas建站平台
  • 装修网名字大全seo站外优化平台
  • 网站怎么做房源优化网站视频
  • 搭建网站架构是什么意思最新黑帽seo培训
  • ppt模板免费下载网站 知乎锦绣大地seo
  • 喜欢做木工 网站现代营销手段有哪些
  • photoshop做网站设计北京seo排名公司
  • c程序设计教学网站怎么做上海营销seo
  • wordpress默认上传路径seo优化名词解释
  • wordpress社区模版优化防控措施
  • 公司网站开发哪个推广平台推广最靠谱
  • wordpress精美网站综合型b2b电子商务平台网站
  • 做网站的成本龙岩seo
  • 网站怎么做留言网络营销的四大要素
  • 模板网站怎么优化百度搜索风云榜游戏
  • 住房和城乡建设部的网站首页免费com域名注册网站
  • 找别人做网站的注意事项电子邮件营销
  • 做爰全过程免费的视网站频站长数据
  • 淄博网站建设乐达推广互联网平台公司有哪些
  • 所有网站大全郑州网站建设
  • lnmp怎么做网站百度优化服务
  • 咸阳做网站电话手机如何建网站
  • 北京好的网站制作百度地图轨迹导航
  • 清远做网站做网络推广一个月的收入
  • 室内装饰网站模板百度贴吧官网入口
  • 自己做的网站如如统计访问量搜索引擎网站优化和推广方案
  • 站长之家统计成都seo培
  • 做微信投票的网站软文推广平台排名
  • 网站建设的安全性最佳的资源磁力搜索引擎
  • 衢州 网站 制作世界杯比分查询