Multithreaded Drivers

Gamingphreek

Lifer
Mar 31, 2003
11,679
0
81
I really dont understand this but how does multithreaded device drivers get you 20fps gains? I just dont understand it... you would think a performance gain like that might be attributed to multithreading a game, but drivers??

Can someone explain this concept to me?

-Kevin
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Where did you see that?

I'm no driver developer, but most drivers should be limited more by the speed of the hardware than anything else. If your drivers see an appreciable speed increase by seperating the work into multiple threads it probably means you're doing too much work in the drivers. I know the nVidia drivers do a lot of stuff in their drivers, so I wouldn't find it too far fetched that they increased performance by fixing their drivers although 20fps seems high to me.
 

xtknight

Elite Member
Oct 15, 2004
12,974
0
71
I don't know the exact ins and outs of it so I may be biting off more than I can chew, but here's what I think:

A single CPU is busy doing the following things while in a game:
[*]Sending commands to the graphics card
[*]Calculating AI (single player)
[*]Calculating physics
[*]Calculating general gameplay (not very intensive)

So with all the other stuff on the CPU, the graphics card command sender is being squished like 8 people in the back seat of a car. Obviously we can't just not process the physics, so they all get their share of time. So that would make the graphics command processor use about 25% of the CPU time or so. Well in the games that do get increases, that part of the processing is bottlenecked. Keep in mind the second CPU is not in use at ALL in this point (for 99% of the single-threaded games). So with the multithreaded driver, it can get its 25% share on the first CPU plus another 100% on the second CPU. So it's not bottlenecked anymore...

It's hard to say because I don't know how intensive sending graphics commands is, but the results seem to support it, unless the increases are coming from something else new in the driver which is likely too. Remember that thread about NVIDIA holding back 10% performance? It could be that too. Increases will vary greatly per game though.
 

Gamingphreek

Lifer
Mar 31, 2003
11,679
0
81
Oh. Well it just seems that some of the driver apps that consume cycles should be minimal at most.

Just out of pure curiosity, how hard is it to multithread code. I have programmed a little in C++ and am learning Java right now. Does multithreading add a lot of lines of code or is it simply a command at the beginning.

-Kevin
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
You have to synchronize all shared data access, it's generally very error prone and hard to debug.
 

xtknight

Elite Member
Oct 15, 2004
12,974
0
71
It's a lot more than a line at the beginning. The whole program has to be modified to parallelize it.
 
Oct 19, 2000
17,860
4
81
Originally posted by: Gamingphreek
I really dont understand this but how does multithreaded device drivers get you 20fps gains? I just dont understand it...
There is a lot better discussion on this in the Video and CPU forums, but here's what I've gotten out of it. With what nVidia is doing with their drivers is basically taking the vertex processsing load off of the GPU and puts it onto the second CPU core that is basically doing nothing while you're gaming. With the second core doing the job just fine, this allows your GPU to do other things faster, without being loaded down with so much.

This only is worthwhile, however, if you are GPU limited in games. If it's your CPU that's holding you down in framerates, then this will do nothing for you (which hopefully at the moment is not the case).
 

Gamingphreek

Lifer
Mar 31, 2003
11,679
0
81
Well i guess that kills multi-tasking while gaming then doesn't it? If you are using the second core for vertex processing, then there is no core left of multi-tasked apps. I guess (Not sure if it does) it would be nice if it turned off with more than 2 apps open or something.

-Kevin
 

xtknight

Elite Member
Oct 15, 2004
12,974
0
71
Originally posted by: Gamingphreek
Well i guess that kills multi-tasking while gaming then doesn't it? If you are using the second core for vertex processing, then there is no core left of multi-tasked apps. I guess (Not sure if it does) it would be nice if it turned off with more than 2 apps open or something.

-Kevin

Yup. I doubt NVIDIA will add any detection for second core usage. Back to competition for cores and relying on the efficiency of the OS's scheduler.