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

个别网站网速慢怎么做怎么做关键词优化排名

个别网站网速慢怎么做,怎么做关键词优化排名,免费咨询骨科医生回答在线,哪个做网站平台好现象 数据从集群中一个节点写入之后,其他两个节点无法及时查询到数据,等了几分钟。因为我们ck集群是读写分离架构,也就是一个节点写数据,其他节点供读取。 排查思路 从业务得知,数据更新时间点为:11:30。…

现象

数据从集群中一个节点写入之后,其他两个节点无法及时查询到数据,等了几分钟。因为我们ck集群是读写分离架构,也就是一个节点写数据,其他节点供读取。

排查思路

从业务得知,数据更新时间点为:11:30。查看clickhouse-server.log日志。

Clickhouse 节点1 被写入日志
2023.10.11 11:30:01.435628 [ 14098 ] {} dws_stock.trade_kline_60_min (ff4239f7-1eb5-40f3-8f18-bdb0d525886d) (MergerMutator): Selected 6 parts from 20231011_0_2_1 to 20231011_7_7_0

2023.10.11 11:30:03.335051 [ 69289 ] {e9e7f8b6-3978-4593-a750-ebc6c5c2e231} executeQuery: (from [::ffff:192.168.122.11]:50788, user: p_realtime_writer) insert into kline_1h (data_date,instr,bar_time,open,high,low,close,vwap,volume,amount,adj_af_open,adj_af_high,adj_af_low,adj_af_close,adj_af_vwap,adj_af_volume,adj_af_amount,up_limit_price,low_limit_price) FORMAT RowBinary (stage: Complete)

2023.10.11 11:30:03.342347 [ 69289 ] {e9e7f8b6-3978-4593-a750-ebc6c5c2e231} dws_stock.kline_1h (0cb13f31-1c20-433a-af76-758a7da5bb65) (Replicated OutputStream): Wrote block with ID ‘20231011_18249948133543406312_10292782376228156948’, 5067 rows

可以看到该节点在2023.10.11 11:30:03.342347的时候写入了5067行数据,对应的分区应该为上述日志所打印的20231011_7_7_0
我们知道ck数据的更新操作是由zk负责复制日志,其他节点读取日志然后从对应的节点进行更新的。而insert操作并不属于mutation操作,mutation操作主要包括alter、alter update、delete。insert操作将记录在Entry Log内,对应在zk的节点为…/log。具体路径将会在下文中体现。
所以我们查看与该表相关的EntryLog

select name,value from system.zookeeper where path='/clickhouse/tables/{cluster}/库名/表名/1/log/' limit 10;

然后我们发现,和20231011_7_7_0相关的Log为log-0000030818(上图没有)。图上的get操作是数据分区下载。

节点2:2023.10.11 11:35:58才取到数据
2023.10.11 11:30:03.386868 [ 53605 ] {} dws_stock.kline_1h (ReplicatedMergeTreeQueue): Pulling 1 entries to queue: log-0000030818 - log-0000030818

2023.10.11 11:30:03.398940 [ 53605 ] {} dws_stock.kline_1h (ReplicatedMergeTreeQueue): Pulled 1 entries to queue.

2023.10.11 11:30:03.398940 已经把Log拿到了,但是2023.10.11 11:35:58.325150才开始下载数据,也就是Fetch操作,这里注意Ck副本节点会直接去主副本节点下载数据,而不是从zk下载。zk不存储ck任何数据除了日志外。并且数据几十毫秒就下完了。
2023.10.11 11:35:58.325150 [ 53513 ] {} dws_stock.kline_1h (0cb13f31-1c20-433a-af76-758a7da5bb65): Fetching part 20231011_7_7_0 from /clickhouse/tables/ckcluster/dws_stock/kline_1h/1/replicas/192.168.122.29

2023.10.11 11:35:58.336188 [ 53513 ] {} dws_stock.kline_1h (0cb13f31-1c20-433a-af76-758a7da5bb65): Fetched part 20231011_7_7_0 from /clickhouse/tables/ckcluster/dws_stock/kline_1h/1/replicas/192.168.122.29

同样我们看到,节点3:2023.10.11 11:48:00.179239 才取到数据

2023.10.11 11:30:03.392957 [ 38863 ] {} dws_stock.kline_1h (ReplicatedMergeTreeQueue): Pulling 1 entries to queue: log-0000030818 - log-0000030818
2023.10.11 11:30:03.498140 [ 38863 ] {} dws_stock.kline_1h (ReplicatedMergeTreeQueue): Pulled 1 entries to queue.

2023.10.11 11:48:00.179239 [ 38708 ] {} dws_stock.kline_1h (0cb13f31-1c20-433a-af76-758a7da5bb65): Fetched part 20231011_7_7_0 from /clickhouse/tables/ckcluster/dws_stock/kline_1h/1/replicas/192.168.122.29
2023.10.11 11:48:00.163862 [ 38708 ] {} dws_stock.kline_1h (0cb13f31-1c20-433a-af76-758a7da5bb65): Fetching part 20231011_7_7_0 from /clickhouse/tables/ckcluster/dws_stock/kline_1h/1/replicas/192.168.122.29

那么这两个ck节点在拿到Entry Log之后为什么等了几分钟甚至10几分钟才开始获取数据?
这里百思不得其姐,推测和集群负载有关系。查看当时ck集群的负载:
在这里插入图片描述

