Go Back   nV News Forums > Software Forums > Software Development

Newegg Daily Deals

Reply
 
Thread Tools
Old 08-02-07, 03:40 AM   #1
walterman
Rayne
 
walterman's Avatar
 
Join Date: Oct 2003
Posts: 1,525
Post 8800GTX + Direct3D8 + Visual C++ + XP = Random Performance Increase

I've been coding a lot lately in C++ & Direct3D8 (yes, i know it's old).

I use Fraps to measure the performance, each time that i change something in my D3D code.

Well, this week, i thought that i had found a faster code, cause, i was drawing more primitives, and i was having the same FPS.

The fact, is that the card was working faster, a 10% more.

I don't understand how happened, but, i was getting a 10% performance boost in all games. Global.

After a system restart, the performance is back to normal, but seems like after a long coding session, with a lot of tests, the same global performance increase is back.

Also, the memory usage, after the weird performance increase, is 600MB higher than usually, and after a long investigation with process explorer & another tools, i found that that memory was being used by the kernel, so, by a driver.

I was reading about that alt-tab performance increase today. I haven't that problem in my system, but, this new 'coding bug' is really weird.

I'll keep trying to find the key of this performance increase.

I'm using 158.27 for XP atm.
__________________
ASUS Rampage Formula X48 | Xeon 3350 @ 3.6 GHz (450x8/1.26v) | 4x1GB OCZ DDR2 PC2-6400 Reaper CL3 @ 900 MHz 3-4-4-15 | 1 x eVGA GTX 285 SSC | 1 x ASUS EN8800GTX (PhysX/CUDA -> Burnt by nVidia 196.75 driver) | X-Fi Titanium Fatal1ty PCIe | 1 x Intel X25-M G2 80GB | 2 x 750GB WD RE2 7500AYYS SATA2 16MB | Samsung SH-B083L SATA | Enermax Revolution 1250W | Samsung SyncMaster 275T 27" 1920x1200 | Thermaltake Black Armor | BloodRayne 2 FSAA Patch
walterman is offline   Reply With Quote
Old 10-05-07, 05:20 AM   #2
walterman
Rayne
 
walterman's Avatar
 
Join Date: Oct 2003
Posts: 1,525
Default Re: 8800GTX + Direct3D8 + Visual C++ + XP = Random Performance Increase

I'm with last Forceware 163.71 WHQL XP, and i still have that weird 'bug'.

After several hours coding, and a lot of errors in my applications, the system starts to use around 600MB of ram, and the 10% performance speedup appears.

I would like to know how to reproduce it, cause it's an 'interesting' bug.
__________________
ASUS Rampage Formula X48 | Xeon 3350 @ 3.6 GHz (450x8/1.26v) | 4x1GB OCZ DDR2 PC2-6400 Reaper CL3 @ 900 MHz 3-4-4-15 | 1 x eVGA GTX 285 SSC | 1 x ASUS EN8800GTX (PhysX/CUDA -> Burnt by nVidia 196.75 driver) | X-Fi Titanium Fatal1ty PCIe | 1 x Intel X25-M G2 80GB | 2 x 750GB WD RE2 7500AYYS SATA2 16MB | Samsung SH-B083L SATA | Enermax Revolution 1250W | Samsung SyncMaster 275T 27" 1920x1200 | Thermaltake Black Armor | BloodRayne 2 FSAA Patch
walterman is offline   Reply With Quote
Old 10-23-07, 08:07 AM   #3
walterman
Rayne
 
walterman's Avatar
 
Join Date: Oct 2003
Posts: 1,525
Post Re: 8800GTX + Direct3D8 + Visual C++ + XP = Random Performance Increase

I found something interesting.

After several tests, the non-local video memory usage, starts to grow, till 250MB.

I also see in task manager that my system is using 500MB of ram, while it uses usually 200-250MB.

There isn't any process using those extra 250MB, so, it must be memory used by the kernel or a driver.



When this happens, my framerate grows a 10% in all the games.

Why ? I dunno yet.
__________________
ASUS Rampage Formula X48 | Xeon 3350 @ 3.6 GHz (450x8/1.26v) | 4x1GB OCZ DDR2 PC2-6400 Reaper CL3 @ 900 MHz 3-4-4-15 | 1 x eVGA GTX 285 SSC | 1 x ASUS EN8800GTX (PhysX/CUDA -> Burnt by nVidia 196.75 driver) | X-Fi Titanium Fatal1ty PCIe | 1 x Intel X25-M G2 80GB | 2 x 750GB WD RE2 7500AYYS SATA2 16MB | Samsung SH-B083L SATA | Enermax Revolution 1250W | Samsung SyncMaster 275T 27" 1920x1200 | Thermaltake Black Armor | BloodRayne 2 FSAA Patch
walterman is offline   Reply With Quote
Old 10-25-07, 03:22 PM   #4
Absolution
AbsoUI
 
Absolution's Avatar
 
