none
xperf profiling improves program.. how? RRS feed

  • Question

  • Hello,

    For the last few days I've been trying to troubleshoot an issue on my pc (and a few other people have this problem too on a few forums that I'm on but we are all stumped)...

    What happens is, this only happens when I'm recording a demo (continuous instructions saved to a file on my hard disk)... When I am just recording a demo I get rhythmic spikes in my frames per second and CPU.. 

    Today I installed xperf to see if I could troubleshoot and pinpoint where the problem is... Surprisingly when I run xperf (xperf -on DiagEasy).. and with this running I record a demo.. the problem goes away. As soon as I stop xperf the problem comes back...

    So now I am curious, could it be that because xperf is constantly sampling that this allows a "more fluid stream" of data to be written to my hard drive and thus the problem goes away?

    How can this be explained... 

    Thanks!
    Tuesday, July 21, 2009 5:44 PM

All replies

  • Very interesting indeed. Are you able to measure the average FPS with and without measuring in xperf? Is it possible that the average drops, but variance decreases?

    Thanks,
    Michael
    Wednesday, July 22, 2009 4:14 AM
  • hello michael,

    i've done some more testing and it seems that perhaps running xperf (and i tested out running sysinternals procmon, a suggestion from another forums) and noticed that in vista it did improve performance... 

    but I also installed windows xp sp3 32bit onto a second partition on my hard drive and tried to recreate the problem there.. it still persists even while running procmon. i can't run xperf on the second partition since it doesnt run on win xp 32bit.

    i'm now wondering if xperf just masked the actual problem... 

    i noticed that when these rhythmic spikes happen on vista though (with resource monitor open), as the demo is being recorded to my computer i'm watching the file as its being written in resource monitor.. the spikes happen to coincide with every "chunk" that is being written ... as in as i'm watching the file size grow larger each time the spike happens... and i also notice that the noise from my drive (this soft gurgle sound) seems to also correspond with the spike..

    so i'm wondering if it could be hard drive related... this was my initial guess before i had tested it out with xperf .. i've already checked and my hard drive seems to be fine (both in ahci mode and ide compatibility mode) .. now it is running in compatibility mode ultra dma 6 , and running hard drive benchmarks seems to show fine write / read / burst speeds..

    so i'm curious now maybe there is an application or driver that is causing it to read too much while the demo recording process is happening.. when i monitored with xperf on vista i noticed other applications or drivers? was writing to the drive at the same time as the demo recording. on xp while using kernrate i noticed that hal, ntkrnlpa, and intelppm were the most used so i'm going to delve into looking into that..

    asides from this i'm still stumped :(
    Wednesday, July 22, 2009 8:37 PM