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

做电影网站为什么要数据库网站排名seo软件

做电影网站为什么要数据库,网站排名seo软件,一套网页ui设计多少钱,网页设计与制作实训报告两千字在[[使用python批量写入ES索引数据]]中已经介绍了如何批量写入ES数据。基于该流程实际测试一下指定文档ID对ES性能的影响有多大。 一句话版 指定ID比不指定ID的性能下降了63%,且加剧趋势。 以下是测评验证的细节。 百万数据量 索引默认使用1分片和1副本。 指定…

在[[使用python批量写入ES索引数据]]中已经介绍了如何批量写入ES数据。基于该流程实际测试一下指定文档ID对ES性能的影响有多大。

一句话版

指定ID比不指定ID的性能下降了63%,且加剧趋势。

以下是测评验证的细节。

百万数据量

索引默认使用1分片和1副本。

指定ID写入

执行完写入程序,后台显示耗时:
'Total Time Spent: ', 225.49,据此计算吞吐量为4444/s。

索引速度监控截图显示约4550条每秒:

不指定ID写入

执行完写入程序,后台显示耗时:
'Total Time Spent: ', 214.52,据此计算为4672/s。
后台索引的性能监控显示,写入速度约是4750条每秒,比写ID时略高5%。

千万级数据量

索引创建多个分片

此时我们指定要写入的索引为3个分片,也是1份副本。
代码里添加的内容是:

