The x11perf(1) program runs one or more performance tests
and reports how quickly an X server can execute the tests.
Many graphics benchmarks assume that the graphics device is used
to display the output of a single fancy graphics application, and
that the user actually works on some other device, like a terminal.
Such benchmarks usually measure drawing speed for lines, polygons,
text, and so on.
Because workstations are used not as standalone graphics
engines, but as super-terminals, x11perf(1) measures window
management performance as well as traditional graphics performance.
The x11perf(1) utility includes benchmarks for the time it
takes to create and map windows (as when you start up an
application); to map a preexisting set of windows onto the screen
(as when you deiconify an application or pop up a menu); and to
rearrange windows (as when you slosh windows to and fro trying to
find the one you want).
The x11perf(1) utility also measures graphics performance
for operations not normally used in standalone graphics displays,
but are nonetheless used frequently by X applications. Such
operations include CopyPlane (used to map bitmaps into pixels),
scrolling (used in text windows), and various stipples and tiles
(used for computer-aided design (CAD) and color half-toning,
respectively).
The x11perf(1) utility should be used to analyze
particular strengths and weaknesses of servers, and is most useful
to a server writer who wants to analyze and improve a server. The
x11perf(1) utility is meant to comprehensively exercise just
about every X11 operation you can perform; it does not purport to
be a representative sample of the operations that X11 applications
actually use. Although it can be used as a benchmark, it was
written and is intended as a performance-testing tool.
As such, x11perf(1) does not whittle down
measurements to a single "HeXStones" or "MeXops" number. We
consider such numbers to be uninformative at best and misleading at
worst. Some servers that are very fast for certain applications can
be very slow for others. No single number or small set of numbers
is sufficient to characterize how an X implementation will perform
on all applications. Knowing your favorite application, however,
will improve your ability to use the numbers x11perf(1)
reports to predict its performance on a given X implementation.
That said, you might also want to look at x11perfcomp(1),
a program to compare the outputs of different x11perf(1)
runs. You provide a list of files containing results from
x11perf,(1) and it presents them out in a useful, tabular
format.
For repeatable results, x11perf(1) should be run using a
local connection on a freshly started server. The default
configuration runs each test five times to determine whether each
trial takes approximately the same amount of time. Strange glitches
should be examined; if they are non-repeatable, you might chalk
them up to daemons and network traffic. Each trial is run for five
seconds to reduce random time differences. The number of objects
processed per second is displayed to three significant digits, but
you'll be lucky on most systems if the numbers are actually
consistent to two digits. The x11perf(1) utility moves the
cursor out of the test window; be careful not to bump the mouse and
move it back into the window. (A prize to people who correctly
explain why!!).
Before running a test, x11perf(1) determines what the
round-trip time to the server is, and factors this out of the final
timing reported. It ensures that the server has actually performed
the work requested by fetching a pixel back from the test window,
which means that servers talking to graphics accelerators cannot
claim that they are done, while, in the meantime, the accelerator
is painting madly.
By default, x11perf(1) automatically calibrates the
number of repetitions of each test, so that each should take
approximately the same length of time to run across servers of
widely differing speeds. Because each test must be run to
completion at least once, however, some slow servers might take a
very long time, particularly on the window moving and resizing
tests, and on the arc drawing tests.
All timing reports are for the smallest object involved. For
example, the line tests use a PolyLine request to paint several
lines at once, but report how many lines per second the server can
paint, not how many PolyLine requests per second. Text tests paint
a line of characters, but report on the number of characters per
second. Some window tests map, unmap, or move a single parent
window, but report on how many children windows per second the
server can map, unmap, or move.
The current program is mostly the responsibility of Joel
McCormack. It is based upon the x11perf developed by Phil
Karlton, Susan Angebranndt, and Chris Kent, who wanted to assess
performance differences between various servers. Mary Walker, Todd
Newman, and several tests were added in order to write and tune the
PMAX (DECStation 3100) servers. For a general release to the world,
x11perf(1) was rewritten to ease making comparisons between
widely varying computers, to cover most important (and unimportant)
X functionality, and to exercise graphics operations in as many
different orientations and alignments as possible.
The x11perf(1) utility is solely Xlib based, and accepts
the following options:
-displayhost:dpy
Specifies which display to use.
-sync
Runs the tests in synchronous mode. Normally only useful for
debugging x11perf(1).
-pack
Runs rectangle tests so that they pack rectangles right next to
each other. This makes it easy to debug server code for stipples
and tiles; if the pattern looks ugly, you have alignment
problems.
-repeat<n>
Repeats each test n times (by default each test is run
five times).
-time<s>
Specifies how long in seconds each test should be run (default
five seconds).
-all
Runs all tests. This might take a while.
-range<test1>[,<test2>]
Runs all the tests starting from the specified name
test1 until the name test2, including both the
specified tests. The test names should be one of the options
starting from -dot. (eg) -range line100 will perform the tests from
the 100 pixel line test, and go on till the last test, -range
line100,dline10 will do the tests from line100 to dline10.
-labels
Generates just the descriptive labels for each test specified.
See x11perfcomp(1) for more details.
-fgcolor
Specifies the foreground color to use.
-bgcolor
Specifies the background color to use.
-rop<rop0 rop1 ...>
Use specified raster ops (default is GXcopy). This option only
affects graphics benchmarks in which the graphics function is
actually used.
-pm<pm0 pm1 ...>
Use specified planemasks (default is ~0). This option only
affects graphics benchmarks in which the planemask is actually
used.
-depth<depth>
Use a visual with <depth> planes per pixel (default is
the default visual).