Performance Counter monitoring plugin

Discussion in 'Rivatuner Statistics Server (RTSS) Forum' started by stangowner, Sep 14, 2009.

  1. stangowner

    stangowner Guest

    Messages:
    607
    Likes Received:
    11
    GPU:
    2xMSI N550GTX-Ti Cy II OC
    @tswalker

    I'm working on the logging capabilities. Give me a few to get a new build for you so we can try to track it down.

    One stupid question, but you do have the .cfg file in the Monitoring directory with the .dll, right?

    @burebista

    Thx for posting. On a side note, I've been working on a plugin for the NVPerfCount for a few days now....and I am having a 32/64 bit issue I need to sort. Once I do so I'll post a beta.
     
  2. tswalker

    tswalker Member

    Messages:
    14
    Likes Received:
    0
    GPU:
    XFX 8600 GTS
    hi, yes C:\Program Files (x86)\RivaTuner v2.24c\PlugIns\Monitoring
     
  3. tswalker

    tswalker Member

    Messages:
    14
    Likes Received:
    0
    GPU:
    XFX 8600 GTS
    here's some event details i've been seeing:

    Log Name: Application
    Source: SideBySide
    Date: 10/20/2009 2:31:56 PM
    Event ID: 33
    Task Category: None
    Level: Error
    Keywords: Classic
    User: N/A
    Computer: PC
    Description:
    Activation context generation failed for "C:\Program Files (x86)\RivaTuner v2.24c\PlugIns\Monitoring\PerfCount.dll". Dependent Assembly Microsoft.VC90.MFC,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.21022.8" could not be found. Please use sxstrace.exe for detailed diagnosis.
    Event Xml:
    <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
    <System>
    <Provider Name="SideBySide" />
    <EventID Qualifiers="49409">33</EventID>
    <Level>2</Level>
    <Task>0</Task>
    <Keywords>0x80000000000000</Keywords>
    <TimeCreated SystemTime="2009-10-20T19:31:56.000000000Z" />
    <EventRecordID>937</EventRecordID>
    <Channel>Application</Channel>
    <Computer>PC</Computer>
    <Security />
    </System>
    <EventData>
    <Data>Microsoft.VC90.MFC,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.21022.8"</Data>
    <Data>
    </Data>
    <Data>
    </Data>
    <Data>
    </Data>
    <Data>
    </Data>
    <Data>
    </Data>
    <Data>
    </Data>
    <Data>
    </Data>
    <Data>
    </Data>
    <Data>
    </Data>
    <Data>C:\Program Files (x86)\RivaTuner v2.24c\PlugIns\Monitoring\PerfCount.dll</Data>
    <Data>
    </Data>
    <Data>
    </Data>
    <Data>
    </Data>
    <Data>
    </Data>
    <Data>
    </Data>
    <Data>
    </Data>
    <Data>
    </Data>
    <Data>
    </Data>
    <Data>
    </Data>
    </EventData>
    </Event>
     
  4. tswalker

    tswalker Member

    Messages:
    14
    Likes Received:
    0
    GPU:
    XFX 8600 GTS
    DOH!

    i'm feeling kinda dumb now :)

    i installed only the VC++ x64 not the x86.. i have now installed both and look.. magic!

    [​IMG]
     

  5. stangowner

    stangowner Guest

    Messages:
    607
    Likes Received:
    11
    GPU:
    2xMSI N550GTX-Ti Cy II OC
    Great. Yeah, I linked the x86 version, but perhaps I should have been more explicit on the dependancy.

    But are you saying that PerfCounterCLI.exe was working without it? I would have expected PerfCounterCLI.exe to have echoed the SideBySide de error to the console.....and we would have known the issue right away.

    As I mentioned, I'll work on trying to get rid of that dependancy for the next version. Thanks for finding the issue!!!
     
  6. tswalker

    tswalker Member

    Messages:
    14
    Likes Received:
    0
    GPU:
    XFX 8600 GTS
    yes, before i installed the x86 distro i was able to use perfcountercli.exe to see the counters.. i was also able to use it a the command line without any issues.. very strange i know... that is why i was getting so confused. it seems like only when i needed to load the plugin in rivatuner was i experiencing any issues (like what you see in the event log).


    this is working like a charm now.. thanks for the support! I'm looking forward to seeing more developments :)
     
    Last edited: Oct 21, 2009
  7. burebista

    burebista Ancient Guru

    Messages:
    1,740
    Likes Received:
    36
    GPU:
    MSI GTX1060GAMING X
    Take your time, I have infinite patience. :)
    Thanks for your work. :thumbup:
     
  8. Tux Brothers

    Tux Brothers New Member

    Messages:
    3
    Likes Received:
    0
    GPU:
    Geforce GTX 285 OC
    Thanks for the wonderfull plugin !! :)

    I use windows 7 x64 and i had problems to get it all working.
    First i installed (just like TsWalker) the C++ 64 bit ;)
    Im from Holland so i use a Dutch version of windows, the PerfCounterCLI.exe commands have to be in Dutch, oherwise its not working at all, just FYI.

    The plugin is really great, thanks again :)
     
  9. stangowner

    stangowner Guest

    Messages:
    607
    Likes Received:
    11
    GPU:
    2xMSI N550GTX-Ti Cy II OC
    Thanks for mentioning that. So are you saying that the arguments like "\LogicalDisk(_Total)\Avg. Disk Bytes/Transfer" need to be in the native language? If you run PerfCounterCLI.exe without arguments, does it display natively in the dialog, and print/query the source properly in the console? So all that is really needed is to have a translated PerfCount.cfg file so the plugin will work properly?

    Do you mind sharing your final config with me? And are you still using the default 4 couters I included in the download? I am more then willing to host a downloadable config file for various languages if you guys are willing to translate and provide those for me.
     
  10. stangowner

    stangowner Guest

    Messages:
    607
    Likes Received:
    11
    GPU:
    2xMSI N550GTX-Ti Cy II OC
    Its still a little early, and I don't have all the answers, but we're making progress. Here's an update of where I am.

    A plugin for 32 bit systems should be along shortly. 64 bit systems will have to wait a little longer as I need to write a middle man (IPC) so the 64 bit NVIDIA SDK can communicate with 32 bit RivaTuner.

    This test was performed on a Windows 7 RTM 32 bit system with a single GTX280. In this test, I ran all the 3DMark Vantage tests leaving the default settings except for the resolution, which I changed to 1680x1050 to match the native resolution of my LCD. I am polling 6 counters (gpu_busy, rop_busy, shader_busy, geom_busy, texture_busy, stream_out_busy) out of 73 counters available (weird - I'm getting 90 counters in Win7 32, but 385 in Win7 x64).

    [​IMG]

    First, lets get the CPU tests out of the way. They are designed to stress your CPU, and do just that. These are the only 2 tests where the GPU Usage was not pinned at 100%. If you see this result while gaming - don't bother upgrading your GPU until you do the CPU and related subsystem.

    OK, the rest of the tests all had the GPU pinned at 100%. You can see that most of them are very heavy on the shader and texture. This is representative of most games, so these should be fairly good benchmarks for real life results.

    What's interesting is the feature tests. Here is a brief description of what the tests are supposed to concentrate on stressing.
    1 - texture fill rate
    2 - color fill rate
    3 - ray tracing in pixel shader
    4 - physical simulation
    5 - physics particle collision
    6 - GPU computing power
    You can see that #2 did not use textures and did not pin the shader, but hit the ROP hard. And #4&5 used a combination of the shader and stream out in order to max out the GPU.

    If we analyze some of these numbers for our specific application (instead of a benchmark), it may shed some light on what we can do to maximize performance.

    The majority of us will probably hit the shader hard. And fortunately, RivaTuner gives us the ability to OC that separately. So if dropping the memory and ROP overclock allows us to remain stable while pushing the shader higher, perhaps there is something to be gained. I'm just speculating at this point - I have not tried it yet (but I will eventually).

    So now we know we are intersted in the shader, we can take a look at some of the other counters like vertex_shader_busy, geometry_shader_busy, pixel_shader_busy, etc. Perhaps some of these may narrow down the bottleneck. Then we can tweak our game settings to eleviate that, thereby improving FPS. For instance, maybe we turned up the terrain, weather and player details to max, full shadows, draw distance, etc. If we know where the problem is we can address those particular settings while maintaining other features at a high level - without haing to play the hunt & peck game.

    But if your specific application is not hitting the shader, then OCing it may not be helping you. Some of the data gained from these counters, in addition to the others that are available, may help you decide what video card you will upgrade to. Some cards may better handle your particular application - and you'll know exactly what to look for in a card.

    I have tested a few other things as well on an 8800GTS. I'm getting some video memory usage numbers, etc. I need to make a change to the plugin to see if I can get them on the GTX280. So I'll test that once I make the change to the plugin.

    I have not even run the plugin while gaming yet....so I'm not sure what I can learn and if it can provide guidance for improvement. There are still a lot of counters I need to look at and figure out how to interpret. But if you're a computer geek like me, then if nothing else, you'll have fun playing with it :)

    - Nick
     

  11. burebista

    burebista Ancient Guru

    Messages:
    1,740
    Likes Received:
    36
    GPU:
    MSI GTX1060GAMING X
    Man all I can say is [​IMG]
     
  12. Unwinder

    Unwinder Ancient Guru Staff Member

    Messages:
    17,123
    Likes Received:
    6,688
    Well done, Nick!
     
  13. stangowner

    stangowner Guest

    Messages:
    607
    Likes Received:
    11
    GPU:
    2xMSI N550GTX-Ti Cy II OC
    Here is an updated build of NVPerfCountCLI (v0.9.1). It includes both a 32 and 64 bit version. It still requires the VC++ 2008 redistribuatable.

    Running the program with no arguments now properly displays the counter description, and now includes the expected counter type (raw or percentage).

    Code:
    c:\Users\Nick\Desktop>NVPerfCountCLI64.exe
    NVPerfAPI initialization successful
    Number of available counters: 90
    No argument provided - querying all available counters
    
    Counter 0: OGL frame time
    Description: OGL time from Swap to Swap, all inclusive
    Type: Raw
    
    Counter 1: OGL driver time waiting
    Description: OGL time spent in driver code, waiting on anything
    Type: Raw
    
    .....
    
    Counter 89: GPU Bottleneck
    Description: Index for GPU bottleneck
    Type: Raw
    
    The program no longer takes the counter name as a parameter. It now uses the counter number.

    Code:
    c:\Users\Nick\Desktop>NVPerfCountCLI64.exe 58
    NVPerfAPI initialization successful
    Number of available counters: 90
    Counter provided via argument: 58
    Successfully added counter: 58
    
    Counter 58: gpu_idle
    Description: Time the graphics portion of the chip is idle.
    Type: Percent
    
    Press any key to stop collection
    
    Percent: 2.730707
    Percent: 85.056114
    Percent: 87.572052
    Percent: 86.352325
    
    There is a new argument "sample". This will cycle through all available counters and query each one 5 times.

    Code:
    c:\Users\Nick\Desktop>NVPerfCountCLI64.exe sample
    size 46
    NVPerfAPI initialization successful
    Number of available counters: 90
    Counter provided via argument: sample
    
    Sampling all available counters
    Press Ctrl+C to cancel
    
    Counter 0: OGL frame time
    Description: OGL time from Swap to Swap, all inclusive
    Type: Raw
    Value: 0  Cycle: 100
    Value: 0  Cycle: 100
    Value: 0  Cycle: 100
    Value: 0  Cycle: 100
    Value: 0  Cycle: 100
    
    Counter 1: OGL driver time waiting
    Description: OGL time spent in driver code, waiting on anything
    Type: Raw
    Value: 0  Cycle: 100
    Value: 0  Cycle: 100
    Value: 0  Cycle: 100
    Value: 0  Cycle: 100
    Value: 0  Cycle: 100
    
    .....
    
    Counter 89: GPU Bottleneck
    Description: Index for GPU bottleneck
    Type: Raw
    Value: 0  Cycle: 0
    Value: 0  Cycle: 0
    Value: 0  Cycle: 0
    Value: 0  Cycle: 0
    Value: 0  Cycle: 0
    
    Please try it and let me know your results.

    - Nick
     
  14. burebista

    burebista Ancient Guru

    Messages:
    1,740
    Likes Received:
    36
    GPU:
    MSI GTX1060GAMING X
    Seven x64 RTM reinstalled two days ago. :D
    NVPerfCountCLI without parameters works.
    NVPerfCountCLI with sample as parameter works. LE: Nope, spoke too soon, same error.

    [​IMG]

    NVPerfCountCLI with counter number as parameter sometimes works sometimes not.

    [​IMG]

    P.S. I've renamed it to nv64.exe for easy launch from cmd window.
     
    Last edited: Oct 30, 2009
  15. stangowner

    stangowner Guest

    Messages:
    607
    Likes Received:
    11
    GPU:
    2xMSI N550GTX-Ti Cy II OC
    Wow. One step backwards I guess.

    I had to change the selector from the counter name to the counter ID so I can query some counters that would not work before (vidmem usage, etc - these work on my GTX280 now BTW). I tested it on both Win7 32 and Win7 64 before posting.

    Do you notice any type of pattern? You show counters 31 and 61 as failing. Is it just those so far and is it repeatable? Or do those occasionaly work fine as well? Also, is anything in the Windows Event Log?

    I'm at work now and don't have the source here. But I'll take a closer look tonight.
     

  16. burebista

    burebista Ancient Guru

    Messages:
    1,740
    Likes Received:
    36
    GPU:
    MSI GTX1060GAMING X
    Man, I'll try a reboot. I just installed Visual C++ redistributable and nvidia PerfKit 6.5 without reboot.
    In Event log I have this

    [​IMG]

    I'm not sure if it's your fault, maybe is something with my rig. To be honest it looks stable but who knows? :D

    No pattern, sometimes works for a counter sometime not. And for 61 for example it never works. For 59 just once.
     
    Last edited: Oct 30, 2009
  17. stangowner

    stangowner Guest

    Messages:
    607
    Likes Received:
    11
    GPU:
    2xMSI N550GTX-Ti Cy II OC
    Yes, that event would indicate it is the Nvidia API.....or me not calling it properly.

    Did you install the Vista 64 SDK? Or the 32 bit apps on Vista 64 SDK?
     
    Last edited: Oct 30, 2009
  18. burebista

    burebista Ancient Guru

    Messages:
    1,740
    Likes Received:
    36
    GPU:
    MSI GTX1060GAMING X
    I've installed this and this (x64 version).
    I've rebooted and I can query 59 and 61 without problems (at least for 5 minutes) but with "sample" argument stops at the same 31 counter. :bang:
    Running with 31 as parameter looks fine until now.
     
    Last edited: Oct 30, 2009
  19. stangowner

    stangowner Guest

    Messages:
    607
    Likes Received:
    11
    GPU:
    2xMSI N550GTX-Ti Cy II OC
    What do you mean by that? #31 worked and now doesn't?
     
  20. burebista

    burebista Ancient Guru

    Messages:
    1,740
    Likes Received:
    36
    GPU:
    MSI GTX1060GAMING X
    I mean if I launch NVPerfCountCLI with "sample" as parameter works OK until 31 parameter like in screenshot above.
    If i launch NVPerfCountCLI with 31 parameter works fine. Now it works with 59 and 61 too. Those give me that error before rebooting.

    LE: Damn, nothing works now. Nor 59/61/31. They just works a couple of minutes ago and now if I launch them they give that error.
    I guess is something from my rig. :(

    LE2: Sorry, I give up. Now 59/61/31 works again. I'm stumped.
     
    Last edited: Oct 30, 2009

Share This Page