Divide and Conquer, to thread or not to thread ffmpeg
For those who want their cores to produce at the max.
-threads 0 on a typical h264 encode scores on AMD X2 @ 173.6% -threads 0 on a typical h264 encode scores on my AMD X4 @ 156.3% -threads 2 on a typical h264 encode scores on my AMD X4 @ 150.2%
The 3rd and 4th core don't add anything usefull. According to top CPU load is ~ 160%
If source permits, DVB-S in my case I split the source in 4 equal parts for 2 PC's with a X2, or my X4. The two X2's achieve a performance level of 331% The X4 achieves a performance level of 276%
By adding -threads 0 to the command you'll achieve another boost of 10-15% because the equal parts won't always be equal simple/difficult to compress, low/high-motion. The first free core can then assist in processing the not yet finished task. The X2 combo achieves 379%, while the X4 rises to 195.6%
Happy threading,
Henk Schoneveld
Could you supply the times taken using the various command line options. You can use -benchmark to give the times ffmpeg took to convert a file.
On Thu, Apr 29, 2010 at 11:09 PM, Programmingkid <programmingkidx at gmail.com> wrote:
For those who want their cores to produce at the max.
-threads 0 on a typical h264 encode scores on AMD X2 ? ?@ 173.6% -threads 0 on a typical h264 encode scores on my AMD X4 @ 156.3% -threads 2 on a typical h264 encode scores on my AMD X4 @ 150.2%
The 3rd and 4th core don't add anything usefull. According to top CPU load is ~ 160%
If source permits, DVB-S in my case I split the source in 4 equal parts for 2 PC's with a X2, or my X4. The two X2's achieve a performance level of 331% The X4 achieves a performance level of 276%
By adding -threads 0 to the command you'll achieve another boost of 10-15% because the equal parts won't always be equal simple/difficult to compress, low/high-motion. The first free core can then assist in processing the not yet finished task. The X2 combo achieves 379%, while the X4 rises to 195.6%
Happy threading,
Henk Schoneveld
Could you supply the times taken using the various command line options. You can use -benchmark to give the times ffmpeg took to convert a file.
-benchmark might sum the time taken for all the threads, giving you a not-so-useful number. You might want to run "time ffmpeg <...>", but that might also give you the same numbers. You could also edit ffmpeg.c and make getutime() always return av_gettime() (it's in some #ifdefs).
Out of curiousity how was the disk io load during the runs? Kosta On Apr 29, 2010, at 10:09 PM, Programmingkid <programmingkidx at gmail.com> wrote:
For those who want their cores to produce at the max.
-threads 0 on a typical h264 encode scores on AMD X2 @ 173.6% -threads 0 on a typical h264 encode scores on my AMD X4 @ 156.3% -threads 2 on a typical h264 encode scores on my AMD X4 @ 150.2%
The 3rd and 4th core don't add anything usefull. According to top CPU load is ~ 160%
If source permits, DVB-S in my case I split the source in 4 equal parts for 2 PC's with a X2, or my X4. The two X2's achieve a performance level of 331% The X4 achieves a performance level of 276%
By adding -threads 0 to the command you'll achieve another boost of 10-15% because the equal parts won't always be equal simple/ difficult to compress, low/high-motion. The first free core can then assist in processing the not yet finished task. The X2 combo achieves 379%, while the X4 rises to 195.6%
Happy threading,
Henk Schoneveld
Could you supply the times taken using the various command line options. You can use -benchmark to give the times ffmpeg took to convert a file. _______________________________________________ ffmpeg-user mailing list ffmpeg-user at mplayerhq.hu https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user
Coderwhiz wrote:
Out of curiousity how was the disk io load during the runs? Do the math, if I would achieve realtime HD 1080i encoding from 16Mb/s to 8Mb/s, which I'm not able to do, I would read/write 24Mb/s which is of course a very very low number, even the cheapest USB-stick could deliver this.
Kosta
On Apr 29, 2010, at 10:09 PM, Programmingkid <programmingkidx at gmail.com> wrote:
For those who want their cores to produce at the max.
-threads 0 on a typical h264 encode scores on AMD X2 @ 173.6% -threads 0 on a typical h264 encode scores on my AMD X4 @ 156.3% -threads 2 on a typical h264 encode scores on my AMD X4 @ 150.2%
The 3rd and 4th core don't add anything usefull. According to top CPU load is ~ 160%
If source permits, DVB-S in my case I split the source in 4 equal parts for 2 PC's with a X2, or my X4. The two X2's achieve a performance level of 331% The X4 achieves a performance level of 276%
By adding -threads 0 to the command you'll achieve another boost of 10-15% because the equal parts won't always be equal simple/difficult to compress, low/high-motion. The first free core can then assist in processing the not yet finished task. The X2 combo achieves 379%, while the X4 rises to 195.6%
Happy threading,
Henk Schoneveld
Could you supply the times taken using the various command line options. You can use -benchmark to give the times ffmpeg took to convert a file. _______________________________________________ ffmpeg-user mailing list ffmpeg-user at mplayerhq.hu https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user
_______________________________________________ ffmpeg-user mailing list ffmpeg-user at mplayerhq.hu https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user
Coderwhiz wrote:
Out of curiousity how was the disk io load during the runs? Do the math, if I would achieve realtime HD 1080i encoding from 16Mb/s to 8Mb/s, which I'm not able to do, I would read/write 24Mb/s which is of course a very very low number, even the cheapest USB-stick could deliver this.
Kosta
On Apr 29, 2010, at 10:09 PM, Programmingkid <programmingkidx at gmail.com> wrote:
For those who want their cores to produce at the max.
-threads 0 on a typical h264 encode scores on AMD X2 @ 173.6% -threads 0 on a typical h264 encode scores on my AMD X4 @ 156.3% -threads 2 on a typical h264 encode scores on my AMD X4 @ 150.2%
The 3rd and 4th core don't add anything usefull. According to top CPU load is ~ 160%
If source permits, DVB-S in my case I split the source in 4 equal parts for 2 PC's with a X2, or my X4. The two X2's achieve a performance level of 331% The X4 achieves a performance level of 276%
By patching the kernel and using BFS instead of CFS as kernel-scheduler http://ck.kolivas.org/patches/bfs/ and by disabling Cool&Quiet in the BIOS-settings, throttling through the raise of the temperature was the main problem, I was able to raise X4
belcampo wrote: performance to 354%.
By adding -threads 0 to the command you'll achieve another boost of 10-15% because the equal parts won't always be equal simple/difficult to compress, low/high-motion. The first free core can then assist in processing the not yet finished task. The X2 combo achieves 379%, while the X4 rises to 195.6%
Happy threading,
Henk Schoneveld
Could you supply the times taken using the various command line options. You can use -benchmark to give the times ffmpeg took to convert a file. _______________________________________________ ffmpeg-user mailing list ffmpeg-user at mplayerhq.hu https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user
ffmpeg-user mailing list ffmpeg-user at mplayerhq.hu https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user
_______________________________________________ ffmpeg-user mailing list ffmpeg-user at mplayerhq.hu https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user
belcampo wrote:
For those who want their cores to produce at the max.
-threads 0 on a typical h264 encode scores on AMD X2 @ 173.6% -threads 0 on a typical h264 encode scores on my AMD X4 @ 156.3% -threads 2 on a typical h264 encode scores on my AMD X4 @ 150.2%
The 3rd and 4th core don't add anything usefull. According to top CPU load is ~ 160%
If source permits, DVB-S in my case I split the source in 4 equal parts for 2 PC's with a X2, or my X4. The two X2's achieve a performance level of 331% The X4 achieves a performance level of 276% By patching the kernel and using BFS instead of CFS as kernel-scheduler http://ck.kolivas.org/patches/bfs/ and by disabling Cool&Quiet in the BIOS-settings, throttling through the raise of the temperature was the main problem, I was able to raise X4 performance to 354%. Another performance update. I found Distributed Parallel Processing Shell Script (PPSS), which can be found http://code.google.com/p/ppss With 4PC's and a total of 10Cores I achieve 860% of theoretical achievable performance, being 74fps, for BBC-HD -> HQ-SD.
Happy threading,
Henk Schoneveld
Programmingkid wrote:
For those who want their cores to produce at the max.
-threads 0 on a typical h264 encode scores on AMD X2 @ 173.6% -threads 0 on a typical h264 encode scores on my AMD X4 @ 156.3% -threads 2 on a typical h264 encode scores on my AMD X4 @ 150.2%
The 3rd and 4th core don't add anything usefull. According to top CPU load is ~ 160%
If source permits, DVB-S in my case I split the source in 4 equal parts for 2 PC's with a X2, or my X4. The two X2's achieve a performance level of 331% The X4 achieves a performance level of 276%
By adding -threads 0 to the command you'll achieve another boost of 10-15% because the equal parts won't always be equal simple/difficult to compress, low/high-motion. The first free core can then assist in processing the not yet finished task. The X2 combo achieves 379%, while the X4 rises to 195.6%
Happy threading,
Henk Schoneveld
Could you supply the times taken using the various command line options. You can use -benchmark to give the times ffmpeg took to convert a file. Baseline, 100% is 1 core encoding the whole file. It doesn't matter if it's going from 7fps to 26.53fps in the case of 379%, or from 2fps to 7.6fps. Timing is done, touch begin, run ffmpeg, check if any ffmpeg instances are still running, if no, touch end, calculate with stat c%Y the difference between timestamp of file end - begin. _______________________________________________ ffmpeg-user mailing list ffmpeg-user at mplayerhq.hu https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user
participants (4)
-
belcampo@zonnet.nl -
coderwhiz@gmail.com -
programmingkidx@gmail.com -
ramiro.polla@gmail.com