LinuxCommandLibrary

x11perf

Benchmark X11 server performance

SYNOPSIS

x11perf [options]

PARAMETERS

-display host:display
    Specifies the X server to connect to and run tests on.

-depth N
    Sets the desired color depth (e.g., 8, 16, 24) for the tests.

-shm
    Uses the MIT-Shared Memory extension for image transfers if available, potentially speeding up some operations.

-repeat N
    Repeats each test N times for more accurate results and to average out variations.

-vtext
    Shows verbose textual output for each test as it runs, indicating progress.

-v
    Provides even more verbose output than -vtext, including setup details.

-all
    Runs all available performance tests provided by x11perf.

-sync
    Forces a round trip to the X server after each graphics operation, ensuring operations complete before timing stops. Useful for accurate remote measurement.

-rects
    Tests various rectangle drawing operations, including filled and unfilled rectangles.

-lines
    Tests various line drawing operations, including single lines, polylines, and wide lines.

-text
    Tests various text rendering operations, including different font sizes and character counts.

-pixmap
    Tests pixmap creation, drawing, copying, and manipulation operations.

-copy
    Tests different methods of copying areas, such as CopyArea and PolySegment.

-bitblt
    Tests bitmap bit-blit operations, typically used for monochrome images.

-windows
    Tests window creation, mapping, unmapping, and destruction operations.

-composite
    Tests operations related to the XComposite extension, often used in modern desktop environments for compositing windows.

-xrender
    Tests operations related to the XRender extension, which provides anti-aliased text and other advanced rendering features.

-help
    Prints a summary of command-line options and exits.

DESCRIPTION

x11perf is a venerable benchmarking tool designed to measure the performance of an X server. It executes a wide array of basic X operations, such as drawing lines, rectangles, arcs, and text, as well as testing operations like area copying, pixmap manipulation, and window management.

By running these tests, x11perf helps evaluate the speed and efficiency of different X server implementations, hardware configurations, or display drivers. It reports results typically in operations per second, providing a quantitative measure of the server's rendering capabilities across various graphical primitives.

While not a comprehensive application benchmark, it's invaluable for understanding the low-level performance characteristics of an X display.

CAVEATS

Results from x11perf should be interpreted with caution. They represent low-level X server performance and do not always directly correlate with real-world application performance, which depends heavily on factors like CPU speed, memory bandwidth, and specific application usage patterns.

The tool also largely predates modern graphics APIs like OpenGL or Vulkan, and its relevance is primarily for traditional X11 rendering. It may not fully exercise modern GPU acceleration features for composite desktop environments. Client-side factors and network latency (if testing remotely) can also significantly influence results.

<B>INTERPRETING RESULTS</B>

x11perf typically reports results in operations per second (ops/sec), characters per second (chars/sec), or polygons per second (poly/sec). Higher numbers generally indicate better performance for that specific operation.

It's often useful to run the tests multiple times (using -repeat) and take an average, especially for shorter tests, to minimize the impact of transient system activity. Comparing results across different X servers, configurations, or hardware can highlight performance bottlenecks and areas for optimization.

<B>TYPICAL USAGE</B>

To run all available tests on the default display:
x11perf -all

To run specific text tests with verbose output and repeat 10 times for more accuracy:
x11perf -text -vtext -repeat 10

To test shared memory extensions for image transfers in all relevant tests:
x11perf -all -shm

To test line drawing on a specific display with synchronization:
x11perf -display :1 -lines -sync

HISTORY

x11perf is a long-standing utility included with the X Window System distribution, dating back to its earlier versions (e.g., X11R4, X11R5). It was developed as a crucial tool for developers and administrators to benchmark and compare the performance of different X server implementations, display drivers, and underlying hardware.

While its core functionality remains relevant for traditional X11, its development has largely stabilized, and it does not incorporate many features of modern desktop environments or contemporary graphics APIs like OpenGL or Vulkan, which are often used for accelerated rendering.

SEE ALSO

X(7): The X Window System core protocol and libraries., xdpyinfo(1): Utility to display information about an X server., xrandr(1): Utility to manage X server screen resources, including resolution and display output., glxgears: A common, albeit simple, OpenGL performance test, often used for quick GPU checks.

Copied to clipboard