zqw's notes
Posts About
zqw's notes
Cancel
PostsAbout

Go Lock Performance Traps: From sync.Mutex to Spinlock Tuning

Paul published on 2025-04-02 included in Go

A seemingly simple concurrent Map access, performance crashes under high concurrency. pprof shows 90% of time spent in sync.Mutex.Lock. This post documents the investigation and performance comparison of different lock strategies.

Read More
 Concurrency, Locks, Performance

Custom Linux Distro: From Yocto Build to 60% Boot Time Optimization

Paul published on 2023-06-15 included in Linux

A key user experience metric for NAS products: how long from pressing power to accessing shared folders? Our target was 30 seconds, but the original took 75 seconds. This post documents the complete journey from 75s to 30s.

Read More
 Systemd, Boot Optimization, Performance

Go Daemon Development: Graceful SIGTERM Handling and Config Hot-Reload

Paul published on 2023-03-10 included in Go

For a NAS product, I needed to develop a 24/7 system daemon for disk health monitoring and scheduled task management. This post covers the key technical aspects: signal handling, graceful shutdown, and config hot-reload.

Read More
 Daemon, Signal, Systemd

NAS Disk Health Monitoring: From smartctl to Custom Agent

Paul published on 2022-08-15 included in Linux

A NAS’s most important job is protecting user data. Disk failures often have warning signs, and SMART technology can detect problems early. This post documents how to build a disk health monitoring agent.

Read More
 Go, Monitoring, SMART

Production-Grade String Parsing: From atoi to State Machine

Paul published on 2022-04-14 included in Go

LeetCode’s atoi is a classic interview problem, but production-grade implementations are far more complex. This post starts from the interview version and gradually analyzes Go and Rust standard library implementations to understand “production-grade” code design.

Read More
 State Machine, Source Code Analysis, Strings

Go Generics in Practice: Pitfalls and Best Practices

Paul published on 2022-03-16 included in Go

Go 1.18 finally brought generics. In our NAS project, we refactored several common modules using generics. This post documents real-world benefits, pitfalls, and best practices we learned.

Read More
 Generics, Best Practices, Refactoring
  • 1
  • 2
  • 3
  • 4
  • 5
2019 - 2026 xxxx | CC BY-NC 4.0