I have an 8 core i7, 2.3 GHz machine. Pulse shows about 40% usage across all 8 cores at the start, but soon drops to maybe 10% with short 50% spikes on individual cores. In general it seems to fluctuate quite a bit (not sure if it depends on the video contents changingā¦)
Also curious is the thread count and their core usage (all 8 cores on at the left, 4 cores turned off on the right):
All those lazy ass threads in the middle donāt seem to work at allā¦
A current Linux Mint shows around 80% cpu usage acoss all cores, relatively stable. No idea about thread count, because I have no idea how to get that info on Linux.
can you compare encoding time ? i get the suspicion is that the memory Management isnāt doing a good job at feeding the CPUs, but itās just a random ballpark guess.
here is a great example of why haiku is superior to linux distros in general, small difference in encoding time massive difference in cpu utilization. Iām still willing to bet that haiku could easily encode faster with some memory and CPU pipeline feeding optimization.
a 70% increase in cpu usage for what a 20% in encoding speed, thatās wasted electricity and wtf is the Linux version doing with all that cpu utilization ???
can you test both systems against a external clock ? like a high precision watch or something ?
i for one am quiet skeptical about he stability of Linuxs internal clock monitoring for execution time.
I dontāt have precise timepieces to benchmark with, and frankly, am not really interested in those numbers. I was really just wondering if all those ffmpeg threads under Haiku are also used under Linux, and that seems to be the case.
Also, my initial assessment of a 50% cpu load sinking to 10% may have been a fluke or misreporting of Pulse. Iāve now installed Slayer to keep watch of cpu usage and threads, and it appears to be quite constant at 45-50% (compared to Linux 70%).
I was wondering why have dozens of threads, many of them waiting/idling and the rest not working full speed. After all, I want that encoding done as quickly as possible - why wait 30 minutes at 50% cpu usage when it could be done in 15 minutes at 100% (minus cpu cooling phasesā¦ )
IO doesnāt appear to be the bottleneck:
Haiku RAM FS:
real 1m42,401s
user 6m20,702s
sys 0m7,777s
ETA: ffmpeg shows a āspeedā factor when encoding. Haiku: 9.5x, Linux: 13x.
the IO bottleneck might be the way haiku moves data from disk to ram to cache. Iāll do some thinking on how to figure this out. if i come up with anything Iāll post up and the total speed difference and cpu utilization donāt make sense, it should be relatively linear and it doesnāt appear to be. obviously the haiku version is not adequately supporting the execution pipeline. also the linux version appears to have a lot of useless execution bloat
It would be interesting a small research in this area with different formats, file sizes, video duration, conversion in parallel with other activities, simultaneous conversion of several videos, etc.
Iām kind of wierded out how you are giving linux that much shit for something you didnāt even investigate. Who sais that the speed would be a linear improvement? Also: the usage isnāt directly comparable like this.
i might be deeper into the guts of debian than you are aware of, the gui penalty in linux, is not small. It should be linear btw, if ffmpeg is running same code in both operating systems.
i also noticed that you ignored my being critical of the haiku execution pipeline being poorly managed.
thereās plenty of places you can go feel offended for Linux, is Haiku the best place ??
It would be much easier to look at differences 1:1 and examine that, as this ffmpeg case does instead of extrapolating from almost nothing and going āoh linux used the cpu more effictively, itās clearly bloatedā
This looks like a job for scheduling_recorder and DebugAnalyzer to determine where the bottlenecks are, if it doesnāt appear I/O is the problem. Probably worth opening a ticket, as this looks like something that could be ālow-hanging fruitā, performance-wise.
You know what just came to me? My cpu is an intel i7-4712MQ @ 2.30 ghz that supposedly can āboostā to 2.9 ghz. Is this boosting done on-chip or does the OS have to trigger it?
If Linux does the boosting and Haiku does not, it may explain the speed difference.
I still donāt know why ffmpeg uses dozens of threads, half of them donāt perceptibly use the cpu, and still just barely make it to 50% overall usageā¦ but maybe thatās by design of ffmpegā¦
You can watch this happening in ActivityMonitor, I have added support for CPU frequency display a few months ago (based on low-level work from other developers to report this to userspace, sorry, I forgot who did that)