1
(Average)Pages/sec = 1.084,12; An extremely high rate of paging active memory to disk is occurring. Your application may be memory-bound. 

This is the warning Visual Studio 2013 gives me when I run the performance analysis tool. I found this question on stackoverflow which is similar to mine, but doesn't answer all of my questions.

1)My program heavily utilizes global vars(they are in a struct like object) could excessive reading and writing to it cause this problem?

2) What exactly is the problem? I though it was some kind of memory leak. Run the program for 10 hours straight. There is no memory leak. I though maybe program was writing/reading to HDD excessively. Used resource monitor to track that, never goes above 1000 byte/sec. Which is quite low.

3)Should I be worried? If it's an indication that the program is writing to the HDD excessively, I'd have to fix it(don't want to ruin SSD). If that's not it, I really don't feel like rewriting the whole code.

If you want to see the code in all it's glory(!)you can check it out on github.

Community
  • 1
  • 1
flanker
  • 101
  • 6
  • It's not that you're writing to the HDD too often, it's that the information intended to reside in memory needs to be written to the hard disk, as you're out of memory. Reading from a HDD instead of memory is hundreds to hundreds of thousands times slower. Essentially this means your application may become slow. Either you're using too much memory, or your machine is not adequately equipped to run your application. Read [this](https://en.wikipedia.org/wiki/Paging) for more information. – Rob May 26 '16 at 12:17
  • I have some idea about how paging works. Thing is, I don't write anything to the disk once the program is running. Although there are some .dll's I repeatedly call, I' doubt that's what this warning is about. I also monitored RAM usage of my app. 1-2 seconds after launch, it remains pretty much constant. – flanker May 26 '16 at 12:47
  • I see no obvious reason. You can very easily disable parts of your program to narrow down the troublemaker. Be sure to first try it with anti-malware disabled. – Hans Passant May 26 '16 at 13:11
  • @HansPassant Disabling antivirus is a good idea. Actually I'll run it on a clean virtual machine. Just to be sure. Thanks. – flanker May 26 '16 at 13:29

0 Answers0