"Can't be benchmarked" No.
"Can't be benchmarked" No.
Posted Sep 7, 2009 17:12 UTC (Mon) by cesarb (subscriber, #6266)In reply to: "Can't be benchmarked" No. by cesarb
Parent article: BFS vs. mainline scheduler benchmarks and measurements
http://github.com/cesarb/glxswapbuffersmeasure/tree/master
This is a small quick-and-dirty library I just wrote which hooks into glXSwapBuffers via LD_PRELOAD and prints some statistics to stderr on exit.
An example of its output with everyone's favorite "benchmark" tool, glxgears, on an outdated distribution (thus an older kernel):
LD_PRELOAD=./glxswapbuffersmeasure.so glxgears
1142 frames in 5.0 seconds = 228.375 FPS
1035 frames in 5.0 seconds = 206.474 FPS
934 frames in 5.0 seconds = 186.540 FPS
glXSwapBuffers count: 3947, avg: 0.004757, variance: 0.000045, std dev: 0.006699, max: 0.204504
I did some moving of windows around to make it stutter a bit more, and the output from my test library shows it (200ms max latency, which corresponds to around 5 FPS). Note that the average time between glXSwapBuffers calls approximately matches glxgear's FPS printout.
It should be quite simple for someone who sees latency problems which seem to be cured by BFS to try to run the same 3D game with something like this library both in the mailine scheduler and in BFS and see if it shows any differences in the output. Of course, the code I posted can be enhanced to get better statistics (like a histogram of the latencies); I put the code under Creative Commons CC0 (a bit similar to "public domain").
