performance-tuning
できること
この機能は、Linuxコンピューターを速くする手助けをします。システムの内部設定を調整し、特に負荷が高いときに、より良く動作するようにします。
使う場面
- ✓Linuxコンピューターが遅い、またはフリーズするとき。
- ✓サーバーが同時に多くのユーザーを処理できるようにしたいとき。
- ✓システムがどれくらい速く動作できるかをテストしたいとき。
スキルのリンク
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/performance-tuning/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“Webサーバーを速くして、より多くのアクセスに対応できるようにしてください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
このツールは、CPU、メモリ、ディスク、ネットワークのうち何がシステムの遅さの原因になっているかを分析し、「カーネルパラメータ」と呼ばれる内部設定を変更して、これらのリソースの使い方を最適化します。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Performance Tuning
Optimize Linux system performance through kernel parameter tuning, I/O scheduler selection, memory management, CPU governor configuration, and benchmarking. Covers methodology, real sysctl settings, and tool-based validation.
When to Use
- Server experiencing high latency, throughput bottlenecks, or resource exhaustion
- Preparing infrastructure for high-traffic events or load tests
- Tuning a database server, web server, or application host for production
- Diagnosing whether a bottleneck is CPU, memory, disk I/O, or network
- Establishing baseline performance metrics before and after changes
- Configuring kernel parameters for containers, VMs, or bare-metal hosts
Prerequisites
- Root or sudo access on the target system
sysstatpackage installed (providessar,iostat,mpstat)linux-toolsorperfpackage for CPU profiling- Benchmarking tools:
fio(disk),sysbench(CPU/memory),iperf3(network) - Baseline metrics collected before making any changes
Performance Analysis Methodology
Always follow this order:
- Collect baseline -- measure current performance with tools
- Identify bottleneck -- determine if CPU, memory, I/O, or network
- Change one parameter -- apply a single tuning change
- Measure impact -- re-run the same benchmark
- Document -- record the change and its effect
- Iterate or revert -- keep the change if beneficial, revert if not
System Monitoring Tools
# CPU and process monitoring
top # Interactive process viewer
htop # Enhanced interactive viewer
mpstat -P ALL 2 # Per-CPU utilization every 2 seconds
pidstat -u 2 # Per-process CPU usage
# Memory monitoring
free -h # Memory summary
vmstat 2 # Virtual memory stats every 2 seconds
# Columns: r=runnable, b=blocked, si/so=swap in/out, bi/bo=block I/O
# Disk I/O monitoring
iostat -xz 2 # Extended disk stats every 2 seconds
# Key columns: %util, await (latency), r/s, w/s
iotop -oP # Show processes doing I/O
# Network monitoring
sar -n DEV 2 # Network interface stats
ss -s # Socket summary
nstat # Network counters
# CPU profiling (requires perf)
perf top # Real-time function-level CPU profiling
perf stat -a sleep 10 # System-wide counters for 10 seconds
perf record -g -a sleep 30 # Record 30 seconds of call stacks
perf report # Analyze recorded data
# One-liner: check all major resources
echo "=== CPU ===" && mpstat 1 1 && echo "=== MEM ===" && free -h && echo "=== DISK ===" && iostat -x 1 1 && echo "=== NET ===" && ss -s
Sysctl Kernel Parameter Tuning
Network Tuning
# /etc/sysctl.d/60-network-performance.conf
# Increase the maximum socket receive/send buffer sizes
net.core.rmem_max = 134217728
net.core.wmem_max = 134217728
net.core.rmem_default = 1048576
net.core.wmem_default = 1048576
# TCP buffer auto-tuning (min, default, max in bytes)
net.ipv4.tcp_rmem = 4096 1048576 134217728
net.ipv4.tcp_wmem = 4096 1048576 134217728
# Increase connection backlog for high-traffic servers
net.core.somaxconn = 65535
net.ipv4.tcp_max_syn_backlog = 65535
net.core.netdev_max_backlog = 65535
# Enable TCP fast open (client and server)
net.ipv4.tcp_fastopen = 3
# Reuse TIME_WAIT sockets for new connections
net.ipv4.tcp_tw_reuse = 1
# Increase the range of ephemeral ports
net.ipv4.ip_local_port_range = 1024 65535
# TCP keepalive tuning (detect dead connections faster)
net.ipv4.tcp_keepalive_time = 120
net.ipv4.tcp_keepalive_intvl = 30
net.ipv4.tcp_keepalive_probes = 3
# Disable slow start after idle (keeps congestion window open)
net.ipv4.tcp_slow_start_after_idle = 0
# Enable BBR congestion control (requires kernel 4.9+)
net.core.default_qdisc = fq
net.ipv4.tcp_congestion_control = bbr
Memory Tuning
# /etc/sysctl.d/60-memory-performance.conf
# Reduce swappiness (0-100, lower = less swap usage)
# 10 for general servers, 1 for database servers
vm.swappiness = 10
# Dirty page ratios (controls when dirty data is flushed to disk)
# Lower values = more frequent, smaller writes (better for SSDs)
vm.dirty_ratio = 20
vm.dirty_background_ratio = 5
# For large-memory systems writing to fast storage
…
よくある質問
これを使うのにLinuxの専門家である必要がありますか?
いいえ必要ありませんが、管理者権限(rootまたはsudo)があることが推奨されます。また、誤った設定を変更すると性能が悪化することがあるため、手順に従って慎重に進めてください。
どんなツールが使われますか?
`top`、`htop`、`iostat`、`vmstat`、`perf`などのツールが、性能の測定や変更の適用に使われます。
変更がうまくいったかどうかは、どうすればわかりますか?
変更の前後で、テストや分析ツールを使って性能を測定し、改善があったかどうかを確認してください。
詳細
作者による元の説明
Optimize Linux system performance. Configure kernel parameters, analyze bottlenecks, and tune resources. Use when improving system performance.
人気
- GitHubのスター
- 48k
- ランキング
- #5434
- ライセンス
- MIT
- 更新日
- 2026/10/15
コメント
- …
このリポジトリの他のスキル
00-andruia-consultant
48kエージェントがAIプロジェクトの立ち上げや改善を支援します。コードを分析し、ツールを提案し、スペイン語で行動計画を作成します。
007
48kエージェントがセキュリティ監査と脅威モデリングを行えるようにします。攻撃や脆弱性からプロジェクトを守るのに役立ちます。
10-andruia-skill-smith
48kエージェントがAIツールの作成や改善を支援します。ツールの動作を定義し、ドキュメントを書き、構造を検証します。
20-andruia-niche-intelligence
48kエージェントが特定の業界に関する要約を作成できるようにします。信頼できる情報源を使って、プロジェクトの背景、ルール、利用パターン、リスクを把握するのに役立ちます。
似ているスキル
openclaw-update
394k既存のOpenClaw Gatewayを更新するようエージェントを支援します。インストール方法に合った更新方法を選び、セッションを動かし続けます。
diagnose-gateway
394k設定、チャンネル、ポートを確認して、OpenClaw Gatewayが失敗している理由を、何も変更せずに突き止めるようエージェントを支援します。
crabbox-apps
394k一時的なクラウドマシン上でアプリを開いて実行し、そのビューをチャットのサイドパネルに表示するようエージェントを支援します。