[gst-devel] 0.9 proposals
Martin Soto
soto at informatik.uni-kl.de
Fri Dec 3 10:01:03 CET 2004
On Thu, 2004-12-02 at 18:02 -0800, David Schleef wrote:
[snip]
> On my system, about 80% of the time used by the gthread-switch
> program is used by glib initialization. Can you confirm this?
>
> > In the
> > gthreads case there's a big difference. Does anyone have a good
> > explanation for that?
>
> Yes. Profiling by using 'time' is a shot in the dark, at best.
OK, now I'm using getrusage to get the resource usage information. I'm
timing only the loops and excluding initialization and clean up:
$ ./time-program ./pth-switch
1: 0.476 0.304
2: 0.489 0.288
3: 0.454 0.324
4: 0.487 0.291
5: 0.512 0.265
6: 0.486 0.294
7: 0.492 0.287
8: 0.473 0.306
9: 0.519 0.260
10: 0.471 0.306
*: 0.486 0.292
$ ./time-program ./gthread-switch
1: 0.873 2.017
2: 0.774 1.781
3: 0.699 1.645
4: 0.717 1.655
5: 0.699 1.628
6: 0.693 1.640
7: 0.641 1.662
8: 0.656 1.680
9: 0.694 1.645
10: 0.667 1.719
*: 0.711 1.707
First column is user time, second is system time. I'm not measuring
elapsed time because it seems sort of pointless. The gthreads program
needs about 50% more user time (sounds reasonable, because the locking,
unlocking, and signaling procedure is somewhat more complex) and almost
6 times more system time. How big the effect of this can be on the
general performance of a pipeline, I don't know, but there seems to be a
clear performance difference.
The test programs are attached.
Cheers,
M. S.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cotheads-compare.tar.gz
Type: application/x-compressed-tar
Size: 1399 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20041203/1875c764/attachment.bin>
More information about the gstreamer-devel
mailing list