Join Date: Dec 2004
Posts: 933
Default Re: 8800GTX + Direct3D8 + Visual C++ + XP = Random Performance Increase

Send a driver bug form to nVidia. Send the source code along with it. Its your best bet, check to see if it performs the same as other cards (preferably different series, ex 6,7,8, along with ATI cards).

The problem is impossible to diagnose without the program.
Absolution is offline   Reply With Quote
Old 10-30-07, 06:27 PM   #5
walterman
Rayne
 
walterman's Avatar
 
Join Date: Oct 2003
Posts: 1,525
Lightbulb Re: 8800GTX + Direct3D8 + Visual C++ + XP = Random Performance Increase

I found one way to reproduce the 'bug'.

I load my fav game, BloodRayne2, with my patch for FSAA (my vc++ project).

I start a new game, and i start to do 'alt-tab', between the game & desktop.

Each time, that i do alt-tab, there's an increase in the non-local videomemory usage of 6-7MB.

When, i reach 240-250MB (after 30-40 alt-tabs), there's a nice boost in the fps, from 90 to 100 fps (+-10%)

Just check my graph:



Why ?

I've no idea, but it's a interesting bug.

I tried without my patch, with just the retail game, and same result.

If you do this process 2 times, the 2nd time, the system doesn't free the non-local video memory usage, and the boost is permanent, and the funny is that it works for all the games.

If somebody knows how to report a bug to nVidia, this is one that they really should investigate. A 10% increase in performance for free.
__________________
ASUS Rampage Formula X48 | Xeon 3350 @ 3.6 GHz (450x8/1.26v) | 4x1GB OCZ DDR2 PC2-6400 Reaper CL3 @ 900 MHz 3-4-4-15 | 1 x eVGA GTX 285 SSC | 1 x ASUS EN8800GTX (PhysX/CUDA -> Burnt by nVidia 196.75 driver) | X-Fi Titanium Fatal1ty PCIe | 1 x Intel X25-M G2 80GB | 2 x 750GB WD RE2 7500AYYS SATA2 16MB | Samsung SH-B083L SATA | Enermax Revolution 1250W | Samsung SyncMaster 275T 27" 1920x1200 | Thermaltake Black Armor | BloodRayne 2 FSAA Patch
walterman is offline   Reply With Quote
Old 10-31-07, 11:29 AM   #6
walterman
Rayne
 
walterman's Avatar
 
Join Date: Oct 2003
Posts: 1,525
Lightbulb Re: 8800GTX + Direct3D8 + Visual C++ + XP = Random Performance Increase

I solved it.

This is something really interesting.

It seems like the nVidia driver has some sort of problem with BR2. When you do alt-tab, the non-shared video memory use is increased in 7MB.

When you reach 250MB +-, with my 768MB GTX, the non-shared video memory stops growing (1 GB total ?).

This non-shared video memory, is like the old AGP memory, a block of system ram, that the gfx card can use too, to store buffers.

It seems like when this part of the ram is filled, the direct3d memory manager, puts all the buffers in the local video memory of your gfx card, which is much faster.

I changed the memory zone in which i create the vertex buffers in my application, from D3DUSAGE_DYNAMIC|D3DUSAGE_WRITEONLY to D3DUSAGE_WRITEONLY, and now the vertex buffers are created in the local video memory of the card, and they are processed a 10% faster now.

The funny, is that this 'bug' affected other games, for the same reason. This bug was forcing all the buffers to be created on the local video memory of the card, and that's why i was getting this global 10% boost.
__________________
ASUS Rampage Formula X48 | Xeon 3350 @ 3.6 GHz (450x8/1.26v) | 4x1GB OCZ DDR2 PC2-6400 Reaper CL3 @ 900 MHz 3-4-4-15 | 1 x eVGA GTX 285 SSC | 1 x ASUS EN8800GTX (PhysX/CUDA -> Burnt by nVidia 196.75 driver) | X-Fi Titanium Fatal1ty PCIe | 1 x Intel X25-M G2 80GB | 2 x 750GB WD RE2 7500AYYS SATA2 16MB | Samsung SH-B083L SATA | Enermax Revolution 1250W | Samsung SyncMaster 275T 27" 1920x1200 | Thermaltake Black Armor | BloodRayne 2 FSAA Patch
walterman is offline   Reply With Quote
Old 08-07-09, 07:22 PM   #7
Gooseone
Registered User
 
Join Date: Aug 2009
Posts: 1
Default Re: 8800GTX + Direct3D8 + Visual C++ + XP = Random Performance Increase

Hi Walterman

Your discovery is fantastic. I am running MS FSX and I get decent performance, but it still stutters a bit. Anywhere from 15% to 40% of my video memory is non-local (as displayed by Riva Tuner), which I believe causes the stuttering. I am trying to locate the file which contains the D3DUSAGE_DYNAMIC entry so I can change it to D3DUSAGE_WRITEONLY, and experiment with it. Can you help me to locate it? Smooth gaming.

Gooseone

