返回顶部
p

performance-tuning

Deep performance tuning workflow—goals and measurement, profiling, hotspots, caching and concurrency trade-offs, system-specific tuning (DB, GC, network), and verification. Use when fixing latency, throughput, or resource saturation.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
137
下载量
0
收藏
概述
安装方式
版本历史

performance-tuning

# Performance Tuning (Deep Workflow) Performance work is **measurement-driven**. **Profile** before optimizing; **verify** after changes; **guard** against regressions with benchmarks or production metrics. ## When to Offer This Workflow **Trigger conditions:** - High **CPU**, **memory**, **p99** latency, **GC** pauses - **Cost** reduction via efficiency - **Premature** optimization requests—need **evidence** first **Initial offer:** Use **six stages**: (1) frame goals & SLOs, (2) measure baseline, (3) profile & hypothesize, (4) implement changes, (5) verify & compare, (6) prevent regression). Confirm **language/runtime** and **environment** (prod-like data volume). --- ## Stage 1: Frame Goals & SLOs **Goal:** **Numeric** targets: p95 latency, throughput, max memory—**not** “faster.” ### Questions 1. Which **workloads** matter most (batch vs interactive)? 2. **Correctness** constraints (approximation allowed or not)? 3. **Cost** budget for hardware vs engineering time? **Exit condition:** One-page success criteria and out-of-scope areas. --- ## Stage 2: Measure Baseline **Goal:** **Reproducible** benchmark or **RUM** segment—same inputs, same conditions. ### Practices - **Warm** caches when prod is always warm - **Statistical** repeat (multiple runs, discard outliers methodology) **Exit condition:** Baseline numbers + environment fingerprint (versions, flags). --- ## Stage 3: Profile & Hypothesize **Goal:** Find **dominant cost**: CPU bound, I/O bound, lock contention, allocation rate. ### Tools (examples) - **CPU** flame graphs; **async** wait profiling - **Alloc** profiling for GC pressure - **DB** query plans and lock waits **Exit condition:** Hypothesis tied to evidence (e.g., “40% time in JSON parse”). --- ## Stage 4: Implement Changes **Goal:** **Smallest** change that addresses the hotspot; **avoid** **clever** without proof. ### Levers - **Algorithm** / data structure - **Caching** with **invalidation** discipline - **Batching** I/O; **connection** pooling - **Parallelism** where safe—watch **locks** --- ## Stage 5: Verify & Compare **Goal:** **A/B** or before/after with **same** workload; **watch** **tail** latency **not** only mean. ### Production - **Canary** with **error** rate and **latency** gates --- ## Stage 6: Prevent Regression **Goal:** **Micro-benchmarks** in CI (optional), **budgets**, or **synthetic** checks. --- ## Final Review Checklist - [ ] Goals and baseline documented - [ ] Root cause supported by profiler/trace evidence - [ ] Change scoped; trade-offs explicit - [ ] Verification on realistic load - [ ] Regression guard where feasible ## Tips for Effective Guidance - **Little’s Law** intuition: queues blow **latency**—often **fix** **concurrency** **before** **micro-opts**. - **Avoid** optimizing **cold** paths **first**. - **GC** languages: **allocation** **rate** often **is** the **enemy**. ## Handling Deviations - **Embedded** / **mobile**: **battery** and **thermal** **constraints** **matter** **too**. - **Distributed** systems: **local** **opt** **may** **hurt** **system** **(see** **load-testing**).

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 performance-tuning-1776028875 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 performance-tuning-1776028875 技能

通过命令行安装

skillhub install performance-tuning-1776028875

下载 Zip 包

⬇ 下载 performance-tuning v1.0.0

文件大小: 2.35 KB | 发布时间: 2026-4-13 11:26

v1.0.0 最新 2026-4-13 11:26
Initial release of the performance-tuning skill.

- Introduces a six-stage, measurement-driven workflow for deep performance tuning.
- Covers goal setting, baseline measurement, profiling, implementation, verification, and regression prevention.
- Includes supporting checklists, profiling tool examples, and tips for various system types (e.g., DB, GC, network).
- Designed for addressing latency, throughput, resource saturation, or efficiency/cost concerns.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部