Neat Video community Forum Index
www.neatvideo.com
Neat Video community
support - help - questions and answers - sharing experience and opinions - feedback - suggestions - backup contact
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

I got new computer with 8 cores

 
Post new topic   Reply to topic    Neat Video community Forum Index -> General questions
View previous topic :: View next topic  
Author Message
Lugarimo



Joined: 09 Feb 2009
Posts: 106

PostPosted: Tue Dec 11, 2012 4:55 pm    Post subject: I got new computer with 8 cores Reply with quote

I did performance optimize thing and its faster when it use 6 cores than 8. Why?
Back to top
View user's profile Send private message
NVTeam



Joined: 01 Sep 2005
Posts: 2238

PostPosted: Tue Dec 11, 2012 7:40 pm    Post subject: Reply with quote

Having more cars on the road does not always lead to higher throughput. Instead, that often leads to traffic jams..

The "road" of your computer is good for six "cars". Eight will do too, but they will not have enough space to go without waiting.

Vlad
_________________
Neat Video team
noise reduction for video and photos
Back to top
View user's profile Send private message Visit poster's website
Lugarimo



Joined: 09 Feb 2009
Posts: 106

PostPosted: Tue Dec 11, 2012 8:43 pm    Post subject: Reply with quote

But why jams? You maybe cache 80 frames and have each core denoise 10, 13 with 6, so where does jams come from?
Back to top
View user's profile Send private message
NVTeam



Joined: 01 Sep 2005
Posts: 2238

PostPosted: Tue Dec 11, 2012 8:52 pm    Post subject: Reply with quote

Getting many frames is exactly what causes jams because memory bandwidth is a bottleneck. With a faster memory, 8 cores could be faster than 6.

Vlad
_________________
Neat Video team
noise reduction for video and photos
Back to top
View user's profile Send private message Visit poster's website
Lugarimo



Joined: 09 Feb 2009
Posts: 106

PostPosted: Tue Dec 11, 2012 10:24 pm    Post subject: Reply with quote

But this happens with very small 160p videos too. Are you sure its a memory problem?
Back to top
View user's profile Send private message
NVTeam



Joined: 01 Sep 2005
Posts: 2238

PostPosted: Tue Dec 11, 2012 10:37 pm    Post subject: Reply with quote

I think so. If you have any alternative ideas please let me know.

Vlad
_________________
Neat Video team
noise reduction for video and photos
Back to top
View user's profile Send private message Visit poster's website
jpsdr



Joined: 11 Aug 2008
Posts: 193

PostPosted: Wed Dec 12, 2012 9:03 am    Post subject: Reply with quote

I have a better way to explain how and why parallel/multi-core can increase speed, at least in the beginning, but, in some cases, after will have no effect.

You want to remove the tires of a car.
Having 2 peoples instead of one, will increase speed. Even better if each has his own set of tools, instead of only one set they pass to each other (this can represent some bandwidth bottleneck). You can increase speed having 4 peoples with their own set of tools, each one on each wheel. But... adding a 5th or more will not help at all, and can even finaly lead to mess (too much people in the kitchen when cooking will cause more harm than good).
So, while dealing with cars, best is 4. The day you'll deal with 8 wheels trucks, you'll be able to use up to 8 peoples.

I think algorithm/programs follow somehow this same kind of rules.
It's linked to several things : How algorithm works, how multi-threading is implemented, etc, etc, etc...
Back to top
View user's profile Send private message
NVTeam



Joined: 01 Sep 2005
Posts: 2238

PostPosted: Wed Dec 12, 2012 11:03 am    Post subject: Reply with quote

Multi-threading is fine, there is no problem there. The problem is that CPU can process data faster than the memory can serve it to the CPU. The CPU doesn't receive the data fast enough, because of the limited bandwidth of the memory system. If you install faster memory modules then you will see how the optimum number of cores increases.

Vlad
_________________
Neat Video team
noise reduction for video and photos
Back to top
View user's profile Send private message Visit poster's website
Lugarimo



Joined: 09 Feb 2009
Posts: 106

PostPosted: Wed Dec 12, 2012 1:46 pm    Post subject: Reply with quote

jpsdr that doesn't explain me because a car has only 4 tires but a video has 100,000 frames or more so theres lots of opportunity for more cores.

NVTeam, I have 4GB memory but since I have XP its only 3. With 240x160 video it would be 115KB per frame and 2.7MB per second. With 6 cores it processes this at 55 fps and 52 with 8. So youre saying my memory can only process 6 MB per sec? Thats pretty low. Benchmarks said it goes 6 GB per sec.
Back to top
View user's profile Send private message
NVTeam



Joined: 01 Sep 2005
Posts: 2238

PostPosted: Wed Dec 12, 2012 2:23 pm    Post subject: Reply with quote

Your calculations take into account only the size of one input frame read (once) from the memory per one output frame produced (which btw needs to be saved too). There are much more data used (read and written) to process that one input frame and all that data require space and bandwidth.