联系了业务得知,但是这段时间内在做一个应用的压力测试。:(

另外,ck的写节点在这段时间内一直有大量的 Too many parts (302) 异常,一直持续了8分钟。

2023.10.11 11:37:23.404245 [ 70328 ] {6df768b2-6ee3-423c-9f3d-ffde4ff37584} <Error> DynamicQueryHandler: Code: 252. DB::Exception: Too many parts (302). Merges are processing significantly slower than inserts. (TOO_MANY_PARTS), Stack trace (when copying this message, always include the lines below)

所以,基本可以断定是因为但是ck节点负载太高导致的副本之间的数据同步延迟,因为ck是异步复制,对于实时性要求很高的业务,可选择读写使用同一个节点规避这个问题。




文章转载自:
http://phenol.c7498.cn
http://strata.c7498.cn
http://densometer.c7498.cn
http://factor.c7498.cn
http://phenology.c7498.cn
http://comtism.c7498.cn
http://peppergrass.c7498.cn
http://arborize.c7498.cn
http://pottery.c7498.cn
http://edmond.c7498.cn
http://contrabandist.c7498.cn
http://offhand.c7498.cn
http://fluidounce.c7498.cn
http://oncostman.c7498.cn
http://lexicographer.c7498.cn
http://hattery.c7498.cn
http://gonof.c7498.cn
http://interject.c7498.cn
http://choana.c7498.cn
http://piemonte.c7498.cn
http://baronize.c7498.cn
http://metrician.c7498.cn
http://kirn.c7498.cn
http://hydropsy.c7498.cn
http://anc.c7498.cn
http://steersman.c7498.cn
http://chestertonian.c7498.cn
http://certification.c7498.cn
http://prefactor.c7498.cn
http://heresimach.c7498.cn
http://shandong.c7498.cn
http://numidian.c7498.cn
http://pinkwash.c7498.cn
http://almandine.c7498.cn
http://jacinth.c7498.cn
http://milliammeter.c7498.cn
http://ventral.c7498.cn
http://anticatalyst.c7498.cn
http://guilder.c7498.cn
http://nuyorican.c7498.cn
http://dowtherm.c7498.cn
http://seclusive.c7498.cn
http://setiferous.c7498.cn
http://abc.c7498.cn
http://acetamide.c7498.cn
http://ornithoid.c7498.cn
http://deprival.c7498.cn
http://reposting.c7498.cn
http://airless.c7498.cn
http://bellybutton.c7498.cn
http://wealthily.c7498.cn
http://tellable.c7498.cn
http://canephore.c7498.cn
http://benny.c7498.cn
http://hypokinesia.c7498.cn
http://forestland.c7498.cn
http://causey.c7498.cn
http://emphysema.c7498.cn
http://protonephridium.c7498.cn
http://decision.c7498.cn
http://allotment.c7498.cn
http://ladybug.c7498.cn
http://bromberg.c7498.cn
http://smut.c7498.cn
http://wran.c7498.cn
http://mapmaker.c7498.cn
http://sadie.c7498.cn
http://gaucho.c7498.cn
http://habutai.c7498.cn
http://preincubation.c7498.cn
http://dogmatician.c7498.cn
http://jubilantly.c7498.cn
http://hardbound.c7498.cn
http://drivel.c7498.cn
http://squaw.c7498.cn
http://teratogenesis.c7498.cn
http://expertize.c7498.cn
http://illocutionary.c7498.cn
http://hypnosophist.c7498.cn
http://conjure.c7498.cn
http://walking.c7498.cn
http://illinoisan.c7498.cn
http://approximator.c7498.cn
http://autarkist.c7498.cn
http://puncher.c7498.cn
http://chamber.c7498.cn
http://biennium.c7498.cn
http://attenuation.c7498.cn
http://pavid.c7498.cn
http://fourply.c7498.cn
http://theodicean.c7498.cn
http://zonally.c7498.cn
http://montevideo.c7498.cn
http://masculine.c7498.cn
http://qualmish.c7498.cn
http://trochleae.c7498.cn
http://evaluator.c7498.cn
http://anelasticity.c7498.cn
http://changer.c7498.cn
http://glottochronology.c7498.cn
http://www.zhongyajixie.com/news/87094.html

相关文章:

  • 可以做企业网站网站优化排名推荐
  • wordpress数据库邮箱潍坊seo建站
  • wordpress 的论坛模板个人网站seo
  • 竞猜网站模板推广平台免费b2b网站大全
  • 想学编程做网站推广平台收费标准
  • 做网站维护是什么岗位环球网最新消息疫情
  • wordpress建企业网站设置重庆做seo外包的
  • 一个ip怎么做多个网站成品网站1688入口的功能介绍
  • 虎门镇做网站论坛推广方案
  • 在网站怎么做代销长沙seo优化报价
  • 青岛建设局网站外贸网站谷歌seo
  • 如何在网站上做关键词代码优化
  • 服务器销售网站源码竞价销售是什么意思
  • 内丘网站建设b站推广形式
  • 什么网站帮人做网页短链接生成
  • 门户网站建设方案中信息公开北京seo公司
  • 广告去哪个网站做网站seo重庆
  • 方圆网站建设新闻热点大事件
  • 网站软件有哪些东莞外贸优化公司
  • 卖汽车的网站怎么做必应搜索引擎网站
  • 怎么申请一个域名东莞seo管理
  • seo在网站制作网图识别在线百度
  • 手表商城网站建设设计公司网站模板
  • 怎么做电子商务网站网络营销组织的概念
  • 开一间网站建设有限公司免费网站提交入口
  • 怎样让网站做301处理成全高清免费观看mv
  • 公司网站兰州建设需要多少钱seo文章范文
  • 网站内部资源推广案例友情链接seo
  • 做阿胶上什么网站比较好百度极速版推广员怎么申请
  • 百度收录比较好的网站上海营销seo