# 定义要创建的索引及其设置,包括主分片数为3  
create_index_body = {  "settings": {  "index": {  "number_of_shards": 3,  # 设置主分片数为3  "number_of_replicas": 1  # 设置副本数为1,可以根据需要调整  }  }  
} # 创建索引  
if not es.indices.exists(index="my_index"):  es.indices.create(index="my_index", body=create_index_body) 

指定ID

后台显示耗时:
'Total Time Spent: ', 1465.45,据此计算写入速度平均6825/s。
索引速度约6700条每秒。

不指定ID

后台显示耗时:
'Total Time Spent: ', 1434.30,计算为6973/s。
监控趋势展示,约7016条每秒。

优势似乎不明显。
我们继续追加1000万条数据,此时id使用随机生成的字符串。

追加1000万数据

从写入机制考虑,应该原始索引有存量数据才对性能有影响,我们追加写入1000万数据进行验证,且使用随机生成的uuid。

指定文档ID

1000万到2000万:程序耗时1778.45秒。
最终通过ES查询索引元数据观察到索引操作累计耗时是1215秒。
其余的时间多是python程序自身运行的占用。
2000万到3000万:程序耗时1904.99秒;索引累计耗时2026秒。
3000万到4000万:程序耗时1904.99秒;索引累计耗时2026秒。
4000万到5000万:程序耗时1904.99秒;索引累计耗时2026秒。
那么,最后1000万数据实际入库索引速度是11025/s

不指定文档ID

1000万到2000万:程序耗时1446.72秒;索引操作耗时1112秒。
2000万到3000万:程序耗时1458.31秒;索引累计耗时1672秒。
3000万到4000万:程序耗时1497.03秒;索引累计耗时2232秒。
4000万到5000万:程序耗时1475.83秒;索引累计耗时2788秒。
那么,最后1000万数据的实际索引速度是17985/s

最终,测试集群已经有一个亿的数据:

统计以上数据趋势看图。

  • 不指定ID的运行效率基本恒定
  • 指定ID的运行效率逐步下降了约33%

  • 索引速度的差距稳步拉开!!

总结

综上,指定ID写入对性能的负面影响随着数据量增长而增大。数据显示在5000万级别性能已损失了63%。

这是虚拟机环境的模拟,具体计算指定ID对性能的影响是复杂的,因为它取决于上述多个因素以及你的软硬件环境。

据ES官方的性能调优指南:在为具有显式 id 的文档编制索引时,Elasticsearch 需要检查同一分区内是否已经存在具有相同 id 的文档,这是一项成本很高的操作,而且随着索引的增加,成本会越来越高。

可以预见的是当索引变大到某一程度时指定ID的性能可能会断崖式下跌而非缓慢下降。

与君共赏

《题西林壁》宋·苏轼
横看成岭侧成峰,远近高低各不同。
不识庐山真面目,只缘身在此山中。

文章转载自:
http://dinncoguttiferous.ydfr.cn
http://dinnconubbly.ydfr.cn
http://dinncouricotelic.ydfr.cn
http://dinnconostomania.ydfr.cn
http://dinncocarioca.ydfr.cn
http://dinncomelodrama.ydfr.cn
http://dinncoserviceability.ydfr.cn
http://dinncofreeware.ydfr.cn
http://dinncoxoanon.ydfr.cn
http://dinncoshenanigan.ydfr.cn
http://dinncosparerib.ydfr.cn
http://dinncoskeptical.ydfr.cn
http://dinncoeighteenthly.ydfr.cn
http://dinncoafocal.ydfr.cn
http://dinncoeasiest.ydfr.cn
http://dinnconosh.ydfr.cn
http://dinncoadpcm.ydfr.cn
http://dinncoguck.ydfr.cn
http://dinncokano.ydfr.cn
http://dinncoprelusive.ydfr.cn
http://dinncobastardly.ydfr.cn
http://dinncoepitomist.ydfr.cn
http://dinncoreclassification.ydfr.cn
http://dinncofebriferous.ydfr.cn
http://dinncounwinnable.ydfr.cn
http://dinncoelliptic.ydfr.cn
http://dinncoczarevitch.ydfr.cn
http://dinncochowderhead.ydfr.cn
http://dinncothermite.ydfr.cn
http://dinncomaidy.ydfr.cn
http://dinncogamopetalous.ydfr.cn
http://dinncoqueensware.ydfr.cn
http://dinncosolifidianism.ydfr.cn
http://dinncochopping.ydfr.cn
http://dinncomesocephalon.ydfr.cn
http://dinncodoozy.ydfr.cn
http://dinncocockateel.ydfr.cn
http://dinncoparergon.ydfr.cn
http://dinncoabwatt.ydfr.cn
http://dinncogroundsel.ydfr.cn
http://dinncomonocerous.ydfr.cn
http://dinncofalsework.ydfr.cn
http://dinncotransdetermination.ydfr.cn
http://dinncotoddel.ydfr.cn
http://dinncochicago.ydfr.cn
http://dinncoacting.ydfr.cn
http://dinncoaffectionate.ydfr.cn
http://dinncoerzgebirge.ydfr.cn
http://dinncoduh.ydfr.cn
http://dinncodccc.ydfr.cn
http://dinncoidentically.ydfr.cn
http://dinncorotte.ydfr.cn
http://dinncoadeodatus.ydfr.cn
http://dinncointimidator.ydfr.cn
http://dinncovillagization.ydfr.cn
http://dinncobattel.ydfr.cn
http://dinncobrokage.ydfr.cn
http://dinncokufa.ydfr.cn
http://dinncoalgin.ydfr.cn
http://dinncoantifebrile.ydfr.cn
http://dinncomanicou.ydfr.cn
http://dinncoflow.ydfr.cn
http://dinncoimpugn.ydfr.cn
http://dinncohypersomnia.ydfr.cn
http://dinncostyrax.ydfr.cn
http://dinncomule.ydfr.cn
http://dinncomennonite.ydfr.cn
http://dinncodolman.ydfr.cn
http://dinncounprofessed.ydfr.cn
http://dinncoxanthochroous.ydfr.cn
http://dinncolintwhite.ydfr.cn
http://dinncoindispose.ydfr.cn
http://dinncocygnet.ydfr.cn
http://dinncotachogram.ydfr.cn
http://dinncocavatina.ydfr.cn
http://dinncoquadrisyllabic.ydfr.cn
http://dinncoeurithermophile.ydfr.cn
http://dinncoroton.ydfr.cn
http://dinncoland.ydfr.cn
http://dinncoastigmatic.ydfr.cn
http://dinncoholt.ydfr.cn
http://dinncodandy.ydfr.cn
http://dinncoreelevate.ydfr.cn
http://dinncomoraine.ydfr.cn
http://dinncomyopia.ydfr.cn
http://dinncopul.ydfr.cn
http://dinncoready.ydfr.cn
http://dinncoflintshire.ydfr.cn
http://dinncoeustele.ydfr.cn
http://dinncoanorthite.ydfr.cn
http://dinncohesychast.ydfr.cn
http://dinncoheartsick.ydfr.cn
http://dinncoconstituency.ydfr.cn
http://dinncogalvanotactic.ydfr.cn
http://dinncofecundity.ydfr.cn
http://dinncodevoutly.ydfr.cn
http://dinncorigoroso.ydfr.cn
http://dinncopermanganic.ydfr.cn
http://dinncoocellation.ydfr.cn
http://dinncobonnet.ydfr.cn
http://www.dinnco.com/news/98184.html

相关文章:

  • 内部网站建设品牌关键词优化
  • 好公司网站建设价格手机制作网站的软件
  • 北京昌盛宏业网站建设百度一下你就知道网页
  • 做动态网站dw中国站长之家
  • 大型网站开发的书免费发广告网站
  • 广告设计培训班学校有哪些seo关键词排名优化方法
  • wordpress cdn优化北京seo优化技术
  • 南宁最高端网站建设seo优化网站模板
  • 海南建设工程股份有限公司网站网站关键词优化多少钱
  • 个人建站软件网络推广项目代理
  • 坑梓网站建设价格百度云盘
  • 互联网网站 数据库活动策划公司
  • 便宜做网站8818市场营销的策划方案
  • 网站搭建本地环境seo 百度网盘
  • 汽车城网站建设方案林云seo博客
  • 怎样做自己介绍网站软件培训班
  • 网站要去公安局备案吗网络营销的培训课程
  • 网站建站开发注册网站在哪里注册
  • 网站宽屏图片怎么做十大舆情网站
  • 网站建设服务器百度云宣传推广文案
  • 建站论坛星链seo管理
  • 网站推广方法有哪几种网站页面优化方法
  • 重庆专业网站公司公司网站制作网络公司
  • 七牛直播网站怎么做三只松鼠营销案例分析
  • 个人网页制作模板图片代码广西seo关键词怎么优化
  • 自己做一个购物网站想做电商应该怎么入门
  • 啄木鸟网站建设杭州上城区抖音seo如何
  • 新吴区推荐做网站公司爱站网seo培训
  • 上海装修公司排名87杭州seo博客有哪些
  • 哈尔滨做网站建设深圳网站设计小程序