> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/ghostty-org/ghostty/llms.txt
> Use this file to discover all available pages before exploring further.

# Performance

> GPU acceleration, IO threading, and optimization for maximum speed

Ghostty is built for speed. It uses GPU acceleration for rendering, dedicated IO threading, and careful optimizations to deliver one of the fastest terminal emulator experiences available.

## Performance Highlights

<CardGroup cols={2}>
  <Card title="GPU Acceleration" icon="microchip">
    Metal on macOS, OpenGL on Linux for hardware-accelerated rendering
  </Card>

  <Card title="Dedicated IO Thread" icon="bolt">
    Low-jitter IO processing for smooth heavy output
  </Card>

  <Card title="Ligature Support" icon="font">
    Metal renderer supports ligatures at 60fps - the only terminal with this capability on macOS
  </Card>

  <Card title="Competitive Speed" icon="gauge-high">
    2-4x faster than iTerm and Kitty for large file operations
  </Card>
</CardGroup>

## Rendering Architecture

### Multi-Renderer Design

Ghostty uses different rendering backends optimized for each platform:

<Tabs>
  <Tab title="macOS: Metal">
    **Metal renderer** provides native GPU acceleration:

    * Direct Metal API usage (no OpenGL compatibility layer)
    * Full ligature support at 60fps+
    * CoreText font integration
    * Maintains \~60fps under heavy load

    <Note>
      Ghostty is one of only two terminal emulators using Metal directly, and the only one supporting ligatures with Metal rendering.
    </Note>
  </Tab>

  <Tab title="Linux: OpenGL">
    **OpenGL renderer** for broad compatibility:

    * Modern OpenGL for GPU acceleration
    * FreeType font rendering
    * Ligature support
    * 60fps+ frame rates
  </Tab>
</Tabs>

### Frame Rate Management

Ghostty intelligently manages frame rates:

* **Heavy load**: Maintains \~60fps
* **Idle**: Renders only on change (power efficient)
* **Animation**: Smooth cursor blink and visual effects

## IO Performance

### Dedicated IO Thread

Ghostty uses a separate thread for IO operations:

```
Main Thread          IO Thread
    |                    |
    |  ← Terminal data ← |
    ↓                    ↓
 Render            Read from PTY
```

Benefits:

* Very little jitter under heavy IO load
* Non-blocking rendering
* Smooth experience with `cat large-file.txt`

### Benchmark Results

From the README:

> For IO, we have a dedicated IO thread that maintains very little jitter under heavy IO load (i.e. `cat <big file>.txt`). On benchmarks for IO, we're usually within a small margin of other fast terminal emulators.

**Comparative performance** (reading plain text dumps):

* **4x faster** than iTerm
* **4x faster** than Kitty
* **2x faster** than Terminal.app
* **Similar speed** to Alacritty (give or take)

<Note>
  Ghostty provides similar performance to Alacritty while offering significantly more features.
</Note>

## Optimization Tips

### Font Rendering

<Steps>
  <Step title="Choose monospace fonts">
    Monospace fonts render faster than proportional fonts:

    ```ini theme={null}
    font-family = "JetBrains Mono"
    font-size = 13
    ```
  </Step>

  <Step title="Disable unnecessary features">
    Disable ligatures if you don't need them:

    ```ini theme={null}
    font-feature = -calt,-liga,-dlig
    ```
  </Step>

  <Step title="Adjust font metrics conservatively">
    Excessive adjustments can impact rendering:

    ```ini theme={null}
    # Minimal adjustments for performance
    adjust-cell-height = 0
    adjust-cell-width = 0
    ```
  </Step>
</Steps>

### Background and Effects

<CodeGroup>
  ```ini Maximum Performance theme={null}
  # Disable transparency
  background-opacity = 1.0

  # No background image
  # background-image = (not set)

  # No blur
  # background-blur = (not set)
  ```

  ```ini Balanced theme={null}
  # Slight transparency
  background-opacity = 0.95

  # No expensive effects
  background-blur = false
  ```
</CodeGroup>

<Warning>
  Background images are duplicated in VRAM per-terminal, which can increase memory usage for large images.
</Warning>

### Alpha Blending

Choose the right alpha blending mode:

```ini theme={null}
# Native color space (macOS default)
alpha-blending = native

# Linear gamma correction (Linux default, good balance)
alpha-blending = linear-corrected

# Pure linear blending
alpha-blending = linear
```

`linear-corrected` provides the best balance of accuracy and performance.

## Resource Usage

### Memory Management

Ghostty is efficient with memory:

