> ## Documentation Index
> Fetch the complete documentation index at: https://namespace.so/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Optimizing usage

export const CenteredImage = ({src, alt, width, caption, className}) => {
  const [basePath, setBasePath] = useState("");
  useEffect(() => {
    const path = window.location.pathname;
    setBasePath(path === "/docs" || path.startsWith("/docs/") ? "/docs" : "");
  }, []);
  return <Frame caption={caption} className={className} style={{
    maxWidth: width,
    marginInline: "auto"
  }}>
			<OptimizedImage src={`${basePath}${src}`} alt={alt} />
		</Frame>;
};

Monitor and optimize your GitHub Actions resource usage with Namespace's built-in insights dashboard. Understanding how your workflows consume resources helps you select the right machine shapes and reduce costs while maintaining performance.

## Resource Usage Insights

The [insights dashboard](https://cloud.namespace.so/workspace/ghrunners/insights) provides detailed visibility into your workflow resource consumption across all your jobs.

<CenteredImage width={800} alt="Resource usage insights dashboard showing job analytics" src="/docs/images/github-actions/insights-resources.png" />

## Finding Optimization Opportunities

Use the insights dashboard to narrow your jobs down to the best optimization candidates.
Jobs that show both low memory and CPU usage are prime candidates for smaller machine shapes.

<Steps titleSize="h3">
  <Step title="View Peak Memory Usage">
    1. Navigate to [GitHub Actions → Insights](https://cloud.namespace.so/workspace/ghrunners/insights)
    2. Change the view to **Sequential** (to see all job values back to back)
    3. Set breakdown to **Job** (should be the default)
    4. Change display to **Max Memory Used per Job (Percentage)**

    <Info>
      This view shows peak memory usage per job, making it easy to spot jobs that over- or under-utilize their allocated RAM.
    </Info>
  </Step>

  <Step title="Filter Out High Memory Usage Jobs">
    Click **Show optimization potential** to filter out jobs that hit over 50% memory, leaving only the under-utilized candidates.

    <Info>
      This view shows Jobs with less than 50% RAM usage, across all runs.
    </Info>
  </Step>

  <Step title="Analyze CPU Utilization">
    Now switch the display to **p90 CPU per Job (Percentage)** to check whether the same jobs also under-utilize their CPU.

    <Info>
      The p90 view shows the practical maximum load for 90% of the time, helping ignore short-term spikes.

      Use **Max CPU per Job** to see absolute CPU peak across the whole duration.
    </Info>
  </Step>

  <Step title="Manually Remove High-Utilization Jobs">
    If you have too many jobs to go through, you can further filter out jobs with high CPU usage:

    1. Use **Alt+Shift+Cmd** (or **Alt+Shift+Ctrl** on Windows/Linux) to click on jobs with more than 50% CPU usage, this will filter that job type out
    2. Keep doing this until you're only left with jobs under 50% CPU usage
    3. These are your optimization opportunities
  </Step>
</Steps>

## Find over-provisioned jobs

When you have many job runs to sift through, the fastest path is to generate a usage report and let an LLM agent do the analysis, saving you from manually reviewing the dashboard.

<Steps titleSize="h3">
  <Step title="Generate Usage Report">
    Use the [nsc instance report](/docs/reference/cli/instance-report) command to export a CSV of every runner instance for the last 7 days, including the allocated shape and the observed peak CPU and memory usage.

    ```bash theme={null}
    nsc instance report --start 2026-08-11
    ```
  </Step>

  <Step title="Analyze with Agents">
    Pair the CSV with your favourite LLM agent to surface candidates for a smaller shape. The following prompt works well as a starting point:

    Prompt

    Based on GitHub job historical data over the last 7 days obtained via "nsc instance report", produce a short report of resource optimization opportunities for jobs (for the same job name, consistent low resource usage within a category)
  </Step>
</Steps>

## Best Practices

1. **Regular monitoring**: Review insights weekly to identify optimization opportunities
2. **Baseline performance**: Establish performance baselines before making changes
3. **Gradual optimization**: Make incremental changes and measure impact
4. **Test configurations**: Use feature branches to test different machine shapes safely

The insights dashboard updates automatically, providing real-time visibility into how your optimization efforts impact resource usage and costs.

## Related Documentation

**[Caching Solutions →](/docs/solutions/github-actions/caching)**
Implement cross-invocation caching for dependencies and build artifacts to reduce execution time and resource usage.

**[Custom Base Images →](/docs/solutions/github-actions/custom-base-images)**
Pre-install dependencies in custom runner images to reduce startup time and optimize resource utilization.

**[High-Performance Docker Builds →](/docs/solutions/github-actions/docker-builds)**
Optimize Docker build performance with Remote Builders and caching strategies.

**[Advanced Configuration →](/docs/reference/github-actions/runner-configuration)**
Configure machine shapes and runner settings for optimal performance and cost efficiency.
