Performance Optimization
How to Separate Events from Kubernetes to a Dedicated Etcd
· β˜• 2 min read
The disk pressure on the original etcd is reduced to below 5%, the risk factor is very low, and the cluster shows no anomalies. 1. Deploying the Events Etcd Cluster Events have lower consistency requirements than the main Etcd. Deploying a 3-node cluster is recommended. SSD is recommended for the disk, and the data directory should be kept separate from the main Etcd.

Optimizing Go Applications in Containers
· β˜• 3 min read
1. Memory Alignment Arrange the fields inside a struct from largest to smallest. This reduces memory footprint. Install the fieldalignment tool 1 go install golang.org/x/tools/go/analysis/passes/fieldalignment/cmd/fieldalignment@latest Analyze and fix memory alignment 1 2 3 4 5 6 7 8 9 fieldalignment -fix ./... /Users/shaowenchen/Code/app/config/config.go:136:14: struct with 32 pointer bytes could be 24 /Users/shaowenchen/Code/app/config/config.

Optimizing Tekton's Slow Clone Task, Saving About 30 Seconds
· β˜• 13 min read
1. Symptom - Tekton’s Clone Task Is Slow When running the clone task, Tekton is very time-consuming; with multiple repositories it generally takes around 2 minutes 30 seconds. As shown below: A pipeline that only clones takes 2 minutes 16 seconds to run, while the clone script itself actually runs for only 1-3 seconds.