Go GC:
Latency Problem SolvedGoogle™ Go GC: Latency Problem Solved Rick Hudson Google Engineer ## My Codefendants: The Cambridge Runtime Gang  facc/p3_1.jpg) #1 Barrier: GC Latency ## When is the best time to do a GC? When nobody is looking. Using camera to track eye movement When subject looks away do a GC.  ## Pop up a network wait icon ## Waiting ## Or Trade Throughput for Reduced GC Latency ## Google ## Latency ## Nanosecond 1: Grace Hopper Nanosecond 11.8 inches Microsecond 50 码力 | 20 页 | 897.11 KB | 2 年前3
HBase最佳实践及优化群粗略估计可按100个Region为上限,具体视服务器能力(CPU内核)及访问压力(每个Region的服务量)而定 • 过多Region的症状: – CPU线程切换频繁 – 内存使用过大,造成GC频繁,服务Timeout – 每个Region的Memstore太小,磁盘flush频繁,HFile文件过多小文件 ## Major Compaction • HBase根据时间来计划执行Major 现在缺省128MB,一般不用修改 ## HBase的GC特点 • 由单个RPC带来的操作类垃圾对象是短期的 • Memstore是相对长期驻留的,按2MB为单位分配 • Blockcache是长期驻留的,按64KB为单位分配 - 如何有效的回收RPC操作带来的临时对象是HBase的GC重点 - 不建议HBase的堆大小操作操过64GB,否则GC压力大、执行时间太长 ## G1GC -XX:+UnlockExperimentalVMOptions seeing Alleged to protect against a bizarre Linux issue Alleged to save some CPU cycles in between GC epochs ## RegionServer硬件建议 • 服务器硬盘空间不大于6TB*RegionServer - 足够的内存堆大小(约等于硬盘空间/200) • HBase对于CPU要求高,越多core越好0 码力 | 45 页 | 4.33 MB | 2 年前3
2.7 Go toolchain internals and implementation based on arm64and runtime for a language which together allow you to build and run code written in that language. gc: evolved from the Plan 9 toolchain and includes its own compiler, assembler, linker and tools, as well0 码力 | 22 页 | 2.19 MB | 1 月前3
Julia 1.10.0 beta2 Documentation102.22 Julia SSA-form IR 1597 102.23 EscapeAnalysis 1601 102.24 Static analyzer annotations for GC correctness in C code 1613 102.25 Garbage Collection in Julia 1619 103 Developing/debugging Julia's over worker threads use addprocs and pass -t/--threads as exeflags. ## Multiple GC Threads The Garbage Collector (GC) can use multiple threads. The amount used is either half the number of compute worker worker threads or configured by either the --gcthreads command line argument or by using the JULIA_NUM_GC_THREAD_environment variable. Julia 1.10 The --gctthreads command line argument requires at least0 码力 | 1682 页 | 5.96 MB | 2 年前3
2.8 Go在证券行情系统中的应用2015年5月29日,招商证券、东兴证券、齐鲁证券、国泰君安等证券公司信息系统发生中断或缓慢,引起各方广泛关注。证券日报《证监部门处罚部分信息系统瘫痪券商》 行情开发遇到的挑战 开发语言的选择 2 GC问题的困扰 3 面向并发的数据结构 4 融合替代方案 5 网络底层优化 ’ alt=‘OCR图片’/> 1. 开发语言的选择问题 C/C++:历史悠久的高性能系统级语言,类似于AE86,19 能,代表业界发展方向 我们团队有着互联网技术基因,用前沿开源技术打造创新型 FinTech Startup GopherChina 2017 2 GC问题的困扰 海量并发和海量数据处理的系统,GC的内存对象扫描标记不仅消耗大量CPU资源,还会因为GC过程Stop The World造成毫秒级延时,拖慢行情推送速度。 行情与交易都是与时间赛跑的实时应用领域 例如,为了把芝加哥期货市场和纽交所的通讯 PROCESSING TIME (1995-2009) ’ alt=‘OCR图片’/> 2.1 Go在GC性能上的改进 Go 1.8 Release Notes:相比1.7版本GC Pause大幅减小,通常低于100微妙甚至10微秒 Go 使用CMS(Concurrent Mark Sweep) GC算法,优点是不中断业务的情况下并行执行,将STW时间降低到最小,缺点是并行执行需要更多的同步开销0 码力 | 25 页 | 2.16 MB | 1 月前3
Julia 1.10.0 beta1 Documentation102.22 Julia SSA-form IR 1596 102.23 EscapeAnalysis 1600 102.24 Static analyzer annotations for GC correctness in C code 1612 102.25 Garbage Collection in Julia 1618 103 Developing/debugging Julia's over worker threads use addprocs and pass -t/--threads as exeflags. ## Multiple GC Threads The Garbage Collector (GC) can use multiple threads. The amount used is either half the number of compute worker worker threads or configured by either the --gcthreads command line argument or by using the JULIA_NUM_GC_THREAD_environment variable. Julia 1.10 The --gctthreads command line argument requires at least0 码力 | 1681 页 | 5.96 MB | 2 年前3
1.1 Go语言游戏项目应用情况汇报DecreaseCoins(100) 业务模块接口调用 ## 数据层 - 玩家数据库切片,减小查询时的集合 - 支持内存事务 - 以事务为单位同步到数据库 - 支持Redo、Undo以及数据挖掘的同步日志 · GC优化 type PlayerRole struct { Id int64 // 玩家角色ID Pid int64 // 玩家ID RoleId int8 // 角色模板ID PlayerRole; extern PlayerRole* NewPlayerRole(); extern void FreePlayerRole(PlayerRole*); 内存数据库的GC优化 - CGO type PlayerRoleRow struct { c *C.PlayerRole isBreak bool } func (row *PlayerRoleRow) int8(row.c.RoleId), Level: int16(row.c.Level), Exp: int64(row.c.Exp), } } 内存数据库的GC优化 - 数据读取 type PlayerRole struct { Id int64 // 玩家角色ID Pid int64 // 玩家ID RoleId int8 //0 码力 | 21 页 | 1.63 MB | 2 年前3
1.2.2 GoLLVM 编译探索03 GoLLVM问题解决 04 阶段性的成果 05 未来与展望 06 第一部分 团队与个人 ’ alt=‘OCR图片’/> 团队与个人 字节跳动程序语言团队 go 编译器/Runtime/GC 优化 基础库、性能分析工具、java、python 马春辉 十多年的编译器领域相关工作经验 先后就职于HP编译器组,IBM jvm组,华为虚拟机实验室,字节跳动程序语言团队 ’ lcon) Tinygo GoLLVM ’ alt=‘OCR图片’/> GoLLVM背景 Tinygo 嵌入式系统 功能不完善或者不支持 maps/cgo/reflect/GC/recover… GoLLVM 基本上支持了所有的语言特性 ’ alt=‘OCR图片’/> 第三部分 GoLLVM现状 ’ alt=‘OCR图片’/> GoLLVM现状 ·社区现状 writebarrier/boundcheck的过早引入,影响了后续优化 部分数据结构的兼容性 iface ’ alt=‘OCR图片’/> GoLLVM现状 GC:性能差距 空载: GoLLVM的时间是go的3倍左右 GC的性能差距 保守式的栈扫描 runtime的生成代码 heapBits.next: 手动inline后,mallocgc提升10% ’ alt=‘OCR图片’/>0 码力 | 25 页 | 3.99 MB | 1 月前3
2.1.1 Golang主动式内存缓存的优化探索之路bf0fae11/p7_1.jpg) 同样的性能,需要更少的硬件资源,降低成本 02 核心数据在本地,依赖少,更稳定 ## “ 通过本次分享,可以带来哪些收获? • 千万级内存对象,GC严重耗时,如何解决? - 复杂的查询场景,内存数据如何高效组织? • 主动式内存缓存,如何保证数据实时性? - 数据太多,内存不够用,如何进行存储扩展? ## 第二部分 难点攻克 ## “ ## 缓存2 查询过程 设置过程 ## 语言的局限性 t:3 n1500000 p:1 gc 1 80.053s 0%: 0.037+1.5+0.041 ms clock, 1.4+0.48/4.0/2.6+1.6 ms cpu, 4->4->1 MB, 5 MB goal, 40 P gc 2 ₀.277s 0%: 0.024+1.4+0.061 ms clock, 0.98+0 7+2.4 ms cpu, 4->4->3 MB, 5 MB goal, 40 P gc 3 ₀.578s 0%: 0.021+1.9+0.064 ms clock, 0.85+0.45/10/5.8+2.5 ms cpu, 6->7->6 MB, 7 MB goal, 40 P gc 4 ₁.075s 0%: 0.013+2.8+0.050 ms clock, 0.53+00 码力 | 48 页 | 6.06 MB | 2 年前3
HBase Practice At XiaomiWhyAsync HBase Client ○ Implementation ☐ Performance • How do we tuning G1GC for HBase ☐ CMS vs G1 o Tuning G1GC G1GC in XiaoMi HBase Cluster ## Part-1Async HBase Client ## WhyAsync HBase Client region server blocked when using blocking client ## WhyAsync HBase Client? • Region Server / Master STW GC • Slow RPC to HDFS • Region Server Crash • High Load • Network Failure BTW: HBase may also suffer async client is at least the same as blocking hbase client. ## Part-2 HBase + G1GC Tuning CMS Old Gen GC ## CMS VS G1 OldGen GC (Before) ## ## 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 230 码力 | 45 页 | 1.32 MB | 2 年前3
共 1000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 100













