This section describes how to measure the performance of Chromium's network layer, command packer/unpacker and rendering.
Network performance can be measured with the npclient and npserver programs. Here's a simple example:
Open two terminal windows. Make sure your command path includes the Chromium binary directory and that your library search path includes the Chromium library directory. If you've run the Hello, World demo, you should be all set.
In the first window, start the npserver:
In the second window, start the npclient:
npclient -a localhost
You should see output similar to this:
npclient: MTU=10000 (automatic buffer sizing) npclient: Connecting to servers npclient: Connection to localhost OK. npclient: Testing... npclient: 221.076 MB/s (10000 bytes / buffer, 110538 buffers, 1 servers) npclient: 438.653 MB/s (100000 bytes / buffer, 21933 buffers, 1 servers) npclient: 228.321 MB/s (1000000 bytes / buffer, 1142 buffers, 1 servers) npclient: 222.620 MB/s (10000000 bytes / buffer, 112 buffers, 1 servers) npclient: 206.497 MB/s (100000000 bytes / buffer, 11 buffers, 1 servers) npclient: done!
The npclient and npserver programs mimic Chromium's client/application and server/network nodes but are stripped down to just test networking functions.
The npserver program simply receives messages sent to it by the npclient program.
The npclient program takes a variety of command line options to specify the number and size of buffers to send to the servers. You can test one-to-many network communication by starting several npserver instances and specifying the host names to npclient.
For example, here's how one might test network performance to two rendering nodes in a cluster:
rsh cr1 npserver
rsh cr2 npserver
npclient -b 100000 -n 500 cr1 cr2
npclient: Connection to cr2 OK. npclient: Testing... npclient: 5.898 MB/s (100000 bytes / buffer, 500 buffers, 2 servers) npclient: done!
Both npclient and npserver take a few simple command line options. To see them, specify the -h option to either program.
The packperf program measures the rate at which glVertex commands can be processed by the packer.
XXX additional measurements with packertest framework???
The spheres program is a handy program for measuring triangle throughput in Chromium. It can be used in sort-first, sort-last, or other configurations.
Basically, spheres draws a user-specified number of spheres (arranged in a circle), each with a user-specified number of triangles. The spheres may be rendered as immediate-mode vertex arrays, display lists or as vertex arrays in vertex buffer objects (with GL_ARB_vertex_buffer_object).
Here's an example of running the spheres demo in a sort-last configuration:
cd mothership/configs python psubmit_last.conf spheres
You should see threee windows. One application window will show red spheres, the second application window will show green spheres, and the third window will show the red and green spheres Z-composited together.
Each application instance will print the number of triangles rendered per second, as well as the number of pixels being composited per second. You should see something similar to this:
spheres: 13456 triangles / sphere spheres: 13686 indices / sphere spheres: 12 spheres / ring spheres: 161472 triangles / ring spheres: 126582 bytes / VBO spheres: Drawing Mode: Conventional glDrawRangeElements spheres: 6.5 fps 1.051e+06 tris/sec 1.042e+06 pixels/sec spheres: 6.8 fps 1.092e+06 tris/sec 1.082e+06 pixels/sec spheres: 6.7 fps 1.076e+06 tris/sec 1.066e+06 pixels/sec
Here's an example of running spheres in a tilesort configuration:
python simplemural.conf spheres
The spheres program accept several command-line parameters:
-size N specifies number of parallel instances -rank I specifies instance's rank in [0..N-1] -swap do SwapBuffers -clear do glClear -s N specifies number of spheres per frame -t N specifies approximate number of triangles per sphere -f N specifies number of frames to render before exiting -v render with vertex buffer objects -d render with display lists -h print help