system-profile

Profiles scripts, processes, GPUs, memory, and interconnects to identify performance bottlenecks.

Updated Jul 9, 2026
One-click install
npx skills add https://github.com/Lingjie-wang/autoRL --skill system-profile-lingjie-wang
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: system-profile
Source: https://github.com/Lingjie-wang/autoRL/tree/main/Auto-claude-code-research-in-sleep/skills/system-profile
Command: npx skills add https://github.com/Lingjie-wang/autoRL --skill system-profile-lingjie-wang

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Diagnosing performance bottlenecks in Python scripts, running processes, and GPU workloads requires choosing the right profiling tools and often writing custom instrumentation, which is time-consuming and error-prone. ## Core Features & Use Cases - Multi-target profiling: Profile Python scripts, running processes by PID, specific functions, or entire frameworks like vLLM serving end-to-end. - External tool integration: Uses cProfile, py-spy, tracemalloc, memray, nvidia-smi, torch.profiler, nsys, and NCCL debugging based on the target. - Custom code instrumentation: Writes and inserts timing, memory tracking, and CUDA event code when external tools are insufficient, with a mandatory changelog of all modifications. - Use Case: Ask to profile a multi-GPU training script and receive structured tables covering CPU overhead, memory redundancy, GPU-GPU transfer bandwidth, NCCL collective latency, and ranked optimization recommendations. ## Quick Start Profile my train.py script and identify the GPU and memory bottlenecks.

Frequently Asked Questions about system-profile

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I profile a Python script for performance bottlenecks?

Use cProfile or py-spy for CPU hotspots, tracemalloc or memray for memory, and torch.profiler or nsys for GPU work. This skill selects the appropriate tools automatically, runs them, and summarizes hotspots with ranked recommendations.

How to profile GPU utilization and memory in PyTorch?

Use nvidia-smi or nvitop for live utilization monitoring and torch.profiler for kernel-level timing and memory allocation. The skill also checks allocated versus reserved versus peak memory to detect redundancy between CPU and GPU copies.

Can I profile a running process by PID?

Yes, provide a PID or service name as the target and the skill attaches sampling profilers like py-spy to the running process. It captures execution hotspots without restarting or modifying the target service.

What tools measure NCCL and GPU-GPU communication bandwidth?

Use nvidia-smi topo -m and nvidia-smi nvlink for topology, NCCL_DEBUG=INFO for collective diagnostics, and custom wrappers around NCCL collectives for latency and throughput. The skill measures transfer frequency, size, and achieved bandwidth.

Does code instrumentation affect profiling accuracy?

Instrumentation adds observer overhead, so the skill avoids instrumenting tight inner loops and samples instead. All inserted code is marked with comments and logged in a changelog so every change can be reviewed and reverted.