Repository navigation
Replies: 2 comments 15 replies
|
if you want I can do the same test with a M3 pro 18Gb unified memory and you'd know the M5 would be much better... (I'd need help with cli interface as I've never used it) We could actually standardize a set of pictures and CLI commands to perform tests and compare settings and machines. |
|
Thanks for this — it is more careful than most benchmark posts, and the run-to-run stability you noticed is real: a CLI export is one deterministic pass with no cache and no GUI, so there is very little left to vary. Before the numbers can answer your question, though, three different things got measured together, and only one of them is about "how fast Ansel processes a RAW". 1. What
|
| machine | pipeline reached module 2 at | total | share spent before any heavy pixel work |
|---|---|---|---|
| T15 | 5.02 s | 16.30 s | 31 % |
| P16v | 1.31 s | 6.75 s | 19 % |
| M1 | 2.03 s | 11.01 s | 18 % |
On my machine (Xeon E3-1505M, 4c/8t) I measured that fixed cost directly: ~1.8–1.9 s per exported image, constant from 1 to 8 threads. It is single-threaded work — raw decoding is single-thread, libjpeg encoding is single-thread. No number of cores and no GPU removes it.
2. %cpu is not a measure of anything
Your central inference — "≈7.4 cores in constant use against 4.5, so the cores aren't fully used" — rests on a number that does not mean what it looks like. Same machine, same image, same wall clock:
OMP_WAIT_POLICY=active 7.90 s wall 52.73 s user 727 % cpu
OMP_WAIT_POLICY=passive 7.87 s wall 35.99 s user 516 % cpu
Identical work, identical time, 40 % difference in reported CPU. The gap is OpenMP threads spinning at barriers, which time counts as CPU time. %cpu tells you how threads wait, not how much work they do — so it cannot support a conclusion about core utilisation.
3. The plateau is not evidence about P/E cores or SMT
I ran your thread sweep on a CPU with no efficiency cores at all — 4 physical Skylake cores + SMT:
OMP_NUM_THREADS=1 23.11 s pipeline (20.6 CPU-s)
2 12.98 s (22.4)
4 7.53 s (25.1)
8 6.09 s (36.8)
4 → 8 threads: ×1.24, +46 % CPU-seconds. Your M1, 4 → 8 threads: ×1.23, +36 % CPU-seconds.
Same signature — but on my machine the extra four threads are SMT siblings sharing execution units, and on yours they are independent E-cores. Two different mechanisms, one number. Your data is equally consistent with static scheduling on heterogeneous cores, with SMT, and with plain memory-bandwidth saturation, and cannot separate them.
Two side notes. You were right that the canonical parallel-loop macro hardcodes schedule(static) — src/system/openmp.h. Whether dynamic scheduling would help on heterogeneous cores is a real question, but testing it needs a rebuild with the change, not a thread sweep. And a base M1 is 4 P-cores + 4 E-cores, not 8 + 8 — which is why your plateau sits at 4 and not at 8.
Separately, thanks for using OMP_NUM_THREADS — it was the only lever that worked. Checking this sent me after a real bug: Ansel's own -t N option and the "CPU cores" preference in the very settings menu you used to turn OpenCL off had no effect on pipeline processing at all. dt_init() sets our thread count, and then InitializeMagick() — GraphicsMagick's init — calls omp_set_num_threads(omp_get_num_procs()) and overwrites it process-wide. In ansel-cli, where the export runs on the main thread, the setting did nothing whatsoever. Fixed; -t 1 now gives 24.3 s at 100 % CPU where it used to give 6.3 s at 567 %.
4. What your numbers do establish — the important part
Fit Amdahl's law to your P16v sweep (1 thread 30.57 s, 8 threads 6.37 s): serial fraction ≈ 9.5 %, i.e. about 2.9 s of your 5.5 s best time cannot be parallelised at all. A machine with 16 real cores instead of 8 would get you to ~4.6 s. An infinitely parallel machine gets you to 2.9 s.
So the honest spread between the three laptops you are considering, on this metric, is roughly one to two seconds per image, and no core count crosses that floor. Only single-thread speed lowers it.
5. The GPU question, concretely
I have a discrete GPU here (Quadro M2200, 4 GB, PCIe). Settled configuration, three runs each, same 24 Mpx file:
OpenCL off: 4.67 – 5.16 s pipeline / 6.22 – 6.74 s total
OpenCL on: 3.15 – 3.26 s pipeline / 4.81 – 4.90 s total (23 % faster)
Filmic alone: 0.22 s on the GPU against 1.03 s on the CPU. So on this pipeline a discrete GPU is a clear win, and your iGPU result is a genuinely different regime rather than a general truth about Ansel — which is the honest answer to "how much can a 5070 contribute": on an integrated 780M the GPU shares the DDR5 bandwidth the CPU had already saturated, and there is nothing left to win; a discrete card with its own memory does not have that problem.
Three things still bound the win, and none of them improves with a faster GPU:
- VRAM capacity, not GPU throughput, is what decides on export. A working buffer at full resolution is 4 floats per pixel — 384 MB for 24 Mpx — and a module can want several at once. On this card I watched filmic ask for 3.3 GB, fail the fit check, and only survive because the pipeline flushes its idle cached buffers and retries. On a smaller card it would have dropped to the CPU. That is the number to compare between your candidates: the mobile RTX 5070 has 8 GB. (It also turned out filmic was over-declaring: it reserved the buffers of a highlights reconstruction that is deprecated and never runs. Fixed since, so that particular request is now 1 buffer instead of 8 — your measurements predate the fix.)
- Roughly a third of Ansel's modules have no OpenCL path at all. In the default pipeline for my test file the single most expensive module is chromatic aberrations at 31 % of total CPU pipeline time, and it has no GPU implementation. Every CPU-only module in the middle of the chain forces a full round trip of that 384 MB buffer, device → host → device.
- Most of the rest are memory-bound, one pass over a large buffer with a handful of FLOPs per pixel. Transfer dominates there, so the speed-up is nothing like the ratio of raw TFLOPS.
Where a GPU pays most is the compute-heavy modules — diffuse or sharpen, guided-laplacian highlight reconstruction, AI denoise — and the darkroom, where buffers are screen-sized, VRAM is never the limit and what you feel is latency rather than throughput. Your benchmark exercises neither. Your own follow-up says exactly this: a heavier history with masks would be a better bench, and it would.
One decisive point on the Mac option: Apple deprecated OpenCL in 2018, and what your log shows (createKernel: newComputePipelineState failed) is their Metal shim failing. On an M5 Pro you will get exactly what you get on the M1 today — Ansel on CPU only, permanently, unless someone writes a Metal backend. Given that a discrete GPU measurably does help here, that is worth weighing before buying the Mac.
6. What I would actually answer about the purchase
The finding that matters is already in your post, and it is in none of the tables:
the GUI takes a lot of time to render (and some times to open a RAW in the darkroom) and this is why I prefer, with a bit of less performance, to use Ansel on the Apple M1
You measured export throughput, then chose your machine on interactive latency — which you did not measure. That is your real criterion, and it is also the one I can do something about: if the GUI is slow on the P16v and instant on the M1, that is a software problem on my side, not a hardware verdict.
Note what that startup actually consists of, because none of it is CPU-bound and none of it is what your benchmark measured: Ansel dlopens around ninety plugin modules one by one, opens and migrates the SQLite library and data databases, parses the lensfun camera/lens database, and — if OpenCL initialises — loads or rebuilds its compiled kernel cache, which blocks the splash screen. That is a pile of small reads and dynamic-linker work, so it is governed by storage latency and by how much of it the page cache already holds, far more than by the processor. An M1's NVMe against whatever is in the P16v is a plausible part of your answer on its own, and it is worth knowing whether the first launch after boot differs from the second on the same machine — if the second is fast, you are measuring the disk, not Ansel.
Have a look, from the P16v, at: ansel -d perf -d opencl startup output (in particular the [init] startup took … line and the KERNEL LOADING TIME line), the timings when entering the darkroom on a RAW, cold-start versus warm-start times, and what kind of drive each machine has.
Buying hardware to work around a software latency bug is the expensive way to fix it.
7. On the shared bench
Yes, worth doing, and your run-test.sh is the right starting point — provided the bench states up front what it measures, otherwise we end up comparing machines on the JPEG encoder. You have already identified the biggest gap yourself: a simple history with no masks exercises none of the modules where hardware differences actually show. What would make it useful:
- report the
[pixelpipe] … processing took X secsline from-d perf, nottime's total, and report the fixed cost separately; - a batch of N images rather than one, since the ~2 s per-process fixed cost is amortised in real use;
- one file per sensor type (Bayer / X-Trans), at a stated resolution;
- two histories: a light one, and a heavy one enabling diffuse or sharpen and guided-laplacian highlights — that is where a GPU is worth anything;
- always a
--disable-openclreference run rather than the preference — the flag is per-run and cannot be forgotten between measurements, whereas a setting persists into runs you did not mean it to; and always report VRAM andOMP_WAIT_POLICY; - median of 5 runs, not the mean.
And a last word, since it is the only criterion no bench will ever give you: none of these three machines will change what your photographs look like. They will change how long you wait. Pick on the waiting you actually do — which, from your own post, is interactive, not export.


Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
The context
Currently, I have two pro laptops running LinuxMint:
and one personal laptop from my elder daughter: an Apple MacBook Air M1 with 8GB RAM. This laptop allows me to use proprietary and private softs like for example ColorNavigator to calibrate my Enzo monitor.
Up to now, because the T15 is an awful powerless computer, I used the M1 with Ansel. It works fine ... However, Ansel is unable to use OpenCL and tells me that there isn't enough memory. Currently, I allocate to the system 4,5GB in the M1, and 6GB in the others laptops; the other memory space is for Ansel.
I'm prospecting to buy a personal laptop dedicated to run, among other stuffs, Ansel. I'm torn between three possible laptops:
I'm mainly a GNU/Linux user but I'm used to using Macs, too. I read in the web the raw performance of the M5 Pro CPU far outweighs the AMD Ryzen AI 9 (both 365 and 370). But the M5 Pro GPU is outperformed by the nVidia GeForce RTX 5070 (the GPU equipping the Tuxedo and the Slimbook).
I don't know how important the GPU, with OpenCL, is for Ansel. I've read that OpenCL couldn't provide any real performance gains (and might even have a negative impact) with certain modules in Ansel.
Because of the Thinkpad P16v in my hands, I decided to measure, in a disputable way, the performance in time of treatment the dev of a RAW by the same version of Ansel on my different machines. The first and main goal is to decide what machine to use with Ansel. Then, a second goal is to understand the performance of the M1 in order to have a glance of the possible performances a M5 Pro could provide me, and then to help me to decide what laptop to buy (perhaps) between a GNU/Linux machine and a MacOS one.
The measures
For the measures, I used
timeandansel-clito develop a JPG from the same RAW a long with its XMP. For each machine, I ran only 5 times the script. I was remarkably astonished by the stability of the computation time along the different execution of Ansel.Thinkpad T15
Example of output:
Thinkpad P16v
Example of output:
Apple M1
Example of output:
Brief analyses
As expected, the Thinkpad T15 is an awful computer. This is why I use the Apple M1 for developing my RAWs.
The P16v has better performance with its 8 cores and 16 threads (SMT). Around 7,4 cores are in constant use against 4,5 cores with the M1 (8 E-cores E / 8 P-cores P). Ansel parallelizes strongly the work. I found the performance honorable for the old Apple M1 with its only 8GB RAM. Besides that, in my usage, when I start Ansel on the P16v, the GUI takes a lot of time to appear whereas it is almost instantaneous on the M1.
But the M1 has a problem with OpenCLI as indicated by the message
UNSUPPORTED (log once): createKernel: newComputePipelineState failedseams to say.This is why I decided, for fun, to execute the measures on the P16v and on the M1 with OpenCL disabled:
48,58s user 2,81s system 471% cpu 10,902 total46,94s user 5,29s system 944% cpu 5,531 totalIn fact, OpenCL doesn't carries any real benefit here on my P16v.
Measure of the multithreads usage
The percentage of CPU usage gives me the hint the cores/virtual cores on the P16v and the E-cores/P-cores on the M1 aren't plainly used during all the dev in Ansel. So, for fun, I launched the script with 1, 2, 4, 8, and 16 threads thanks to the
OMP_NUM_THREADSenvironment variable (and without OpenCL)Thinkpad P16v
Apple M1
Brief analysis
In the P16v, the performance gain have plateaued after 8 threads whereas on the M1 they have stalled after 4 threads. These numbers match the physical cores on the P16v and the E-cores on the M1.
In my mind, the tasks allocation to threads are done by OpenMP and it is the underlying OS subsystem that decides in which cores the tasks will be done. Nevertheless, it seams the physical cores and E-cores are used first and then, when additional threads are available, the others cores are used. So, it is like the SMT for the P16v and the P-core in M1 a bottleneck in the highly parallelized RAW processing in Ansel; indeed, as the work in Ansel is statically divided among the threads (
schedule(static)in the#pragma ompin the code), I think in the barriers the physical (E-)cores wait for the completion of the work by the virtual cores/P-cores which are by design less efficient.And now?
Hum, it seams the Thinkpad P16v is the machine to use to develop my RAWs... but, (yes there is a but), the GUI takes a lot of time to render (and some times to open a RAW in the darkroom) and this is why I prefer, with a bit of less performance, to use Ansel on the Apple M1 when I am in a hurry (like to develop my RAWs to deliver the JPGs by the end of the day during a pro event).
Now, with such results, do you think the MacBook Pro M5 Pro could be a better horse than the two GNU/Linux machines driven by a AMD Ryzen AI 9 365/370 / nVidia GeForce 5700? In my opinion, it all depends on how much the nVidia GeForce 5700, with OpenCL, can contribute to RAW processing in Ansel in a real and common usage.
All reactions