1.    27 Dec 2016 #1
    Join Date : Sep 2016
    Posts : 8
    Windows 10

    Confused about effects of pagefile usage on real-time performance


    Hello,

    I'm using a couple of PCs to stream audio for virtual musical instruments. Basically, there's a master PC that receives commands from a piano keyboard then sends those commands to the slave PCs to play back the audio associated with each key press. That process needs to happen quickly in order to "feel" correct when playing.

    Here's my dilemma: every time I load up the audio data on the slave, it gets within 5-10 GB of the total amount of physical RAM (64 GB) and then it starts dumping data to the page file, thereby reducing the RAM usage. That creates disruptions in the audio stream because it can't pull the data from the page file as quickly as it can from RAM (at least I presume that's what's happening). The pagefile usage goes to about 10 GB (as reported by perfmon.exe) and the memory usage goes to about 47 GB (as reported by task manager). So the total memory requirement is about 57 GB, leaving me about 7 GB to spare.

    But why is it using the page file instead of using physical memory? My understanding is that the OS tries to free up memory that it thinks I won't need. But how does it decide what RAM is less necessary? In my case it always seems to guess wrong because I can drop the page file down to 1 GB and the system performs better.

    But even with a tiny page file I still get 5-7 GB of RAM that is "modified" and, apparently, not available for use.

    It seems to me that the best setup for a real-time application like this one is to have no page file because there are no other apps loaded or executed - the memory gets filled at boot up and then never changes. So why would you ever need a pagefile? But even with a tiny page file Windows won't let me access all my RAM and it puts a bunch of it into some kind of quarantine that prevents me from making use of it.

    Is there a solution to this problem? Or do I just have to accept that my 64 GB of RAM is really only about 55 GB, and I've lost the other 9 GB to Windows because it thinks it's smarter than I am?

    Thanks in advance,

    rgames
      My ComputerSystem Spec
  2.    28 Dec 2016 #2
    Join Date : Jan 2015
    UK, Midlands
    Posts : 10,360
    Win 10 Pro (1703)

    Hi, could you post a screenshot something like this please?
    Click image for larger version. 

