LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   A question about cores and application utilizing them (https://www.linuxquestions.org/questions/linux-newbie-8/a-question-about-cores-and-application-utilizing-them-4175559161/)

TuxLinux5 11-18-2015 12:08 AM

A question about cores and application utilizing them
 
Hello

I want to invest in an intel i7 system down the road because my intel i3 feels slow when encoding videos with ffmpeg.

Depending on the chip and other factors on the i7, I could end up with either 4,6 or 8 cores.

If I manage to get an i7 with 6 or 8 cores, is ffmpeg capable of using them all, or is ffmpeg compiled to use a maximum of 4.

I asked this because I heard many application don't take advantage of the extra cores.

I know some of you might have a system with six or eight cores. If you had use ffmpeg or hanbrake to encode your videos, did any of these two programs utilized the 6 or 8 cores. Thanks

Pearlseattle 11-18-2015 02:43 PM

Hi
As far as I know there are no limitations for ffmpeg.

You might be mixing "real" cores with "virtual" ones?

In any case I have 4-cores CPUs since a few years, all with hyperthreading enabled therefore showing 8 vCPUs in the OS, and I don't remember ffmpeg not using any of the 8 vCPUs (and they all were used up to at least 80-90 when I was re-encoding videos).
No clue about Handbrake, but I would tend to think that it behaves the same way, just because I cannot think about a reason why it should not.

Pls. keep in mind that by having more CPUs you will increase as well the RAM usage => ideally you should have at least 1GB RAM for each CPU you have.

Cheers!

TobiSGD 11-18-2015 03:16 PM

Quote:

Originally Posted by Pearlseattle (Post 5451634)
You might be mixing "real" cores with "virtual" ones?

In fact, the OP is right, the current i7 desktop CPUs range from 4 cores/8 threads (socket LGA1151, for example i7 6700K) over 6 core/12 thread models (socket LGA2011, for example i7 5820K) up to 8 core/16 threads (LGA2011, for example i7 5960X). The next generation of high-end i7 CPUs (codename Skylake-E) will even have a 10 cores/20 threads model.

TuxLinux5 11-18-2015 05:48 PM

Quote:

Originally Posted by Pearlseattle (Post 5451634)
Hi
As far as I know there are no limitations for ffmpeg.

You might be mixing "real" cores with "virtual" ones?

In any case I have 4-cores CPUs since a few years, all with hyperthreading enabled therefore showing 8 vCPUs in the OS, and I don't remember ffmpeg not using any of the 8 vCPUs (and they all were used up to at least 80-90 when I was re-encoding videos).
No clue about Handbrake, but I would tend to think that it behaves the same way, just because I cannot think about a reason why it should not.

Pls. keep in mind that by having more CPUs you will increase as well the RAM usage => ideally you should have at least 1GB RAM for each CPU you have.

Cheers!

My intel i3 has 2 real cores and 2 vCPUs for a total of 4 cores. Have you ever tested ffmpeg if it can use all cores?

I was hoping if you or anyone with six or more cores can do a one minute encoding speed test and compare.

Code:

ffmpeg -i inputfile.xxx -threads 4 -t 60 outoutfile.xxx

ffmpeg -i inputfile.xxx -threads 8 -t 60 outoutfile.xxx

And post back if ffmpeg did or did not use the extra cores. Thanks

Quote:

Originally Posted by TobiSGD (Post 5451648)
In fact, the OP is right, the current i7 desktop CPUs range from 4 cores/8 threads (socket LGA1151, for example i7 6700K) over 6 core/12 thread models (socket LGA2011, for example i7 5820K) up to 8 core/16 threads (LGA2011, for example i7 5960X). The next generation of high-end i7 CPUs (codename Skylake-E) will even have a 10 cores/20 threads model.

These are good keywords to look for when I do go shopping for an i7. As there are many chipsets and generation type CPUs out there. I'll probably go for the six or eight cores which I can afford. The 10 cores and higher will be too expensive.

Thanks TobiSGD

jefro 11-18-2015 07:01 PM

I have one of the better core i7's that simply rocks. The core i7 is pretty impressive. I'd suspect that ffmpeg can use all the cores but I have never tested it. I was using an old dual quad core xeon server for ripping and it was about 10 minutes on a dvd. I suspect most of that was the usb optical drive causing it to be slow. I do remember looking at top and they were all being used on the 8x.

Soon you can get a 74 core if you have the money.

TobiSGD 11-18-2015 07:09 PM

So, I looked at ffmpeg's documentation and found that if threading can be used is depending on which codec you intend to use. A short test showed that encoding in H.264 can be multi-threaded, while encoding using libxvid does not react to the thread option.

TuxLinux5 11-18-2015 08:05 PM

Quote:

Originally Posted by jefro (Post 5451763)
Soon you can get a 74 core if you have the money.

If I had the money I would love to buy a supercomputer with 33.86 petaflops. I could encode all my videos in a blink of an eye

:)

Sort of on topic, I though the raspberry PI 2 was the fastest single board computer. I discovered the odroid-xu4 which is smaller in size has 8 cores, 2GB RAM, 2 USB 3.0 ports, 1 USB 2.0 port and 1 Gigabit ethernet.

It's amazing how fast single board technology is getting. But I don't think the odroid-xu4 can match the same performance as an i7 w/8 cores.

berndbausch 11-18-2015 08:12 PM

Quote:

Originally Posted by TuxLinux5 (Post 5451795)
If I had the money I would love to buy a supercomputer with 33.86 petaflops. I could encode all my videos in a blink of an eye

:)

Sort of on topic, I though the raspberry PI 2 was the fastest single board computer. I discovered the odroid-xu4 which is smaller in size has 8 cores, 2GB RAM, 2 USB 3.0 ports, 1 USB 2.0 port and 1 Gigabit ethernet.

It's amazing how fast single board technology is getting. But I don't think the odroid-xu4 can match the same performance as an i7 w/8 cores.

(Getting more and more off-topic)
To put it in perspective, the entire Odroid costs a fraction of a core i7 CPU. It would be unfair to compare them.

TobiSGD 11-19-2015 04:36 AM

The odroid-xu4 features a Samsung Exynos 5 CPU, which has a big.little configuration (4 Cortex-A7 and 4 Cortex-A15 cores), so it is not really an 8-core CPU, since you can't use all 8 cores concurrently. Also, these CPUs are in a different class than desktop CPUs and can't compete performance-wise with Intel's CPUs (which is fine, as they have a different purpose).

TobiSGD 11-19-2015 05:18 AM

Quote:

Originally Posted by TobiSGD (Post 5451648)
The next generation of high-end i7 CPUs (codename Skylake-E) will even have a 10 cores/20 threads model.

Sorry, the correct codename is Broadwell-E, not Skylake-E.


All times are GMT -5. The time now is 08:52 PM.