MyRocks在网易核心业务上的使用和优化实践.pptx

上传人(卖家):无敌的果实 文档编号:2526862 上传时间:2022-04-29 格式:PPTX 页数:30 大小:1.67MB
下载 相关 举报
MyRocks在网易核心业务上的使用和优化实践.pptx_第1页
第1页 / 共30页
MyRocks在网易核心业务上的使用和优化实践.pptx_第2页
第2页 / 共30页
MyRocks在网易核心业务上的使用和优化实践.pptx_第3页
第3页 / 共30页
MyRocks在网易核心业务上的使用和优化实践.pptx_第4页
第4页 / 共30页
MyRocks在网易核心业务上的使用和优化实践.pptx_第5页
第5页 / 共30页
亲,该文档总共30页,到这儿已超出免费预览范围,如果喜欢就下载吧!
资源描述

1、MyRocks MyRocks MyRocks MyRocksMyRocks Log-Structured Merge-Tree (LSM-Tree)Mutli-Level LSM-TreeLevel-Based Compaction Column Family (CF)One LSM-Tree Per CFSeveral MemTables MemTableActive MemTableImmutable MemTable Global WAL FilesMyRocks WriteBatch Every Trx has WriteBatch DML buffered in WriteBatc

2、h Trx Commit Writebatch - WAL, Flush WriteBatch - Active MemTable When Full, Active - Immutable Data Flush&Compaction Immutable - L0 SST File, Async L1Ln Compaction, AsyncMyRocks Read Path1. WriteBatch of THE Trx2. Active MemTable of THE CF3. Immutable MemTable of THE CF4. Global Block Cache5. SST F

3、ile of THE CF from L0 to LnMyRocks FeaturesShortcoming and LimitsRC and RR Isolation levelOnline DDL, slowly and mem-costlyOnly Row-Based ReplicationRow-Level Locking, MVCCWAL based Crash safeNo Spatial, Fulltext indexsPowerful CompressionUnstable than InnoDB, Bugs on TTL Read Performance, Range Phy

4、sical Backup (local and remote)More Efficiency Slave Replication MyRocks MyRocks MyRocksMyRocks InnoDBRocksDBInnoDB vs RocksDBRocksDBAppend-only10%InnoDB15/16MyRocks RocksDB16 RocksDB7+1 bytesInnoDB6+7 bytesLn SSTseq id0MyRocks InnoDB PageFile Block RocksDBSST FileFile BlockRocksDBSSTInnoDBMyRocksSS

5、DInnoDBRows - Page + DoublewriteRocksDB 1 + 1 + fanout * ( n 2) / 2nLSMfanout MyRocks MyRocks MyRocks1 /InnoDB1014GBDDB16+ MySQLmysqld 1TB+InnoDB, key_block_size=81 RocksDB916GB100GB MyRocksSlaveMyRocksRocksDB Snappy322GB700GB2/320TB SSD1 Write Buffer (MemTable)table/indexCFCF u Block Cache RocksDBI

6、nnoDBp Block Cache vs Buffer Poolrocksdb_block_cache_sizerocksdb_cache_index_and_filter_blocksMemTablemax_write_buffer_numbermax_write_buffer_number_to_maintainmin_write_buffer_number_to_mergep Write Buffer (CF based) vs Change Buffer (Global)p tcmalloc/jemallocp Per CFMem UsageGlobalMem Usage2 u tp

7、s 5k+1rocksdb_rpl_skip_tx_api,DDB + MyRocksrocksdb_read_free_rpl_tables2LOGICAL_LOCKDATABASERedis10w+tps4w+qpsRedis 2 u 1nFlinkDDB1DDB2myrocks1myrocks8myrocks9myrocks162 Write Stallpending-compaction Compactionrocksdb_max_background_jobs 8-16cpu2 Write Stallpending-compaction pending bytes limitp so

8、ft_pending_compaction_bytes_limit - 512Gp hard_pending_compaction_bytes_limit - 768GStalll0 sst2 Write Stallpending-compaction l0 sstp level0_slowdown_writes_trigger 100 - 500p level0_stop_writes_trigger 100 - 500Stallpending bytes limits2 Write Stallpending-compaction ppppplevel0_slowdown_writes_tr

9、igger 500level0_stop_writes_trigger 500soft_pending_compaction_bytes_limit 1024Ghard_pending_compaction_bytes_limit 1536Gcompression_per_level=kLZ4Compressionpending compaction2 0.5w/s1:11.5w/s2 2ms128-70Glz450%+ SSD3 u MyRocks XA DDBXA1MyRocksXA Binlog InnoDB2RocksDB 3 MySQL3 u 1MyRocksXAMySQL 5.7

10、XAMyRocksTransaction_ctxMasterXA PREPAREsessionrocksdb_close_connection Slavedetach/reattachreplace_native_transaction_in_thdtrx_t(InnoDB) or rocksdb:Transaction XA STARTdetachworker XA PREPAREreattachWL#6860: Binlogging XA-prepared transaction3 1 MyRocks XA BugfixXA3 2 XA, InnoDB - RocksDB3 MyRocks

11、 Online DDL NDCXA PREPARE 1InnoDBRocksDBp alter table xxx ENGINE=ROCKSDB 2RocksDB gtid_executedp InnoDBDDL XA RECOVERXACommitdisabled_storage_engines=MyISAM,InnoDBp ENGINE=ROCKSDB gtid_executed CommitXA PREPAREset session gtid_next=the gtid of create table sql;create table3 70% 8G, CPU30+MyRocksMyRocks100w+u MyRocksu MyRocksMyRocks MyRocks on RDSp p RedisInnoDBp SchemaTTL MyRocks 8.0 MyRocks Fast DDL MyRocks skip TRX API (Master/Slave) TTL replication Bugfix XA

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 办公、行业 > 常用办公文档
版权提示 | 免责声明

1,本文(MyRocks在网易核心业务上的使用和优化实践.pptx)为本站会员(无敌的果实)主动上传,163文库仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。
2,用户下载本文档,所消耗的文币(积分)将全额增加到上传者的账号。
3, 若此文所含内容侵犯了您的版权或隐私,请立即通知163文库(发送邮件至3464097650@qq.com或直接QQ联系客服),我们立即给予删除!


侵权处理QQ:3464097650--上传资料QQ:3464097650

【声明】本站为“文档C2C交易模式”,即用户上传的文档直接卖给(下载)用户,本站只是网络空间服务平台,本站所有原创文档下载所得归上传人所有,如您发现上传作品侵犯了您的版权,请立刻联系我们并提供证据,我们将在3个工作日内予以改正。


163文库-Www.163Wenku.Com |网站地图|