Name:	Snap 2016-12-28 at 11.37.37.jpg 
Views:	1 
Size:	88.9 KB 
ID:	115034
    (Ignore the details on mine- my pagefile is on E: )

    Also a screenshot of your task manager - the Performance tab, Memory. It would be helpful to see if you are using compressed RAM.

    You will most likely find part of your RAM is allocated to your graphics card.

    Could you also please complete your system specs (see mine for example)?
    System Specs - Fill in at Ten Forums
      My ComputerSystem Spec
  3.    28 Dec 2016 #3
    Join Date : Sep 2016
    Posts : 8
    Windows 10
    Thread Starter

    OK - my page file is on my L drive (why does that matter?) and has been set to between 1 and 15 GB. It's an SSD. As I said above, when set to a larger value I get many breaks in the audio stream. The frequency with which those breaks occur decreases with decreasing page file size.

    I have tried both with compressed RAM and without and the behavior is the same.

    System specs:
    i7 6700k on Gigabyte/Asus motherboard
    64 GB RAM
    Various SSDs and HDDs
    One machine uses a $20 AMD video card and the other has a GTX 970.

    How does this help answer my questions above? I'm not sure what you do with this extra information.

    Thanks,

    rgames
      My ComputerSystem Spec
  4.    28 Dec 2016 #4

    Best place to learn about paging behavior in Windows is in Mark Russinovich et al's outstanding book Windows Internals, 6th edition. Chapter 10 in Part 2 is entitled Memory Management and it explains how modern Windows manages memory and, by extension, how it works with the paging file. Turns out that at least some paging file space is a good idea to maintain on Windows, even on systems with max memory, simply to leave buffering space for pages waiting to be written to memory while pages marked for deletion are being cleaned out. Fascinating stuff!
    HTH,
    --Ed--
      My ComputersSystem Spec
  5.    28 Dec 2016 #5
    Join Date : Aug 2014
    Forever West
    Posts : 3,913
    Win10 Home and Pro, Win10 Insider Preview, Win7 Home, Linux Mint

    A weird thought just surfaced from my MS-DOS 5 days. I frequently created a RAM disk in memory to copy data from floppies before recopying to a blank disk. MS-DOS 6.xx was much better as it would copy to the HDD first. Anyway, the thought was running the Pro version of Windows on a motherboard that supports 128GB RAM and create that RAM disk about half the RAM and designate it for the paging file/Virtual Memory. Or in other word, speed. It would be a bit expensive but the end result may be worth it.
      My ComputerSystem Spec
  6.    28 Dec 2016 #6
    Join Date : Sep 2016
    Posts : 8
    Windows 10
    Thread Starter

    Quote Originally Posted by EdTittel View Post
    Best place to learn about paging behavior in Windows is in Mark Russinovich et al's outstanding book Windows Internals, 6th edition. Chapter 10 in Part 2 is entitled Memory Management and it explains how modern Windows manages memory and, by extension, how it works with the paging file. Turns out that at least some paging file space is a good idea to maintain on Windows, even on systems with max memory, simply to leave buffering space for pages waiting to be written to memory while pages marked for deletion are being cleaned out. Fascinating stuff!
    HTH,
    --Ed--
    Hi Ed - thanks for the info. I'll check it out.

    Quick question - it seems to me that leaving the page file intact does, indeed, make sense for most use cases (spreadsheets, web browsing, e-mail, etc). But do you think the same thinking applies to real-time applications like I described above? Does that book specifically discuss how the page fille affects real-time applications?

    My understanding is that the pagefile is kind-of a hedge against what the user might do in the future - load other apps, load other data, etc. so Windows tries to guess what's not really necessary and free up memory for what might be necessary in the future. Right?

    But in the case I'm describing, there are no other apps or data loaded. Once everything is loaded at boot-up, nothing changes. The computer just responds to requests to dump data that's already in memory into a buffer and transfer it to the master computer.

    So, given that the real-time system performance would improve without the pagefile (as evidenced by my testing), doesn't it make sense for Windows to just forget about the pagefile and "modified" memory?

    More to the point, how do you force it to do so? I can disable the pagefile but I still lose all that memory to "modified" status, which, as far as I can tell, is Windows waiting for the pagefile size to increase so that it can dump it there.

    Thanks again,

    rgames
      My ComputerSystem Spec
  7.    28 Dec 2016 #7
    Join Date : Aug 2014
    Forever West
    Posts : 3,913
    Win10 Home and Pro, Win10 Insider Preview, Win7 Home, Linux Mint

    So, given that the real-time system performance would improve without the pagefile (as evidenced by my testing), doesn't it make sense for Windows to just forget about the pagefile and "modified" memory?
    Always have to keep in mind that other/third-party program installs look for certain things to be available, downside of Microsoft having to "cooperate" with those programmers. Apple not so much, Linux usually even more open than Windows.
      My ComputerSystem Spec
  8.    28 Dec 2016 #8

    Dear Rgames:
    As I understand it, if you're running real-time stuff it has ways to lock itself into resident memory (the non-paged pool). In such cases, it's only going to use the pagefile when it's either being swapped in before it starts running, or when it swaps out, after it's finished running. While running, paging should not occur for such stuff. That said, I'm not savvy enough about memory allocations available for application use to know if (or how) an application could make such memory reservations. To the best of my knowledge only the OS kernel is able to lock itself into ring 0 status and related memory reservation. Anybody else know different?
    Thanks,
    --Ed--
      My ComputersSystem Spec

 


Similar Threads
Thread Forum
How to fix 100% disk usage by disabling Visual Effects
I spent 3 days trying to figure my 100% disk usage out, literally trying everything I could find on Google to fix it. No luck. I then noticed in Resource Monitor, the responsible process (svchost.exe wsappx), had Windows.Photo in its file path,...
Performance & Maintenance
Effects of changing BIOS time on Windows 10?
Hello! I was just wondering what were the effects of changing the BIOS time on Windows 10? I've heard it can do some damage to files and programs (specifically antiviruses, I've heard those can be broken). What are such effects and are they...
General Support
Solved Windows 10 -- high CPU usage is a real issue
Yesterday, I upgraded from Win 7 pro x64 to Win 10 pro x64. I have a "clean machine" without any traces of viruses or malware. My Win 7 PC ran flawlessly. My Win 7 PC used little or no CPU when it was not running programs. The new Win 10...
Performance & Maintenance
Best Performance for Visual Effects .reg file??
Is it possible to make a .reg file to optimize my visual effects for best performance for all users that sign into one PC? I want to do this because we have many people who sign into the PC via our Active Directory through the network. If I can...
Performance & Maintenance
Pagefile.sys 100% disk usage (read) on certain applications / games
i dunno whats happened all of a sudden. but after doing the recent windows 10 update (Major update) most of the games i play and applications i use are now becoming unusable! certain games and or applications are going to 100% disk usage which...
Performance & Maintenance
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 12:20.
Find Us
Twitter Facebook Google+ Ten Forums iOS App Ten Forums Android App



Windows 10 Forums