P.S. I discovered a very simple way (just few mouse clicks on the task manager) to run any game on ALL cores of any multicore processor be it two or four. Disregard what they say that most games are single-threaded. You can run them on ALL threads, distributing the load approximately evenly on all cores. You might already know how to do it, if not I will let you know.

Last edited by Gooseone; 08-07-09 at 07:42 PM. Reason: just want to add some more
Gooseone is offline   Reply With Quote
Old 08-10-09, 07:34 AM   #8
walterman
Rayne
 
walterman's Avatar
 
Join Date: Oct 2003
Posts: 1,525
Post Re: 8800GTX + Direct3D8 + Visual C++ + XP = Random Performance Increase

Well,

I fixed the problem from my application, changing some parameters in this D3D8 function call:

::CreateVertexBuffer(UINT Length, DWORD Usage, DWORD FVF, D3DPOOL Pool, IDirect3DVertexBuffer8** ppVertexBuffer)

I did 'Usage = D3DUSAGE_WRITEONLY' instead of 'Usage = D3DUSAGE_WRITEONLY | D3DUSAGE_DYNAMIC'.

About FSX, i dunno if it has any option to change the way in which the application creates the buffers. But, yes, prolly all those stuttering problems share the same root. Anyway, i thought that nVidia fixed this problem, because i discovered it a couple of years ago.

About your discovery, well, send me more details to try it.
__________________
ASUS Rampage Formula X48 | Xeon 3350 @ 3.6 GHz (450x8/1.26v) | 4x1GB OCZ DDR2 PC2-6400 Reaper CL3 @ 900 MHz 3-4-4-15 | 1 x eVGA GTX 285 SSC | 1 x ASUS EN8800GTX (PhysX/CUDA -> Burnt by nVidia 196.75 driver) | X-Fi Titanium Fatal1ty PCIe | 1 x Intel X25-M G2 80GB | 2 x 750GB WD RE2 7500AYYS SATA2 16MB | Samsung SH-B083L SATA | Enermax Revolution 1250W | Samsung SyncMaster 275T 27" 1920x1200 | Thermaltake Black Armor | BloodRayne 2 FSAA Patch
walterman is offline   Reply With Quote

Old 09-16-09, 07:13 PM   #9
Feyy
Registered User
 
Feyy's Avatar
 
Join Date: Jan 2007
Location: Ireland
Posts: 1,160
Default Re: 8800GTX + Direct3D8 + Visual C++ + XP = Random Performance Increase

Quote:
Originally Posted by Gooseone View Post
P.S. I discovered a very simple way (just few mouse clicks on the task manager) to run any game on ALL cores of any multicore processor be it two or four. Disregard what they say that most games are single-threaded. You can run them on ALL threads, distributing the load approximately evenly on all cores. You might already know how to do it, if not I will let you know.
Anymore news on this?
__________________
________________________________
| CPU: Intel Q6600 B3 @ 3Ghz
| Cooler: Zalman CNPS9700 LED
| Mobo: Intel D975XBX2
| GFX: Inno 3D 8800 GTS 640MB
| PhysX: EVGA 8400 GS 256MB
| Memory: 2x1GB OCZ Platinum Rev2 PC6400
| PSU: OCZ StealthXtreme 600W PSU
| Monitor: Acer G24
| HDD: 320GB Seagate Barracuda
| Case: NZXT Lexa Blackline [Blue]
| Mouse: Steelseries Xai
| Mouse mat: Steelseries 4HD
________________________________
Feyy is offline   Reply With Quote
Old 12-26-09, 07:58 AM   #10
tekkuy
Registered User
 
Join Date: Dec 2009
Location: Bolivia
Posts: 1
Default Re: 8800GTX + Direct3D8 + Visual C++ + XP = Random Performance Increase

Quote:
Originally Posted by Gooseone View Post
P.S. I discovered a very simple way (just few mouse clicks on the task manager) to run any game on ALL cores of any multicore processor be it two or four. Disregard what they say that most games are single-threaded. You can run them on ALL threads, distributing the load approximately evenly on all cores. You might already know how to do it, if not I will let you know.
Please can you give more details in a following post? I'm also interested in this performance boost, thanks. If you do, I'll be this happy...
tekkuy is offline   Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


Similar Threads
Thread Thread Starter Forum Replies Last Post
My UT2003 Tweak Guide DXnfiniteFX Gaming Central 48 10-31-02 12:59 AM
Performance Increase? Skell CPUs, Motherboards And Memory 14 08-21-02 06:16 AM
The promised anisotropic performance increase is here! DIMA NVIDIA GeForce 7, 8, And 9 Series 13 08-09-02 01:49 PM
Is this good enough performance increase.... demonized Benchmarking And Overclocking 10 08-07-02 08:34 AM
Will AGP 8X increase performance over AGP 4X? sancheuz NVIDIA GeForce 7, 8, And 9 Series 10 07-29-02 09:37 PM

All times are GMT -5. The time now is 03:57 AM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright 1998 - 2014, nV News.