Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: What is currently the best/most optimized FLAC build for modern AMD CPUs? (Read 5406 times) previous topic - next topic - Topic derived from FLAC v1.3.3
0 Members and 1 Guest are viewing this topic.

What is currently the best/most optimized FLAC build for modern AMD CPUs?

Hi everyone! New here, long time lurker, first time poster. Some of these reaaally deep technical aspects tend to go way over my head, so please excuse the noob questions, but I was wondering about a few things…


I am planning on putting together a new system based around the upcoming Ryzen 5950x. What is currently the best/most optimized build for modern AMD CPUs? On that note, what exactly makes one build better than another when targeting specific hardware? It’s all x86 in the end anyway, right? I can’t say I fully understand the concept. But I do like it!


Also, is there a such a thing as GPU accelerated encoding/decoding? Would this be better or worse than solely relying on the CPU when it comes to FLAC?


Re: What is currently the best/most optimized FLAC build for modern AMD CPUs?

Reply #2
There is a GPU FLAC encoder:  http://cue.tools/wiki/FLACCL

Very interesting! So FLAC ideally would be encoded using the GPU? Is it still much more suited to encoding this way even when compared to newer CPUs?


In CPU encoding, it is the core count that realistically dictates how many instances of the encoder you can have running at once (useful for batch operations)

What is the equivalent metric for a GPU encoder? Considering they don’t have what are traditionally referred to as cores, AFAIK

Re: What is currently the best/most optimized FLAC build for modern AMD CPUs?

Reply #3
GPUs do have something functionally equivalent to cores, but it has a different name depending on the type of GPU you have.  I think for FLACCL the software will handle that automatically, but you can run multiple instances if you want (not sure if there is any speed up or slow down, try it and see). 

Re: What is currently the best/most optimized FLAC build for modern AMD CPUs?

Reply #4
Here's the thing as well. FLACCL doesn't really work all that well in parallel, while many converters, such as dbPowerAMP and foobar2000, support running multiple conversion jobs at once, each one using a single CPU core.

Re: What is currently the best/most optimized FLAC build for modern AMD CPUs?

Reply #5
Here's the thing as well. FLACCL doesn't really work all that well in parallel, while many converters, such as dbPowerAMP and foobar2000, support running multiple conversion jobs at once, each one using a single CPU core.


Ahh I see. I usually use Foobar for batch operations, I was thinking there may be a way to point it to this FLACCL encoder but I guess I may just stick to an AMD CPU optimized build if it’ll handle a multi-threaded workload better.


I sometimes re-encode stuff with some extreme settings to get better than -8 efficiency, but on my ancient setup it takes a pretty long time per file, and running 3 at a time seems to be about all my PC can handle without totally calling it quits. Newer gear should be able to significantly outperform the old in this regard, will be interesting to see. 

Re: What is currently the best/most optimized FLAC build for modern AMD CPUs?

Reply #6
Ahh I see. I usually use Foobar for batch operations, I was thinking there may be a way to point it to this FLACCL encoder but I guess I may just stick to an AMD CPU optimized build if it’ll handle a multi-threaded workload better.

Most (all?) official/reference codecs of this sort are single-threaded.  Don't overthink it; historically, different builds (GCC vs ICL, etc) may vary in performance by a couple of percentage points, but it's largely academic unless you're operating on a vast scale.

My advice: grab whatever the official build is (or Rarewares, since there was no Windows build for 1.3.3) and don't worry about it.

Re: What is currently the best/most optimized FLAC build for modern AMD CPUs?

Reply #7
Well, I only mentioned that since you can convert all the tracks in a single album in parallel on a modern system, while with FLACCL, you can only convert a single track at a time. I guess it doesn't really matter when it's a difference of 20-30 seconds.

Re: What is currently the best/most optimized FLAC build for modern AMD CPUs?

Reply #8
Gotcha, I appreciate all the info/advice! Will report back once I’ve got everything going, if there’s any notable improvement from what I’m used to at the moment anyway

Re: What is currently the best/most optimized FLAC build for modern AMD CPUs?

