当前位置:网站首页>4、 High performance go language release optimization and landing practice youth training camp notes
4、 High performance go language release optimization and landing practice youth training camp notes
2022-07-07 07:24:00 【A low-key horse】
High performance Go Language distribution optimization and implementation practice | Youth Camp notes
This is my participation 「 The third youth training camp - Back end field 」 The third part of note creation activities 4 Notes
Memory aspect
One 、 Automatic memory management
Concept :
Mutator: Business thread , Assign new objects , Modify the object pointing relationship ( Created goroutine)
Collector:GC Threads , Find the living object , Reclaim memory space of dead objects
Serial GC: only one collector
Parallel GC: Support multiple collectors Recycled at the same time GC Algorithm
Concurrent GC:mutator(s) and collector(s) It can be executed at the same time
GC:
GC Algorithm : Security 、 Throughput rate 、 Pause time 、 Memory overhead
Track garbage collection :
- Tag root object
- Mark reachable objects
- Clean up unreachable objects
- Use different marking and cleaning strategies according to the life cycle of the object
generational GC:
Age : experienced GC The number of times
Purpose : For young or old people of different ages , Develop different strategies GC Strategy , Reduce overall memory management overhead
Reference count :
- Each object has the number of references associated with it , Greater than 0 It's survival
- The disadvantage is that ring data structures cannot be recycled 、 Maintaining reference counts is expensive
Two 、Go Memory management and optimization
Memory allocation :
Block
cache
Management optimization
go Memory allocation
- Actual optimization plan :Balanced GC
Compiler optimization
One 、 Compiler and static analysis
Compiler structure :
Static analysis :
In process analysis 、 Interprocess analysis :
Two 、Go Compiler optimization
Function inlining :
Escape analysis :
Static analysis :
In process analysis 、 Interprocess analysis :
Two 、Go Compiler optimization
Function inlining :
Escape analysis :
Beast mode
边栏推荐
- 软件验收测试
- Differences between H5 architecture and native architecture
- mips uclibc 交叉编译ffmpeg,支持 G711A 编解码
- ViewModelProvider. Of obsolete solution
- 机器人技术创新与实践旧版本大纲
- JS decorator @decorator learning notes
- Special behavior of main function in import statement
- . Net 5 fluentftp connection FTP failure problem: this operation is only allowed using a successfully authenticated context
- 关于二进制无法精确表示小数
- Blue Bridge Cup Netizen age (violence)
猜你喜欢
面试官:你都了解哪些开发模型?
Kuboard无法发送邮件和钉钉告警问题解决
main函数在import语句中的特殊行为
Sqlmap tutorial (IV) practical skills three: bypass the firewall
子组件传递给父组件
Academic report series (VI) - autonomous driving on the journey to full autonomy
Pass child component to parent component
$parent (get parent component) and $root (get root component)
After the promotion, sales volume and flow are both. Is it really easy to relax?
异步组件和Suspense(真实开发中)
随机推荐
PostgreSQL source code (60) transaction system summary
How DHCP router works
软件验收测试
Blue Bridge Cup Birthday candles (violence)
Implementation of AVL tree
【leetcode】1020. Number of enclaves
身边35岁程序员如何建立起技术护城河?
LC interview question 02.07 Linked list intersection & lc142 Circular linked list II
AVL树的实现
Example of Pushlet using handle of Pushlet
Advantages of using net core / why
虚拟机的作用
Stockage et pratique des données en langage C (haut niveau)
Wechat applet full stack development practice Chapter 3 Introduction and use of APIs commonly used in wechat applet development -- 3.9 introduction to network interface (IX) extending the request3 met
ROS2规划系统plansys2简单的例子
Lm11 reconstruction of K-line and construction of timing trading strategy
MIPS uclibc cross compile ffmpeg, support g711a encoding and decoding
Fullgc problem analysis and solution summary
Torefs API and toref API
Docker compose start redis cluster