heidsoft
heidsoft
# Ubuntu GPU 驱动安装 ``` #!/bin/bash # install CUDA Toolkit v8.0 # instructions from https://developer.nvidia.com/cuda-downloads (linux -> x86_64 -> Ubuntu -> 16.04 -> deb (network)) CUDA_REPO_PKG="cuda-repo-ubuntu1604_8.0.61-1_amd64.deb" wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/${CUDA_REPO_PKG} sudo dpkg...
# perf stat -ae 'tcp:*,sock:*' # perf record -ae 'sock:inet_sock_set_state' --call-graph dwarf # perf report ``` Samples: 20 of event 'sock:inet_sock_set_state', Event count (approx.): 20 Children Self Command Shared Object...
[How to install "perf" monitoring tool?](https://askubuntu.com/questions/50145/how-to-install-perf-monitoring-tool) `apt-get install linux-tools-common linux-tools-generic linux-tools-`uname -r``
- [CLOSE_WAIT socket connection](https://stackoverflow.com/questions/15912370/how-do-i-remove-a-close-wait-socket-connection) - https://unix.stackexchange.com/questions/10106/orphaned-connections-in-close-wait-state - https://docs.kernel.org/networking/ip-sysctl.html ``` CLOSE_WAIT means that the local end of the connection has received a FIN from the other end, but the OS is...
# Typescript 1. https://github.com/e2tox/blog/issues/9 2. https://www.tslang.cn/docs/handbook/advanced-types.html 3. https://juejin.cn/post/6987735091925483551 # 可视化 - three.js 基于webgl - d3.js 基于svg - eCharts 基于canvas
https://tldp.org/LDP/tlk/tlk.html
https://www.alibabacloud.com/help/zh/alinux/user-guide/disable-the-estimation-feature-of-ipvs https://www.ebpf.top/post/ebpf_network_kpatch_ipvs/ https://lore.kernel.org/netdev/[email protected]/T/ https://docs.kernel.org/networking/ipvs-sysctl.html https://zhuanlan.zhihu.com/p/627514565 https://blog.tianfeiyu.com/2019/11/18/kube_proxy_ipvs/ https://elixir.bootlin.com/linux/v5.8.18/source/net/netfilter/ipvs/ip_vs_core.c#L1 https://blog.gmem.cc/ipvs-and-keepalived https://kubernetes.io/docs/reference/networking/virtual-ips/#proxy-mode-ipvs https://medium.com/google-cloud/load-balancing-with-ipvs-1c0a48476c4d https://www.tkng.io/services/clusterip/dataplane/ebpf/ https://arthurchiao.art/blog/cracking-k8s-node-proxy/ https://blog.tianfeiyu.com/2019/10/31/k8s_service_theory/ https://plantegg.github.io/2020/01/22/kubernetes%20service/

Keepalived是一种为了实现Linux服务器高可用的软件,它主要使用的是VRRP(Virtual Router Redundancy Protocol)协议,也就是虚拟路由冗余协议。 VRRP协议可以使得在主路由器出现故障时,备用路由器能够迅速接管网络,保证网络的正常运行。VRRP协议可以确保网络不间断,并且在切换过程中,网络用户无感知。 Keepalived不仅可以用来实现网络服务的高可用,还可以用来实现负载均衡以及故障恢复。 Keepalived的工作原理是,通过VRRP协议,将两台或者多台服务器配置成一组,其中一台作为Master(主),其他的作为Backup(备)。在正常情况下,所有的网络请求都会发送到Master服务器,如果Master服务器出现故障,那么网络请求会自动切换到Backup服务器,从而实现高可用。 在Keepalived中,抢占模式与非抢占模式是通过"nopreempt"参数进行配置区别的。 在配置文件中,如果加上了"nopreempt"这一行,那么就是非抢占模式。如果没有这一行,那么就是抢占模式。 在抢占模式中(preempt_mode),一旦主服务器恢复,它会立即从备份服务器中抢占回虚拟IP,恢复主服务器的角色。而在非抢占模式中(nopreempt),即使主服务器恢复,也要等到备份服务器出现故障或者宕机,才会切换回主服务器。 例如: ``` vrrp_instance VI_1 { state MASTER interface eth0 virtual_router_id 51 priority 101 nopreempt #非抢占模式 advert_int 1 authentication { auth_type...