Getting gratuitous amounts of soft page faults when loading games and watching flash video

8

2

My computer has a strange issue when playing games that load assets on the fly. Perhaps I'm looking in the wrong places, but I seem to be unable to find anyone with a similar issue.

In case it's not clear, I'll note some examples. In Source games, the mapper is able to optimize things by telling the engine when and where to hide objects so that they are not added to the scene until you round a corner, or open a door. My computer chokes when it comes time to load in these objects. Take Portal 2 for example. Once the loading screen for an area goes away, I'm thrown into the level. Immediately, I'm greeting with a frozen screen, and stuttering/repeating audio, for about a second. Once that passes, everyone continues on all hunky-dory at full framerate. Then I walk up to a door, triggering it to open. Another good second of stillness and stuttering audio as it loads in the room on the other side. If you were to watch anyone else play the game, this would never happen. Anyway, this I can tolerate. It's annoying, but it doesn't really interfere with gameplay. Now let's game a game that constantly loads as you progress, Sonic Generations. Standing still, I get a silky smooth framerate. But as soon as he begins to run forward, loading more of the level, I drop to <1 FPS, making it utterly unplayable. More and more games seem to be doing this nowadays, which is why I'm finally getting serious about troubleshooting it.

I highly doubt these pauses are programmed into the games themselves. Loading screens are designed to run smoothly as data is loaded, and on any other machine, they do. Using Sonic as an example again, even the moving parts on its loading screens are extremely choppy until the load completes.

I had built this computer nearly four years ago, and have had this problem since I started using it for 3D gaming. Since then, I've replaced my motherboard, HDD, and graphics card, due to them dying. (Case fans stopped working one day, and the HDD was a whole 'nother deal.)

Running Win7 Ultimate 64-bit with Aero on, on an Intel 2.5Ghz quad core, with 4GB of RAM, and an nVidia GTX 460.

Thanks a ton, everyone!

Update: It's become apparent that I am getting a heapload of page faults. Average of 170,000 per second with Sonic Generations, average 70,000 during loads with Portal 2, and a very steady 30,000 while watching a stream at Livestream.com. According to Resource Monitor, these aren't even hard faults. I'm kinda curious how these numbers compare to everyone else.

Addendum: Might as well add another example, and a potential symptom. First, a racing game called Trackmania. In a solo race, there are no noticeable page faults, (beyond what other programs may be producing) and the game runs silky smooth. When playing online however, I get massive hiccups (and page fault spikes) at frequent-yet-random intervals. I'll be racing along, game will pause for a good second or more, and will resume with my vehicle upside down in a crumpled mass next to a wall. Hiding the cars of other players doesn't fix the problem either.

As for the potential symptom... I've avoided mentioning it because I was afraid it might be an unrelated issue, and didn't want to send troubleshooters down the wrong path. At this point, why the heck not mention it? Basically, my computer will downright completely freeze after watching video for some time. Looping audio, entire screen (including cursor) non-responsive, num-lock won't toggle, can do nothing but a hard shutdown. It can trigger in minutes, or hours. Typically, the larger the viewport is, the sooner it happens. As long as hardware acceleration is on, full screen Youtube videos are safe.

Full screen Youtube with hardware acceleration on does not seem to produce page faults. It does when windowed, however. Livestream always produces page faults, full screen or not, accelerated or not. Games never seem to freeze my computer like this however, despite generating loads of page faults themselves.

