[x264-devel] Trouble keeping 8 cores busy
Klaus Post
klauspost at gmail.com
Wed Jan 7 09:08:21 CET 2009
On Wed, Jan 7, 2009 at 3:42 AM, Jason Garrett-Glaser
<darkshikari at gmail.com>wrote:
> > We found that the time it took x264 to create a
> > thread and then subsequently destroy the thread once it was done doing
> > its business was killing a significant amount of time
>
> Last time I did this test, that process (thread destruction+creation)
> took on the order of one microsecond. Which is why it wasn't
> committed.
>
One thing is the actual thread creation time, but when you constantly create
and destroy threads, you don't give the OS any change to schedule them
properly. Similar to the way you cannot judge threading efficiency on CPU
usage, you cannot judge the cost of thread creation/destruction on
creation/destruction time alone, but you should benchmark it in a real-world
scenario.
My _guess_ is that with fast encoding settings thread creation/destruction
is becoming a significant overhead on Quad++Cores, especially since x264 is
becoming faster and faster.
Either way - using a thread pool is playing it safe, since I cannot see any
drawbacks by using it.
>
> Dark Shikari
> _______________________________________________
> x264-devel mailing list
> x264-devel at videolan.org
> http://mailman.videolan.org/listinfo/x264-devel
>
Regards, Klaus Post
http://sh0dan.blogspot.com (My projects)
http://klauspost.blogspot.com (Personal)
http://kpgallery.blogspot.com (My Photo Gallery)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.videolan.org/pipermail/x264-devel/attachments/20090107/be2e15e1/attachment.htm
More information about the x264-devel
mailing list