Reply #9
The last time I checked FLACCL was bloody fast while encoding, but its initialisation took several seconds every time - multiply this by the number of files to encode and you often end up with longer encoding time than with official single-threaded CPU build.

Re: What is currently the best/most optimized FLAC build for modern AMD CPUs?

Reply #10
The long FLACCL initialization times you were experiencing are probably due to the FLACCL encoder profiles being absent or inaccessible. Consequently, with the encoder profiles being unavailable, when encoding several files one by one the initialization times add up, if encoding multiple files in one go the initialization process is required only once.

The FLACCL encoder profiles are stored at %LOCALAPPDATA%\CUE Tools\OpenCL\. After the first encoding run, which can take a few seconds to initialize, all further encoding runs start promptly. This is my experience of using FLACCL for about 10 years on different systems.

Re: What is currently the best/most optimized FLAC build for modern AMD CPUs?

Reply #11
FLACCL doesn't really work all that well in parallel
What exactly do you  mean by "doesn't really work all that well"? On my system running 4 FLACCL (and each with --cpu-threads 4) in parallel using fb2k converter results in faster conversion of multiple files than converting one by one.

Re: What is currently the best/most optimized FLAC build for modern AMD CPUs?

Reply #12
2+ instances flaccl crushes on my R9 290.
At the beggining of encoding has awful time gap before .net compiles or what he does. (JIT?)
More of encoding time spend on that encoding preparations.
On modern CPU encoding on GPU pointless i think.

Quote from: fb2k command parameter
CUETools.FLACCL.cmd.exe
--fast-gpu --verify --ignore-chunk-sizes --lax -11 --no-seektable --cpu-threads 16 - -o %d


Re: What is currently the best/most optimized FLAC build for modern AMD CPUs?

Reply #13
In my experience, it is not necessary nor beneficial to run several FLACCL processes in parallel, as the conversion is already super fast. How do you start four conversion processes in foobar2000 in parallel anyway? And do you start them all at the same time (how?), or do you start them in a serial manner (e.g. start another conversion process, while one conversion process is already running)?

Re: What is currently the best/most optimized FLAC build for modern AMD CPUs?

Reply #14
In my experience, it is not necessary nor beneficial to run several FLACCL processes in parallel, as the conversion is already super fast
Beneficial or not, obviously, depends on hardware.

How do you start four conversion processes in foobar2000 in parallel anyway?
By default fb2k just runs as many encoder's processes as there are logical CPU cores in system.

Re: What is currently the best/most optimized FLAC build for modern AMD CPUs?

Reply #15
By default fb2k just runs as many encoder's processes as there are logical CPU cores in system.
Yes, I know. I thought you were saying, that you would start four conversion processes, each with its own set of files, at the same time. And that's what is not necessary nor beneficial, due to built-in support of multi-threading, as you just pointed out yourself.

Re: What is currently the best/most optimized FLAC build for modern AMD CPUs?

Reply #16
The long FLACCL initialization times you were experiencing are probably due to the FLACCL encoder profiles being absent or inaccessible. Consequently, with the encoder profiles being unavailable, when encoding several files one by one the initialization times add up, if encoding multiple files in one go the initialization process is required only once.

The FLACCL encoder profiles are stored at %LOCALAPPDATA%\CUE Tools\OpenCL\. After the first encoding run, which can take a few seconds to initialize, all further encoding runs start promptly. This is my experience of using FLACCL for about 10 years on different systems.
So this is out of date?

Re: What is currently the best/most optimized FLAC build for modern AMD CPUs?

Reply #17
No, not out of date, it pretty much confirms what I wrote. Without the code profiles, the encoding start can take up to several seconds, with the profiles the start is almost instantly (~0.5 sec for me), dependant on your overall system performance. For example, using an SSD instead of a classic HD helps to improve startup time.

If you are encoding to FLAC with the compression level set no higher than 8, you probably should stick to the standard binaries though. You only achieve a speed advantage using FLACCL when encoding a larger set of files (10 or more) at once. If you want to achieve the highest FLAC compression though, then using FLACCL with compression preset level 11 is without alternative.