* **Scrollback limit**: Configure to match your needs
  ```ini theme={null}
  scrollback-limit = 10000  # Default
  ```

* **Image storage**: Limit memory for image protocols
  ```ini theme={null}
  image-storage-limit = 320000000  # 320MB default
  ```

### GPU Memory (VRAM)

Factors affecting VRAM usage:

1. **Font atlas**: Cached glyphs (automatically managed)
2. **Background images**: Duplicated per-terminal (see warning above)
3. **Image protocol**: Controlled by `image-storage-limit`

## Benchmarking

### Test IO Performance

```bash theme={null}
# Generate a large text file
seq 1 100000 > numbers.txt

# Time rendering
time cat numbers.txt
```

### Test Rendering Performance

```bash theme={null}
# Stress test with continuous output
yes | head -n 1000000

# Watch CPU usage
top -pid $(pgrep ghostty)
```

### Scrollback Performance

```bash theme={null}
# Fill scrollback buffer
seq 1 100000

# Test scrollback speed
# Use Page Up/Down or scrollbar
```

## Performance Comparison

| Feature           | Ghostty        | Alacritty | Kitty    | iTerm2                 | Terminal.app |
| ----------------- | -------------- | --------- | -------- | ---------------------- | ------------ |
| GPU Acceleration  | ✅ Metal/OpenGL | ✅ OpenGL  | ✅ OpenGL | ✅ Metal (no ligatures) | ❌ CPU        |
| Ligatures (macOS) | ✅ 60fps        | ❌         | ✅        | ❌ (CPU fallback)       | ✅            |
| IO Thread         | ✅              | ✅         | ✅        | ✅                      | ❌            |
| Large File Speed  | Very Fast      | Very Fast | Fast     | Slow                   | Medium       |
| Memory Usage      | Low            | Very Low  | Medium   | High                   | Low          |

## Future Improvements

From the README:

> Despite being *very fast*, there is a lot of room for improvement here.

Planned optimizations:

* Better benchmarking suite
* Additional rendering optimizations
* Shared texture memory for background images
* Per-window background images

## Configuration Examples

<CodeGroup>
  ```ini Maximum Performance theme={null}
  # Optimized for speed
  font-family = "JetBrains Mono"
  font-size = 12
  font-feature = -calt,-liga  # Disable ligatures

  background-opacity = 1.0
  alpha-blending = native

  scrollback-limit = 5000
  image-storage-limit = 100000000
  ```

  ```ini Balanced theme={null}
  # Good performance with features
  font-family = "Fira Code"
  font-size = 13
  # Ligatures enabled (default)

  background-opacity = 0.95
  alpha-blending = linear-corrected

  scrollback-limit = 10000
  image-storage-limit = 320000000
  ```

  ```ini Feature-Rich theme={null}
  # All features, still fast
  font-family = "Cascadia Code"
  font-size = 14
  font-feature = +ss01,+ss02  # Stylistic sets

  background-opacity = 0.9
  background-image = ~/.config/ghostty/bg.png
  background-image-opacity = 0.3

  alpha-blending = linear-corrected
  ```
</CodeGroup>

## Monitoring Performance

### macOS Activity Monitor

1. Open Activity Monitor
2. Find "Ghostty" process
3. Monitor:
   * **CPU%**: Should be low when idle
   * **Memory**: Depends on scrollback and images
   * **GPU**: Check "Window Server" for GPU usage

### Linux Tools

```bash theme={null}
# CPU and memory
top -p $(pgrep ghostty)

# Detailed stats
htop -p $(pgrep ghostty)

# GPU usage (NVIDIA)
nvidia-smi

# GPU usage (Intel/AMD)
intel_gpu_top
# or
radeontop
```

## Key Takeaways

<CardGroup cols={2}>
  <Card title="GPU Accelerated" icon="rocket">
    Metal on macOS, OpenGL on Linux for maximum rendering speed
  </Card>

  <Card title="Competitive Speed" icon="trophy">
    2-4x faster than many alternatives for IO operations
  </Card>

  <Card title="Low Resource Usage" icon="leaf">
    Efficient memory management with configurable limits
  </Card>

  <Card title="Room to Grow" icon="chart-line">
    Already very fast, with optimizations planned
  </Card>
</CardGroup>

## Related Configuration

* [font-family](/config/fonts#font-family) - Font selection
* [background-opacity](/config/appearance#background-opacity) - Transparency
* [alpha-blending](/config/appearance#alpha-blending) - Blending mode
* [scrollback-limit](/config/terminal#scrollback-limit) - History buffer size
* [image-storage-limit](/config/terminal#image-storage-limit) - Image memory limit