(Changed title from "Graphics become choppy when game assets are loading in the background" to "Getting gratuitous amounts of soft page faults when loading games and watching flash video.)

YotaXP

Posted 2012-01-08T23:18:34.857

Reputation: 81

1Do you have enough RAM? – soandos – 2012-01-09T00:02:55.110

I don't typically surpass 3GB of usage, so I should have plenty. I have ordered an additional set of memory that should be arriving shortly. I'm going to try swapping them out to see if that helps. If it doesn't, I will have then maxed out my capacity anyway. Win/win. – YotaXP – 2012-01-10T15:09:51.057

Can you run the performance monitor in the background, and see if there are a lot of pagefaults? – soandos – 2012-01-10T15:42:01.743

I'm not experienced enough to know what is 'normal' as far as page faults go, so here's a screenshot. http://i.imgur.com/cbGFP.png I think it's clear at what point I started up Sonic Generations.

– YotaXP – 2012-01-10T17:21:07.260

So that is your issue. (PS, I have NEVER seen it go above 150 or so, this is nuts) – soandos – 2012-01-10T22:55:00.713

How much memory are you using, and how big is your pagefile? – soandos – 2012-01-10T22:58:30.647

Page file is 4GB, almost on the dot. System managed. Using about 2.6GB of memory without the game up. (And >1GB standby, whatever that means.) Firefox being the main hog. Sounds like you're hitting the nail on the head though. The faults spike when I get the hiccups in Portal 2 as well. I've been watching Resource Monitor at the same time, and it isn't picking up many hard faults, if any. Did do a little spiking at first go, but nothing when the game stutters. If you're certain on what it is, be sure to post as an answer so I can eventually mark it. – YotaXP – 2012-01-10T23:42:11.677

Have you tried increasing the size of the pagefile? – soandos – 2012-01-10T23:44:19.980

Increased to 6GB, no improvement. I'm kinda curious why the pagefile would be used at all with over a GB of "standby" memory. – YotaXP – 2012-01-11T00:09:25.143

It is recommended, if you set your pagefile yourself, to make it about 1.5x the amount of RAM in your system. For an added benefit, put it on a different physical disk than your main system disk, so pagefile writes don't slow down other disk accesses. – Ben Richards – 2012-01-11T00:51:15.377

considering there's a lot of pagefaults, try testing the ram? – Journeyman Geek – 2012-01-12T21:10:04.537

The 1.5x RAM pagefile recommendation is old and out of date, but sidran32's recommendation to put it on a different physical disk is still a good one. What kind of hard drive setup do you have? Are your SATA controller drivers good? What mode is your SATA controller set to in your BIOS? (you generally want AHCI). When was the last time you did a BIOS update? – evilspoons – 2012-02-14T19:48:02.813

@evilspoons I have a single internal HDD connected with SATA, and an external HDD connected with USB. I don't see such a controller setting in my BIOS. (I have an Asus P5N-E SLI motherboard, by the way.) Only option I see is one to disable the JMicron SATA Controller, which is odd since I thought I had an nVidia controller. The BIOS is 5 revs behind, at 1201. I've avoided flashing it since the BIOS chip burnt out last time. I may try installing TM2 on my external later today. Thing is, as the other comments mention, these are all soft page faults. They shouldn't be accessing the disk. – YotaXP – 2012-02-14T20:27:25.120

there is a possibility of 3+ problems that you could have, the PCI-E latency, which often gets set wrong. The USB hard drive, which you should pull when testing, A JMicron Filter item, the Jmicron driver itself. A lane issue with the PCI-E. I only bring up these things, based on the efforts that have already been discussed. drop into a chat sometime, and I can run you through more hoops. – Psycogeek – 2012-02-18T01:07:22.130

@YotaXP Have you considered faulty memory on your graphics card? Typically, dying video RAM causes visible artefacts, but yours could be a special case. If you have a spare card lying around, consider swapping it in. Otherwise, maybe try onboard video, if your motherboard has it. It won't be great for playing games, but if you get better loading performance at least you know'll the issue is related the graphics card... or the PCI-E slot as Psycogeek suggests. Actually, you mentioned it being a SLI motherboard... perhaps try moving the card to another slot too. – Bob – 2012-03-24T15:59:44.910

Answers

3

After reviewing the information here and discovering that the issue is that he's page faulting quite a bit, I'm going to add some more possibilities that I'd look into, here.

If these are soft page faults, and you're getting a lot of them, my guess is that the memory accesses that are causing these faults are requests for texture resources. The graphics card has some amount of on-board memory to speed up texture fetch requests, but for some reason, it may be that the drivers aren't caching enough of the texture in the on-board memory, or it isn't caching any of it at all. I am not familiar with nVidia's graphics driver settings very well (I've been running ATI cards primarily for the past 4 years) so I am not sure if a driver setting, overclocking setting, or even a BIOS setting would be to blame for such a state. However, I would look into this to see if it may be the source of the problems.

Also, as a note, I logged page faults/sec, as you did, for Portal 2, and found barely any. Of course, my system is using 2 Radeon HD 6970s in Crossfire, however, your graphics card should certainly be capable of handling Portal 2 without pagefaulting like that. If all is operating properly, I'd expect you would see a similar image to this: Page faults/sec for Portal 2 on my computer

If we want to rule out that the graphics card is the culprit (or the graphics hardware as it is being used by the computer, anyway), I'd recommend disabling Aero and seeing what happens when you are idling at the desktop. If the number of page faults decreases, then my hunch that it is graphics related is probably correct. If not, then it may be elsewhere.

Ben Richards

Posted 2012-01-08T23:18:34.857

Reputation: 11 662

Just switched SATA cables and ports. No change. (Did give myself a bit of a scare when the BIOS thought it could boot off my external.) Thanks for the suggestions, though! – YotaXP – 2012-01-11T03:14:55.487

@sidran32, he is getting pagefaults, that he should not be getting. The question is why (i.e. even if disk I/O was very slow, it should not matter at all, as there should be no/very few lookups to disk) – soandos – 2012-01-11T03:41:17.993

@soandos I know. I learned that after my post. – Ben Richards – 2012-01-11T03:56:03.623

@sidran32, considering that even when the game is not running he is page faulting quite a bit (min is 471/s) so I think it is graphics independent. – soandos – 2012-01-11T04:22:15.073

@soandos However, since he's using Windows 7 with Aero enabled, he most certainly is using his graphics card as it is a 3D accelerated desktop. Even moreso when he's watching video, as the GPU is used for processing the video. – Ben Richards – 2012-01-11T04:25:57.273

1

Neat idea! Here are the results. I failed to capture it in that screenshot, but even with Aero off, each step through the menus (clicking Start, opening Computer Properties, clicking Advanced System Settings) spiked the faults to 5-15k each. Surely the GPU should have nothing to do with that.

– YotaXP – 2012-01-11T05:06:33.463

I hadn't thought to try using the Process/Page Faults counter. Doing this, I can see that when idling, the Windows sidebar is causing the most faults. Shutting that down, the average becomes 120/sec when idle, with and without Aero. I've always had CPU/Memory and Network monitoring gadgets since Vista, and forgot they were there. The problem still persists for the games, so that wasn't the source. – YotaXP – 2012-01-11T05:27:40.527

@YotaXP This is intriguing. I will have to think on it for the night, as I have to go to sleep. Hopefully something comes to light! – Ben Richards – 2012-01-11T05:41:51.003

@YotaXP I have been thinking about this. Are you sure that your RAM is healthy? Can you try running Memtest86+ and seeing what comes of it, or boot into the Windows 7 setup disk and run the system memory test? Perhaps your RAM is faulty. It seems to be one of the constants in your problems, between your old computer and the new one. – Ben Richards – 2012-01-12T21:07:06.767

@YotaXP Also, are you certain that you have the correct RAM type for your motherboard? I've not had experience with this before but perhaps it's not the correct type and while it works, it won't work particularly well (speed/timing issues, perhaps)? – Ben Richards – 2012-01-12T21:07:51.710

@sidran32 Here's the motherboard and memory. I ran Memtest86+ with no error a month or so ago, however I only ran one pass. If my new pair of DIMMs do not arrive today, I'll try and remember to let the test run continually overnight tonight. (I've been meaning to, but keep forgetting. I'll set an alarm or something this time.) How many passes are recommended?

– YotaXP – 2012-01-12T22:05:32.240

@YotaXP The memory matches up with the motherboard, though Corsair's own website recommends the version of that memory with the heatsink (Newegg listing here). I suspect it doesn't matter, though checking that your RAM isn't running too hot wouldn't be a bad thing to do. As far as the number of passes recommended for Memtest86+, I don't know what's common, but what I usually do is kick it off when I go to bed and come back to it the next day.

– Ben Richards – 2012-01-12T22:36:10.270

Just a small update. Ran memtest the past couple nights, no errors. The new memory probably won't arrive until the 16th, despite it having been only a couple hours away from me on the 11th. (Why...) I'll update again once it arrives and has been tested. – YotaXP – 2012-01-15T03:50:17.897

That doesn't mean that there aren't any, but we'll see how it goes when you replace the RAM. – Ben Richards – 2012-01-15T21:41:50.573

@sidran32 Well, the memory finally arrived. Replacing the old in the new results in no apparent change in behavior. Neither does combining the old with the new. At least I finally got around to maxing out my memory. Let me know if you've got any new ideas. Here's my memory allocation after having run both games and Firefox. Also, is it normal for there to be a bunch of hard faults at startup? Is it considered a hard fault if a program is still being loaded into memory for the first time?

– YotaXP – 2012-01-17T18:10:52.237

@YotaXP These are questions for which I am unsure of the answer. I will have to think about this more. – Ben Richards – 2012-01-17T22:56:39.800

@YotaXP Can you post a list of all programs that you have running in the background, particularly the ones that you know have been around since you've built the computer (even if there have been version changes)? – Ben Richards – 2012-01-17T23:05:50.583

@sidran32 Shutting down most of what I didn't have before, here's my list of processes. (Here and here The problem persists after having shut down programs to make that list.

– YotaXP – 2012-01-20T18:57:07.160

@YotaXP The reason I ask is that I found if you have a program that is allocating and freeing > 1 MB of memory constantly, it can generate many of these soft page faults and end up causing slowdowns for the system in general. One of your running processes may be doing this (if it is one of them). The only programs in that list that I haven't run myself is the nVidia drivers, netsession, ATKFUSService, and TortoisSVN. See if killing any of them mitigates the faulting. You can try other background processes too. Otherwise I have no more ideas. – Ben Richards – 2012-01-20T19:41:34.807

@sidran32 I've stopped/killed those services/process (except nVidia) and the problem persists. Process Explorer shows the number of page faults being generated by each individual process. If that were the problem, wouldn't the program doing the allocation be shown with all the faults? In stead, it's showing each individual program having them. (portal2.exe, plugin-container.exe in the case of watching Livestream in Firefox, chrome.exe in the case of watching Livestream in Chrome, etc.) – YotaXP – 2012-01-21T22:52:00.867

@YotaXP I would kill nVidia too. You don't need a resident program for the OS to talk to be able to talk to the graphics card. But really, I was wondering if there was a runaway process taking the whole system down. If that's not the case, I'm sorry, I don't have any more ideas. :( – Ben Richards – 2012-01-22T05:51:22.563

@sidran32 May not have solved the issue, but I've still learned a lot. Thank you very much for all the time you put into this! – YotaXP – 2012-01-23T05:48:41.907

0

The soft page faults may be generated by certain system calls issued by the process. The exact system calls in question may be found out by using the pfmon tool as described in this vmware article :

Excessive Page Faults Generated By Windows Applications May Impact the Performance of Virtual Machines.

pfmon is still available for download from Windows 2000 Resource Kit Tools as a separate download. It is a 32-bit program, but may still work for you.

[EDIT]

I have tested pfmon on my own computer and was astounded by the enormous number of soft page faults. A few seconds of Firefox or of Internet explorer generate tens of thousands of such faults, and I really don't see any slowdown.

My conclusion is that counting soft page faults is meaningless. Apparently Windows generates them as a matter of course, and they are just the way that it works. The fact that Windows needs to search memory for the pages might be another explanation as to why Linux is faster than Windows.

So just chalk it up to inefficient memory management in Windows and worry only about hard page faults (whose number from the list you posted is quite low). Lots of soft page faults for a process apparently only indicates that the process in question does a lot of processing of memory.

If you still believe there is a memory problem on your computer, have a look at the article Detecting and Resolving Performance Issues Through Monitoring, which uses tools from the Windows Server 2003 Resource Kit Tools.

You could also run hardware tests such as Memtest86+ to be sure, but I am not entirely convinced that your problem is really about memory.

harrymc

Posted 2012-01-08T23:18:34.857

Reputation: 306 093

Interesting. I tested it with Portal 2. It stops within one second of executing pfmon, and kills portal2.exe as well. Here is the prompt, and here is the log file. I honestly have no idea what to make out from this info, but maybe you do? In this case, I executed pfmon while portal2 was loading a map.

– YotaXP – 2012-02-16T19:00:50.743

I added my take on the problem in the edit above. BTW, I hope that you haven't installed any sort of "memory optimizer" product. – harrymc – 2012-02-16T20:55:55.033

Unless it snuck on, there should be no such thing on my PC. Are you able to compare your faults to the ones I've posted in the question? I've ran Memtest86+ over multiple nights, and have even tried replacing my memory. If you think my problem is not related to these page faults, what else should I look for? Have you had a chance to read some of the other comments? I've been at this for a while now. =p Those diagnosis tools seem more useful for those who write the problematic applications. What I need to know is why they're only causing the problem for me. – YotaXP – 2012-02-16T23:55:58.687

My guess would be some error done when the computer was built. Maybe wrong memory for motherboard, wrong memory multipliers, or whatever. The hardware doesn't look like it can handle intensive memory applications, and the fault doesn't seem to be with Windows. You should maybe try tools that are used rather for overclocking. – harrymc – 2012-02-17T08:51:11.340

-1

May I suggest increasing the voltage slightly on both your RAM and your CPU? I have seen similar issues when using a poor-quality motherboard or just plain bad RAM. Boosting the voltage a bit brought everything back into normality - and the systems worked flawlessly for years after.

Joshua

Posted 2012-01-08T23:18:34.857

Reputation: 4 290

That is an interesting suggestion. I have no experience in tweaking such things, so I'll do some research on it in the morning. How much of an increase are you thinking? – YotaXP – 2012-02-21T09:28:21.477

Took a look at my voltage settings, and everything is currently set to Auto. Is there a way to know what the BIOS is setting them to so that I might increase it? I also noticed something odd regarding the memory voltage. My memory suggests 1.8v, however the minimum setting in the BIOS is 1.92v. Could that be a problem? – YotaXP – 2012-02-21T20:26:13.687

You will need to find out the exact model of your RAM modules, as well as your CPU. Once you know those exact models, you can look up the spec sheets online and see what the default voltages should be for those. You can determine the exact models using CPU-Z (http://www.cpuid.com/softwares/cpu-z.html), and even see the current operating voltages. Try the RAM first before messing with the CPU; I suggest increasing by 0.1v to start, test thoroughly, and if problems persist continue up to 0.3v (DO NOT EXCEED). This should be enough to rule out RAM being the problem.

– Joshua – 2012-02-22T16:02:52.523

I built this machine, so I know what is in it. Memory, CPU, and motherboard. CPU-z shows my CPU being given nearly its maximum voltage. Here's the report from CPU-z, if there's anything you want to look for. I'll start messing with my RAM by setting the voltage as low as possible, which is already 0.12v above the recommended voltage.

– YotaXP – 2012-02-22T18:56:32.290

Ok doesn't seem like RAM is the problem then. Let's approach it from a different angle: is there any chance you have Antivirus installed? Multiple antivirus or anti malware installed? – Joshua – 2012-02-22T19:19:09.160

Just Microsoft Security Essentials for virus and malware. Nothing third party on here. I've clean-installed Windows since it started happening, (thanks to dead HDD) so I'm less inclined to think it's a software thing. Still, it could very well be. I want to say it did this back in my Vista days too, but I can't say for certain. I always install my operating systems on a freshly formatted partition. – YotaXP – 2012-02-23T08:51:41.583