Low Virtual Memory

Status
Not open for further replies.

dafreaking

Innovator
Guys,

My System has 4 GB of RAM and a Pagefile set to 512 mb

XP told me that the pagefile was too low and just increased it!!

Why wpuld this happen when I have 4 f**king gb of RAm in the system??:@ :@ :@ :@
 
Optimizing your page file when you're running low on RAM is always a good idea. When all physical RAM in a computer is in use, Windows starts using the hard disk as if it were additional RAM. This is why we have a Pagefile (also called the swap file). Because RAM memory is a lot more faster than the hard disk, whenever the computer begins to use the Pagefile to relieve memory pressure, we begin to experience a drastic performance degradation.

One of the most effective things you can do to improve performance is ensure that there is enough RAM available to avoid frequent paging (swapping) of memory contents between disk and RAM.

This means that the actual limit on the memory used by all applications is the amount of RAM installed plus the maximum size of the Pagefile.

How much swap space do you need? That depends the amount of RAM you have and the programs you use. The rule of the thumb is 1.5 times the amount of system memory, unless you have too much load on your system.
 
Basically even if you have 4Gb RAM, Windows still uses some pagefile (check using task manager).

1. Set your pagefile to slightly >that amount and you wont get the message.

2. You have set some min and max limits for the pagefile so windows dynamically increased it. In case you are SURE you wont exceed 4Gb, set a lower hard ize limit.

3. Again if not using it, you might even be able to turn it off, though this can affect some programs/functionality.

Your call :) Personally, I just set it to a value ~100-200Mb than the value it uses by default. And if it increases, let it. Who cares? So long as limits are defined, it will reset to lower limit after each restart anyway. If you are doing something that requires a bigger pagefile, let it increase dynamically. :)
 
The mistake you make (and many others) is thinking that if you have enough RAM, you'd never need a pagefile. You can actually force Windows to not use a pagefile (or at least you could in XP, I have no idea whether you can do so now). The point is, it would actually be slower in most cases!

In addition, some applications actually need a pagefile enabled (I think Active Directory requires it). Moreover, if you were in a Unix world, there were some algorithms which were implemented in such a way that having a swap file was helpful(related to handling executables that modify the file they were loaded from, this was before SVR4, so don't quote me on the details).

Don't worry about your pagefile too much :)
 
^ that is not entirely true. You can manage without a pagefile just fine even on 2 gb ram on vista.

I have been running my rig with no pagefile since when I installed vista. You however need to do some aggressive service management bcoz some services inadvertantly still cause memory leaks (I am on vista SP1 32 bit and i patch up the os every few weeks).

I used to get memory leak problems but I narrowed it down to one service: the iphelper service which is used for ipv6 iirc. Though I had disabled ipv6 since my network doesn't support it, the service used to run insidiously through svchost until it slowly overtime hogged all my memory and my computer crashed after a few hours (it would typically take from 1 hour to even 6 hours to crash depending on system load)

I isolated it first by checking the pid of the problematic svchost process and then systematically isolating the services which were running under that pid (check task manager) using the following regtweak:

Code:
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\[I]Name of service[/I]]

"Type"=dword:00000010

This makes the service run under its own process. So if it was hogging my memory, i could pinpoint it.

Else I would reverse it using:

Code:
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\[I]Name of service[/I]]

"Type"=dword:00000020

This took me a couple of hours when i first did it but it was worth the trouble.

:)

I run without a pagefile 24x7 ever since (almost an year) without any problems whatsoever.

Personally I am against paging. It fragments your system partition and modern systems can do without it.

You may have a different configuration, but a similar problem. Try pinpointing the cause of your problem instead of just spending more on RAM or resorting to paging.
 
Did you read what I wrote? I said that you can disable the pagefile, but it won't necessarily have the effect you desire.

As for applications that require it, read the first comment at this blog post Mark's Blog : Pushing the Limits of Windows: Virtual Memory (actually, read the whole blog post - Mark has tried to be a little less formal than I would have liked, but he's done that so that everyone can understand it).

For the Unix part, I refer you to Maurice Bach's excellent book "The Design of the UNIX Operating System".

I will refine my statement a bit though - if you have enough RAM and do nothing with it, then you wouldn't ever need a page file (e.g. if you used a 32GB Ram machine to just check email). If you ever do some work which can take advantage of 2 GB of RAM, even if you have 4 GB of RAM, you should leave the pagefile on.
 
KingKrool said:
Did you read what I wrote?

If you were referring to me, I indeed read all your posts very carefully as you always begin your replies with these condescending one liners.

I just posted a solution that works fine for me and maybe will for the op.

How did your post help?
 
And you'll note the one liner is invariably the same one - stop misquoting me! You made it sound as if I said you can't run without a pagefile. I said something else - you shouldn't run without a pagefile. Sorta like driving without wearing a seatbelt - you can do it, but why would you want to?

In any case, the problem he faces is a bit different than yours (I like your solution though, I never have the patience to go through with all of that). His problem isn't yet established as a memory leak. Indeed, his problem isn't established as a problem yet. Which was the point I was trying to make -stop worrying about the pagefile unless it starts expanding beyond reason (there have been cases where they've expanded to 30-40 GB...).
 
If XP complains of a memory problem with > 3gb RAM it just stinks of a skunk. He is likely having some bloatware / spyware / memory hogging background processes.

The arguments against paging are pretty obvious

Why be dragged by a page file when you can do it in RAM? Why fragment a partition or dedicate disk space to a pagefile instead of nailing the resource hog?
 
Well, you have a point that it is unlikely, but note one thing - unless he's using the 64 bit version of XP, he's not actually using 4 GB of RAM. More likely, he's using just 3 GB. And depending on the video card he uses (and how its mapped into memory), possibly a bit less. If after that it hits a pagefile requirement, we need to see whether it is consistent. As for memory hogs, most of them are "legal" memory hogs - firefox 2.x was a hog, but a legal one at that.

If you want to look at virtual memory counters you can do so. I recommend using perfmon and/or xperf (xperf less so, since it is more of ETW as compared to perf counters). They'll help you find out a lot of stuff.
 
Ok guys...

I've read extensively about this on various website....wanted your opinion too so posted here!!

The reason I think it happened was I was using Traktor Pro and the pagefile went over a GB! And in the task manager I had over 2 gigs of RAM free..and it was still paging1 :a

What do you guys feel about putting the pagefile on a RAMDisk??
 
I've actually heard of that being done. And it sometimes works, and sometimes accelerates the fall. You can try it and find out, just remember that it can lead to BSODs as well.

Simple question - why are you so worried about the pagefile? It seems you've identified the culprit. If you don't run it very often, it won't cause problems will it? And if you do run it, then clearly you do need the pagefile (if it is a memory hog, then you have no other choice other than to not run it :) )

In any case, I suggest upgrading to a 64 bit OS (XP 64, Vista 64, Server 2003 64 bit), which will allow you to use all 4 GB of RAM. As things stand now, you are definitely not being allowed to use all of it.
 
Status
Not open for further replies.