Re: Page file GT <ContactGT_remove_@hotmail.com> wrote
> Rod Speed <rod.speed.aaa@gmail.com> wrote
>> kony <spam@spam.com> wrote
>>> Alex Mizrahi <udodenko@users.sourceforge.net> wrote
>>>>> No, pages allocated but never used will not matter, a small
>>>>> amount of paging does NOT speedup anything. The system
>>>>> either has enough (real) memory that it doesn't have to page
>>>>> out (which is ALWAYS faster "IF" the use allows, if it
>>>>> 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.
>> Wrong with an OS that has enough of a clue to not use it
>> unless its necessary because there isnt enough physical memory.
> True, but windows does not fall in the category you describe - it automatically loads itself into
> RAM, then swaps out parts to the swap file without question.
It isnt that black and white. Most obviously when there is no swap file.
>> And even with one that isnt smart enough to always do that,
>> you havent established that what minimal use of the pagefile
>> it does do when there is enough physical memory does slow
>> things down any anyway, most obviously when what minimal
>> use it does make of the page file is in the background etc.
> In the control panel you can set the minimum and maximum size for the
> swapfile. These settings do indicate to windows the smallest amount
> to use if the RAM is not full, it simply says the minimum size that
> the file will be. This avoids the swapfile becoming fragmented across
> the disk. Before setting the virtual memory size, I would recommend
> turning off virtual memory completely, rebooting, defragmenting the
> hard disk, then setting the minimum and maximum values to the same
> amount, so that the swapfile is configured in one large contiguous
> block on the disk and will never grow and shrink and therefore cannot
> become defragmented. Of course, this is my advice to someone with
> less RAM than the applications they use can ever need. If you have
> enough RAM - turn it off and things will be faster, quieter and more
> responsive.
There's real downsides with no swap file with Win.
>>> 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.
>> Wrong, the OS obviously can.
> Wrong, some OS's can, but windows doesn't.
I said CAN, not DOES.
>>>> 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.
>> Pity about when the pagefile is just used to provide
>> faster access to the read only files on the hard drive.
> Who told you that gem?!?
You just restated that yourself in different words at tha top.
Concentrate on the use of the word WHEN.
>>>> 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.
>> Not if that is done in the background and its never used from the file.
> But loading from virtual memory IS using something from a file - its just not in the original
> place on the hard disk!
The word IF is there for a reason.
>>> 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.
>> You are arbitrarily presuming that an OS which does minimally
>> use a page file when there is enough physical ram, that that
>> minimal use of the page file has any effect on the speed of ops.
> No, we are stating a fact - swapping files between physical RAM and the slower hard disk (virtual
> memory) has a performance impact on the system.
It isnt a fact at all IF that only happens in the background with the performance impact.
> Also, like I said above - the minimum setting for the swapfile is not an indication of how much
> windows will use as a
> minimum, just the smallest size the swapfile is allowed to be.
Duh.
>> You dont know that.
> Yes we do.
No you dont.
>>>>>> i have 2 GB of RAM and have some small page files.
>>>>>> i believe it's more optimal, but i can't be sure..
>>>>> If the total amount of allocated memory is beyond 2GB, yes
>>>>> it is more optimal. If the total amount is below 2GB, it
>>>>> may depend on how much of a benefit you would see from
>>>>> having a larger filecache (IF you adjust Windows memory
>>>>> management to have one, this is not a default installation
>>>>> condition), it is quite possible the larger filecache
>>>>> reduces rereads from HDD, more than the I/O to HDD from
>>>>> slight pagefile use. In the end, the goal is still the
>>>>> same- based on the specific uses of the system, to minimize
>>>>> 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..
>>>>> If you're going to have a pagefile active, it should be large
>>>>> enough to handle the entire memory allocation from applications.
>> Wrong.
> Perhaps you could stretch to more than 1 word in your reasoning here
I did.
> - the standard is for virtual memory to be 100%-150% the size of the RAM
That is just plain silly, most obviously when you go from say 1G to 2G of
physical ram, with the same machine use, why would you need to double
the swap file size in that situation ? The use of the swap file will DROP.
>>>> why?
>>> Because that's the whole point of a pagefile,
>> Nope
> Yup
Nope.
>>> to virtually provide memory that's not there,
>> It isnt the ENTIRE MEMORY ALLOCATION FROM THE APPS
>> that matters, its the excess over the physical memory that matters.
>>> not to cause the app to not have enough even WITH it.
>>> Allocation that isn't used is not a bad thing,
>> It can be speed wise if that page file space has to be allocated and is never used.
>> In spades when you have chosen to run without a page file.
>>> it was that it used the HDD at all that
>>> causes the significant performance penalty,
>> ONLY if that allocated memory is ever actually used.
> You proove our point
Nope.
> - it is used all the time by Windows, whether it needs it or not!
Pity that doesnt necessarily produce a performance impact when
you have large amounts of physical ram, enough for whatever is run. |