To view parent comment, click here.
To read all comments associated with this story, please click here.
Fedora 9 with all updates, redeon driver, AMD 3870, Phenom 9750
[storm@fast ~]$ x11perf -putimage500
x11perf - X11 performance program, version 1.5
The X.Org Foundation server version 10499902 on :0.0
from fast
Sun Jun 29 14:11:16 2008
Sync time adjustment is 0.0334 msecs.
2800 reps @ 2.0214 msec ( 495.0/sec): PutImage 500x500 square
2800 reps @ 1.9846 msec ( 504.0/sec): PutImage 500x500 square
2800 reps @ 1.9471 msec ( 514.0/sec): PutImage 500x500 square
2800 reps @ 1.9314 msec ( 518.0/sec): PutImage 500x500 square
2800 reps @ 1.9462 msec ( 514.0/sec): PutImage 500x500 square
14000 trep @ 1.9661 msec ( 509.0/sec): PutImage 500x500 square
[storm@fast ~]$ x11perf -shmput500
x11perf - X11 performance program, version 1.5
The X.Org Foundation server version 10499902 on :0.0
from fast
Sun Jun 29 14:12:17 2008
Sync time adjustment is 0.0305 msecs.
16000 reps @ 0.3851 msec ( 2600.0/sec): ShmPutImage 500x500 square
16000 reps @ 0.3684 msec ( 2710.0/sec): ShmPutImage 500x500 square
16000 reps @ 0.3661 msec ( 2730.0/sec): ShmPutImage 500x500 square
16000 reps @ 0.3684 msec ( 2710.0/sec): ShmPutImage 500x500 square
16000 reps @ 0.3680 msec ( 2720.0/sec): ShmPutImage 500x500 square
80000 trep @ 0.3712 msec ( 2690.0/sec): ShmPutImage 500x500 square
~5 times faster, not bad.
openSUSE 10.3, Intel Q6600, Nvidia8600 GTS nvidia binary drivers, 2560x1600 resolution, 32 bpp
x11perf -putimage500
x11perf - X11 performance program, version 1.5
The X.Org Foundation server version 70200000 on :0.0
from monsta
Sun Jun 29 14:38:21 2008
Sync time adjustment is 0.0413 msecs.
8000 reps @ 0.7415 msec ( 1350.0/sec): PutImage 500x500 square
8000 reps @ 0.8194 msec ( 1220.0/sec): PutImage 500x500 square
8000 reps @ 0.9253 msec ( 1080.0/sec): PutImage 500x500 square
8000 reps @ 0.8722 msec ( 1150.0/sec): PutImage 500x500 square
8000 reps @ 0.8803 msec ( 1140.0/sec): PutImage 500x500 square
40000 trep @ 0.8477 msec ( 1180.0/sec): PutImage 500x500 square
x11perf -shmput500
x11perf - X11 performance program, version 1.5
The X.Org Foundation server version 70200000 on :0.0
from monsta
Sun Jun 29 14:39:16 2008
Sync time adjustment is 0.0385 msecs.
12000 reps @ 0.4442 msec ( 2250.0/sec): ShmPutImage 500x500 square
12000 reps @ 0.4435 msec ( 2250.0/sec): ShmPutImage 500x500 square
12000 reps @ 0.4433 msec ( 2260.0/sec): ShmPutImage 500x500 square
12000 reps @ 0.4429 msec ( 2260.0/sec): ShmPutImage 500x500 square
12000 reps @ 0.4424 msec ( 2260.0/sec): ShmPutImage 500x500 square
60000 trep @ 0.4433 msec ( 2260.0/sec): ShmPutImage 500x500 square
Only two times faster. Or in other words, already the core X on a local server is very fast and does not use TCP/IP when local.
Don't get me wrong, I use MIT-SHM for 14 years in my programs. But in optimization, you need to look at the total cost, not just optimize because you can. The actual time spent in copying the image buffer is most likely negligent with respect to generating the image data. So you will get better overall speedup by optimizing other part of the application.
In the old times, this data transfer was very slow, so optimizing it by MIT-SHM make a lot of sense. Nowadays, graphics cards are very fast (even on high resolutions like the ones I use), so optimizing with MIT-SHM does not buy you much (in the total application speed).





Member since:
2005-11-20
Well, we are speaking about Cairo here right?
Cairo is basically a software renderer. That implies that in fact you do all your rendering to the memory, then transfer the resulting image to X11.
That in fact implies that you rarely are able to "reuse" stored images. Each screen update means a new image and new transfer.
IME, the difference in image transfer is about 2x. OTOH, the rendering itself can perhaps take quite a bit of time too, so in practice, maybe it really is not that critical.
BTW, you can try it:
x11perf -putimage500
x11perf -shmput500