audiamus / AaxAudioConverter

Convert Audible aax files to mp3 and m4a/m4b
GNU General Public License v3.0
1.51k stars 115 forks source link

Insufficient Number of FFmpeg Processes Started during Conversion #183

Closed some-vec-byte closed 1 year ago

some-vec-byte commented 1 year ago

Hello,

I noticed that the program only initiates 4 FFmpeg processes for conversion tasks, despite the processor having 16 cores. So the processor is only utilized to 12 %. Can i change that somehow?

Best regards

audiamus commented 1 year ago

I am afraid you can't.

AAX Audio Converter uses the Task Parallel Library (TPL) in .Net. Every loop that makes sense to be parallelized will be. You'll find a lot of Parallel.For () and Parallel.ForEach () in the code. However, when executing a loop, the TPL decides for itself - and has to - on how many tasks to start simultaneously and on which processor core to run them (and the operating system will have its say as well). But there is some channelling involved. As there are parallel loops which themselves launch other parallel loops, parallelization can get out of control and become inefficient. Channelling limits the number of parallel tasks. And the channelling parameters depend very much on the book structure and conversion modes.

I have dedicated a few paragraphs in the manual to parallelization aspects, see chapter 2.7 Performance from page 11 in the current edition of the manual.

some-vec-byte commented 1 year ago

Dear Audiamus,

I want to thank you for your software and the detailed response to my issue. I really like the software and the comprehensiveness of its manual. It has been helpful, well-organized and im even starting to use chapter meta data now.

I would also like to mention that the issue can now be closed as it has been resolved.

Once again, thank you for your outstanding work!

Best regards