Thread: Page file
View Single Post
  #8 (permalink)  
Old 01-18-2007, 11:51 PM
kony
Guest
 
Posts: n/a
Default Re: Page file

On Fri, 19 Jan 2007 00:13:41 +0200, "Alex Mizrahi"
<udodenko@users.sourceforge.net> wrote:

>(message (Hello 'kony)
>(you :wrote :on '(Thu, 18 Jan 2007 16:23:14 -0500))
>(
>
> k> No, pages allocated but never used will not matter, a small
> k> amount of paging does NOT speedup anything. The system
> k> either has enough (real) memory that it doesn't have to page
> k> out (which is ALWAYS faster "IF" the use allows, if it
> k> doesn't require too much memory),
>
>it might be true if i run a single application cosuming gigabytes of RAM,
>but usage patterns on modern desktop computers are not like that.


Wrong. Usage patterns do not change it and multiple apps
merely have additive memory load which is still weighed
against what the physical memory can support, or can't.

If there is enough physical memory, enabling a pagefile will
ALWAYS, no matter what other variable, be slower. For the
(nonspecific and thus unprovable) "usage patterns on modern
desktop", it could easily be that there is not enough
physical memory - hence why a pagefile is enabled by
default. Only the user can determine that it isn't needed.



>i have lots of applications running (74 processes for 2 users), and i don't
>need all the processes all the time, certainly. i'm even running two OSes
>simultaneously -- Linux in vmware, but i'm working with that Linux from time
>to time.
> so, i think they'll better be swapped out.



IF you don't have enough physical memory to accomdate all
the rest without swapping, yes. That's not same as having
enough and paging it out for no good reason.


>as i've said, if some active
>process will need more RAM, or if some file operations will need be cached,
>Windows will swap out that processes anyway -- but it will swap out it's DLL
>and EXE pages if it cannot swap allocated memory to pagefile.
>RAM is just a cache for data -- some data is backed by files (executable or
>filemappings), some is backed by pagefiles, and some will be not backed by
>anything. OS might optimize better when it has flexibility to swap out some
>allocated memory that is not used to pagefile. certainly, OS might be wrong
>in it's optimizations, so it's questionable..
>if you disable pagefile, you give priority to data that is explicitly
>allocated by applications that is not backed by anything -- so it's not
>swapped even if it's not used because there's no place for it. at same time
>some data that is more-or-less actively used -- for example, file cache that
>caches filesystem structure MFT -- can be swapped out.


It is true that some data is needed later, or more
frequently, and some isn't. That does not change the fact
that swapping out data is going to be slower if there was no
other use for remaining physical memory. You are
arbitrarily presuming there would be, and indeed sometimes
there is, but that is not the same as a random idea about it
being faster to page out without the specific situation of
having insufficient physical memory to hold it all.




>
> ??>> i have 2 GB of RAM and have some small page files. i believe it's more
> ??>> optimal, but i can't be sure..
>
> k> If the total amount of allocated memory is beyond 2GB, yes
> k> it is more optimal. If the total amount is below 2GB, it
> k> may depend on how much of a benefit you would see from
> k> having a larger filecache (IF you adjust Windows memory
> k> management to have one, this is not a default installation
> k> condition), it is quite possible the larger filecache
> k> reduces rereads from HDD, more than the I/O to HDD from
> k> slight pagefile use. In the end, the goal is still the
> k> same- based on the specific uses of the system, to minimize
> k> access to the HDD.
>
>
>
> ??>> it's very unlinkely for windows to crash. memory allocation just
> ??>> fails, and actually application can handle this gracefully. btw
> ??>> there's one more reason to keep page file size at minimum -- some
> ??>> applications erroneosly allocate tons of RAM, and with large pagefile
> ??>> swapping make system non-responsible. with less or no pagefile, those
> ??>> application will simply honestly report failure..
>
> k> If you're going to have a pagefile active, it should be
> k> large enough to handle the entire memory allocation from
> k> applications.
>
>why?


Because that's the whole point of a pagefile, to virtually
provide memory that's not there, not to cause the app to not
have enough even WITH it. Allocation that isn't used is not
a bad thing, it was that it used the HDD at all that causes
the significant performance penalty, even worse when the
system has only one HDD in it as many do.

Reply With Quote