根据Proposal: Mid-stack inlining in the Go compiler,当前go1.9+已经支持用户调整编译器的内联程度。
最近在修复VPS的过程中遇到了一个APT的问题,无论APT执行什么都汇报错误: Reading package lists... Done Building dependency tree Reading state information... Done You might want to run 'apt-get -f install' to correct these. The following packages have unmet dependencies: linux-image-extra-4.4.0-116-generic : Depends: linux-image-4.4.0-116-generic but it is not installed linux-image-generic : Depends: linux-image-4.4.0-116-generic but it is not installed Recommends: thermald but it is not installed E: Unmet dependencies. Try using -f.
对于一个常驻、高访问量的网络服务来说,升级/重启时,一个难以忽视的问题是避免对正在通信的客户端造成影响。因此大家一直在寻求一种优雅、零宕机的升级/重启方案(seamless reload/upgrade)。在工程师们的日常实践中,尝试了不同的方案。各方案的核心都是fork-exec流程,其不同的区别就是在这个过程中,如何优雅的传递活跃的网络连接,如何避免新建连接失败,以及处理这个过程中的错误和如何回退。
在本博客中使用mermaid将文字渲染成对应的流程图、甘特图等,是非常友好且利于版本管理的方式。具体语法可以参考连接中的文档。页面代码修改可以参考本次提交。
该博主的几篇文章,系统的从原理、实践中讲述了TCP中继加速网络传输的方案。讲的非常赞。
go1.11 中的性能优化
CRC 算法
分层结构
前言 此部分内容需要对linux的虚拟内存和物理内存有所了解,可以先阅读《Linux物理内存描述》、《Linux物理内存页面分配》、《Linux内存地址映射》、《Linux 内核在 x86_64 CPU 中地址映射》和《Linux Virtual Memory》。
中断的定义与种类
a thread-safe concurrent map for go
lrita's blog
NUMA is a utility library, which is written in go. It help us to write some NUMA-AWARED code.
a TryLock implementation