Vlad
_________________
Neat Video team
noise reduction for video and photos
Back to top
View user's profile Send private message Visit poster's website
Lugarimo



Joined: 09 Feb 2009
Posts: 106

PostPosted: Wed Dec 12, 2012 8:35 pm    Post subject: Reply with quote

Ok but it's true that lower the frame size the less memory need be used, right? If so why did I get this on testing a 64x64 frame:

CPU only (1 core): 500 frames/sec
CPU only (2 cores): 76.9 frames/sec
CPU only (3 cores): 62.5 frames/sec
CPU only (4 cores): 62.5 frames/sec
CPU only (5 cores): 66.7 frames/sec
CPU only (6 cores): 62.5 frames/sec
CPU only (7 cores): 62.5 frames/sec
CPU only (8 cores): 58.8 frames/sec
Back to top
View user's profile Send private message
NVTeam



Joined: 01 Sep 2005
Posts: 2238

PostPosted: Wed Dec 12, 2012 9:23 pm    Post subject: Reply with quote

Measurements become less accurate with smaller frames, more organizational overhead, etc.

Do you have a better theory than the bandwidth limitation one?

Vlad
_________________
Neat Video team
noise reduction for video and photos
Back to top
View user's profile Send private message Visit poster's website
jpsdr



Joined: 11 Aug 2008
Posts: 193

PostPosted: Thu Dec 13, 2012 12:35 pm    Post subject: Reply with quote

You clearly don't see my point. First, it was a generic way/example to explain why sometimes more cores may not always means more speed.
And why do you think NV process one frame by core ?
I don't know how NV is programmed, but most often, when you multi-thread, it's the algorithm you split (several cores working on small parts of pictures), instead of one core by frames. At least, it's what's often done in image processing algorithm. One of the interest of doing this, is to reduce cache misses.
Compared to my example : 1 frame = 1 car.
Most often, you make several people working on the same car, they may need "less" resources (one big set of tools will be enough for everyone), and according what they are doing, there is a limit in efficiency of parallelism.
Now, you can have only one person working on a car, but having several cars on the same times. You understand you'll need more resources (more space to stores the cars (more memory), and more toolboxes).
This is why i think (but it's only personal point of view) : Trying to do 1 core=1 frame is the worst thing to do.

But very small frame size show an interesting thing : The difference between 1 and 2+, from my point of view, clearly show a difference in cache use. Maybe with 1 core, everything stay in level2 cache (maybe even level1), with 2+, one level of cache is dropping. It's the only explanation i can think of (but it doesn't mean it's the accurate one).

All of this to say : More cores will not always means more speed even on a multi-threaded program. There's a lot of reasons which can explain that, this is what i've tried to explain with my examples.
Back to top
View user's profile Send private message
NVTeam



Joined: 01 Sep 2005
Posts: 2238

PostPosted: Thu Dec 13, 2012 1:22 pm    Post subject: Reply with quote

> And why do you think NV process one frame by core ?
I don't, it doesn't.

> very small frame size show an interesting thing
Assuming the speed measurements are accurate. However they are not. For very small frames, the measurement become much less accurate, so we cannot make any conclusions based on those figures.
To explain why 6 cores may be faster than 8 you really need to measure with normal frames, at least SD, better HD. The larger the frame, the more accurate are those speed figures.

Taking your analogy: "one big set of tools will be enough for everyone" but it may not be enough for all of them at once, should they need to do the same operation on different wheels simultaneously. Another aspect is that those persons need some place for work too. If there are too many of them around one car, they will hinder each other. And each of them may not even have a free wheel to work on.

> More cores will not always means more speed even on a multi-threaded program.
Agreed. Possible reasons of that are many. One of them, significant for large frames, is the limited memory bandwidth. Modern multi-core CPUs can process data faster than the memory system can deliver that data to the CPU.
Cache size is important too. If fewer cores do the work then they can use larger portions of the shared cache memory, which speeds up memory operations for those active cores. But fewer cores also means lower overall computing speed. These two tendencies compete with each other and as a result the highest speed is achieved somewhere in the middle. Generally faster memory can change the optimum. Larger cache size of the CPU can change it too. Which is why it is important to use a fast RAM and a high-end CPU with large cache memory.

Vlad
_________________
Neat Video team
noise reduction for video and photos
Back to top
View user's profile Send private message Visit poster's website
jpsdr



Joined: 11 Aug 2008
Posts: 193

PostPosted: Thu Dec 13, 2012 6:37 pm    Post subject: Reply with quote

NVTeam wrote:
> And why do you think NV process one frame by core ?
I don't, it doesn't.


I was responding to Lugarimo for this specific point...
I have no doubt you know how NV works... Wink

I must said, for now, the best multi-threaded program i've ever seen is x264. When i've upgraded from an i7@960 to i7@980, i've increased my speed even a little more than the theorical ratio 6x3.33/4x3.2.
The only thing i can think of is the increase of level3 cache (8M->12M).
I've been bluffed on this one ! Shocked
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Neat Video community Forum Index -> General questions All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group