> For the complete documentation index, see [llms.txt](https://amobile-solutions.gitbook.io/yocto-developer-guide/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://amobile-solutions.gitbook.io/yocto-developer-guide/test-and-use-the-interface/gpu/gpu-benchmark.md).

# GPU Benchmark

IoT Yocto provides [glmark2 (2021.12)](https://github.com/glmark2/glmark2/tree/2021.12), an OpenGL 2.0 and ES 2.0 benchmark tool. It includes a suite of scenes to assess various aspects of OpenGL (ES) 2.0 performance.

Please refer to Launch glmark2-es2-wayland and Launch glmark2-es2-drm to run the benchmark.

## **Launch glmark2-es2-wayland**

1. Start `weston` service if it is not started yet.

```
# systemctl start weston
```

2. Before running `glmark2-es2-wayland`, we set both the CPU and GPU to performance mode..
3. Launch `glmark2-es2-wayland`. By default, it renders various scenes in a output window with the resolution of 800x600, but the complexity of these scenes does not make the GPU to achieve a 100% usage rate. Therefore, we let **glmark2** render to a window with higher resolution: **1920x1080**, performing benchmarks when the GPU usage rate is close to 100%. You can find benchmark score when it finishes.

```
# glmark2-es2-wayland -s 1920x1080
```

## **Launch glmark2-es2-drm**

1. Stop `weston` service if it already started.

```
# systemctl stop weston
```

2. Before running `glmark2-es2-drm`, we set both the CPU and GPU to performance mode.
3. Launch `glmark2-es2-drm` with specified visual config. Default it renders scene at **fullscreen** resolution and fps is **locked to the display refresh rate**. You can find benchmark score when it finishes.

{% code fullWidth="false" %}

```
# glmark2-es2-drm --visual-config 'red=8:green=8:blue=8:alpha=0:buffer=24:depth=24:stencil=8'
```

{% endcode %}

Note

* For `glmark2-es2-wayland`: By default, it renders various scenes in a output window with the resolution of 800x600, but the complexity of these scenes does not make the GPU to achieve a 100% usage rate. Therefore, we let *glmark2* render to a window with higher resolution: **1920x1080**, performing benchmarks when the GPU usage rate is close to 100%. You can find benchmark score when it finishes.
* For `glmark2-es2-drm`: Default it renders scene at **fullscreen** resolution and fps is **locked to the display refresh rate**. You can find benchmark score when it finishes.
