Page File size?

Page 3 - Seeking answers? Join the AnandTech community: where nearly half-a-million members share solutions and discuss the latest tech.

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
I know, I'll run around Vegas and ask 1000 people what they think and then we can use that number as the rule of thumb.
 

Smilin

Diamond Member
Mar 4, 2002
7,357
0
0
Originally posted by: KoolDrew
Is there anything wrong with the total being 2GB?

I would advise letting Windows handle it, but..

Dude, you can set your pagefile to Pi if you want. This topic is so old that people started debating it when DOS 2.2 came out. Most people were tired of the whole argument before page files were even used on a PC. Sir Isaac newton was the one that first said 1.5 times your physical ram but he was tripping because an apple just bonked him in the noggin. 2nd in line after the theory that dinosaurs died from an asteroid was that they died while locked in an eternal debate over pagefile sizes and forgot to eat. As for me, I'm pretty sure the whole big bang was caused because some jackass advised God to set his pagefile wrong.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Is there anything wrong with the total being 2GB?

It's generally a waste of disk space and setting the max instead of letting Windows handle it removes any wiggle room in the case that something really bad happens.
 

CrackaLackaZe

Senior member
Jun 29, 2002
922
0
76
Someone said that the location of the page file doesn't matter...

Microsoft has this to say regarding the location of the Page File in Windows XP:

"To enhance performance, it is good practice to put the paging file on a different partition and on a different physical hard disk drive. That way, Windows can handle multiple I/O requests more quickly. When the paging file is on the boot partition, Windows must perform disk reading and writing requests on both the system folder and the paging file. When the paging file is moved to a different partition, there is less competition between reading and writing requests."

link
 

Smilin

Diamond Member
Mar 4, 2002
7,357
0
0
Gaaaaaaaaaaaaaaaaaaaaaaaaaaawwwwwwwwwwwwwwwwwwwdddddddddddddddddddddddddddd!!!!!!!!!!


This has SOOOO been beat to death.

There is no benifit to putting it on a different partition. There is a benifit to putting it on a different disk.

Please read ALL of this and the other 50 bajillion threads on this topic. EVERYTHING has already been covered.


For the umpteenth time, from the link you just quoted:
The optimal solution is to create one paging file that is stored on the boot partition, and then create one paging file on another partition that is less frequently accessed on a different physical hard disk if a different physical hard disk is available.

Either you know by now how to configure paging or you don't. If you don't then go READ. If you do then either you are right (yay for you) or you are wrong (tough - you've had ample information to learn from).

please please please let this topic die a horrible death.



ok. I'm calm. no longer anoyed. I've gotten it out for the time being. I'm sure someone will inevitably touch on an area of the topic that's already been covered. It's as unavoidable as the movement of time.


edit:
O man, I left one tiny teeny little thing out and some tard is bound to jump on it: "But, but, but if you put it on it's own partition it won't fraaaagment, but, but, but..."

Preemptively I say, "STFU - set your min and max the same and defrag the stinkin thing and it won't happen either, plus you'll have pagefile on your C: drive so you can capture a memory dump."

Hope I edited fast enough.


Edit #2: Big props and points to CrackaLackaZe for taking an additional comment offline! It's noted and appreciated. Elites: please chock up a point in your book for the man.
 

dawks

Diamond Member
Oct 9, 1999
5,071
2
81
My setup is as follows (order partly due to when disks were purchased)

I have a WD40gig ATA 100 2meg cache drive and a WD120gig ATA 100 8meg cache (unfortunatly both on the same IDE cable)..

The 40 gig has
C:\ (6gigs in size) NTFS with 4kb sectors Holding Windows XP
D:\ 32gigs in size) NTFS with 4kb secotrs Holding Music and Videos (smaller files media files..)
The 120gig drive has
F:\ (2gigs in size) NTFS with 1meg sectors Holding my Windows XP Swap file (set to System Manged)
X:\ (110gigs size) NTFS with 8kb sectors Holding Larger multimedia files. 800meg DivX movies.. 4gig DVDR rips.. application ISOs..

The larger sector sizes allows for a little less fragmentation and more efficient use of file space when dealing with larger files..

Keeping my swap file on its own Partition keeps it from getting fragmented around other files... which I have seen happen.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Someone said that the location of the page file doesn't matter...

Of course someone said that, someone says everything eventually. And with regards to pagefile 'optimization' there's a huge amount of misinformation out there.

Keeping my swap file on its own Partition keeps it from getting fragmented around other files... which I have seen happen.

But fragmentation of the pagefile will most likely have less of an affect on performance than the increased seek times you've created by putting it on it's own partition, atleast when it's competing for access with the videos and such on that drive. And 1M clusters doesn't affect the pagefile at all, the pagefile is still accessed in page sized chunks with, I believe, up to a max of 64K read-ahead.
 

dawks

Diamond Member
Oct 9, 1999
5,071
2
81
Originally posted by: Nothinman
Someone said that the location of the page file doesn't matter...

Of course someone said that, someone says everything eventually. And with regards to pagefile 'optimization' there's a huge amount of misinformation out there.

Keeping my swap file on its own Partition keeps it from getting fragmented around other files... which I have seen happen.

But fragmentation of the pagefile will most likely have less of an affect on performance than the increased seek times you've created by putting it on it's own partition, atleast when it's competing for access with the videos and such on that drive. And 1M clusters doesn't affect the pagefile at all, the pagefile is still accessed in page sized chunks with, I believe, up to a max of 64K read-ahead.

I think the framentation would have a bigger effect then seek times, especially since paging isnt a big deal when accessing video files..


As for the cluster sizes, the main benefit I guess is a slightly better use of space, since there is less overhead.
 

Spencer278

Diamond Member
Oct 11, 2002
3,637
0
0
Originally posted by: dawks
Originally posted by: Nothinman
Someone said that the location of the page file doesn't matter...

Of course someone said that, someone says everything eventually. And with regards to pagefile 'optimization' there's a huge amount of misinformation out there.

Keeping my swap file on its own Partition keeps it from getting fragmented around other files... which I have seen happen.

But fragmentation of the pagefile will most likely have less of an affect on performance than the increased seek times you've created by putting it on it's own partition, atleast when it's competing for access with the videos and such on that drive. And 1M clusters doesn't affect the pagefile at all, the pagefile is still accessed in page sized chunks with, I believe, up to a max of 64K read-ahead.

I think the framentation would have a bigger effect then seek times, especially since paging isnt a big deal when accessing video files..


As for the cluster sizes, the main benefit I guess is a slightly better use of space, since there is less overhead.

Framentation isn't a big concern because it is rather unlikel you will need to page in large amounts of data from the page file and internal the page file may or may not have your data sequencal. Lets say you are getting data from a video and you have page access for what ever reason. You will see an access patern of video -- Pagefile -- video -- Pagefile... Now the biggest effect on performance is how long it takes the drive to seek to the page file and back to the video.
 

imported_mAsk

Junior Member
Oct 1, 2004
4
0
0


This is how I learned it, although everyone seems to have their own formula I have had great success on keeping it at a "constant size"....Personally, I dont use a page file the majority of the time. Certain software require one, and some hardware wont function properly without one. Although I find if you have 1gig plus....why bother unless you are running a program that requires it at the time.


If anything, create (preferably on a separate partition), a swap space of constant size. For example, select Custom Size and place 1000 in "Initial" and 1000 in "Maximum" Size boxes, then click Set Button. This will reduce the amount of work needed to dynamically resize the page file, usually when you need it most.


I pulled the following from Black Vipers web site, and have had good results following this:


Virtual Memory ~ The name used for the sum of Physical RAM and the Swap File. In other words: Physical RAM + Swap File = Virtual Memory. You cannot "disable" Virtual Memory even if you disable the Swap File. Meaning, 2 GB RAM + 0 MB Swap File = 2 GB Virtual Memory.

From Fastest to Slowest, these are the configuration you can try:

No swap file at all. Some software may fail. You also need "much" memory to do this. Greater than 512 MB, but I recommend 2 GB.
A static swap file on a separate hard drive (and preferably, controller) from Windows and frequently accessed data.
A dynamic swap file on a separate hard drive (and preferably, controller) from Windows and frequently accessed data.
A static swap file on a separate partition, but on the same physical hard drive as Windows.
A dynamic swap file on a separate partition, but on the same physical hard drive as Windows.
The Default: A dynamic swap file on the same partition and physical hard drive (usually C as Windows.


mAsk
 

Smilin

Diamond Member
Mar 4, 2002
7,357
0
0
Originally posted by: mAsk
If anything, create (preferably on a separate partition), a swap space of constant size. For example, select Custom Size and place 1000 in "Initial" and 1000 in "Maximum" Size boxes, then click Set Button. This will reduce the amount of work needed to dynamically resize the page file, usually when you need it most.
This is not an entirely bad recommendation. IF you don't mind the possibly wasted disk space (I don't). Prevents fragmentation.

I pulled the following from Black Vipers web site, and have had good results following this:


Virtual Memory ~ The name used for the sum of Physical RAM and the Swap File. In other words: Physical RAM + Swap File = Virtual Memory. You cannot "disable" Virtual Memory even if you disable the Swap File. Meaning, 2 GB RAM + 0 MB Swap File = 2 GB Virtual Memory.

This is simply incorrect. They are giving an embarassingly incorrect definition of Virtual Memory that shows they do not understand it.

From Fastest to Slowest, these are the configuration you can try:

No swap file at all. Some software may fail. You also need "much" memory to do this. Greater than 512 MB, but I recommend 2 GB.
A static swap file on a separate hard drive (and preferably, controller) from Windows and frequently accessed data.
A dynamic swap file on a separate hard drive (and preferably, controller) from Windows and frequently accessed data.
A static swap file on a separate partition, but on the same physical hard drive as Windows.
A dynamic swap file on a separate partition, but on the same physical hard drive as Windows.
The Default: A dynamic swap file on the same partition and physical hard drive (usually C as Windows.

mAsk

I'm now regretting even starting a response. Too much energy required for a dead topic.
#2 will actually be your fastest if the size is right. You'll sacrifice the ability to get a memory dump during a crash. No other comments.



edit: ludicrous typo
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
If anything, create (preferably on a separate partition), a swap space of constant size

If anything, leave it alone. The benefits from 'optimizing' the pagefile don't justify the amount of work required to do any of those things.

This will reduce the amount of work needed to dynamically resize the page file, usually when you need it most.

The work needed to 'resize' the pagefile is minimal since it can only be grown, it doesn't shrink until you reboot.
 

Smilin

Diamond Member
Mar 4, 2002
7,357
0
0
Originally posted by: mAsk
What is the proper definition of a pagefile?

mAsk

I think you may already get pagefile. It is basically pages written to disk which are 4k chunks of memory. The pagefile is handled a bit differently than normal files. The virtual memory manager and cache manager can communicate directly with the file system driver which communicates diretly with the device driver for the storage controller. This lets it bypass I/O manager and do things like FastIOReads and FastIOWrites.

Virtual memory (taken from Inside Windows 2000 third edition):
Windows 2000 implements a virtual memory system based on a flat (linear) 32bit address space. Thirty-two bits of address space translates into 4 GB of virtual memory. On most systems, Windows 2000 allocates half this address space (the lower half of the 4-GB virtual address space, from x00000000 through x7FFFFFFF) to processes for their unique private storage and uses the other half (the upper half, addresses x80000000 through xFFFFFFFF) for its own protected operating system memory utilization. The mappings of the lower half change to reflect the virtual address space of the currently executing process, but the mappings of the upper half always consist of the operating system's virtual memory.

What it is saying basically is there is 4GB of memory in the system (This is what you can access in a 32 bit operating system, 4,294,967,295 bytes.). Virtual memory is THAT.

So virtual memory is not your physical memory plus your pagefile. Some of pages of virtual memory will be mapped to pages in memory, some will be mapped to pages on disk. When memory is access it is done via a "Virtual Page number" and a 12 bit number that maps to the desired byte in that page. The virtual page number is two parts: the page directory index and the page table index. The directory points to what page table and the index points to what page table entry (PTE) in that table. The PTE says where the memory is. It also includes flags that indicate if that memory is visible to all processes or just the process that owns that page directory. It also has an important bit indicating whether the page is valid or not. If it's invalid there will be a page fault and the memory manager fault handler will step in to allocate a physical page of memory then read a page in from the pagefile.

The actual algorithms of how to handle page faults and how to read and write to the pagefile are NUTS. Suffice to say that it's well optimized and cleverly handles tons of situations: how to avoid thrashing pages in and out of pagefile that are going to be used often, what to do when physical memory is exhausted, how to handle pages of physical memory that are getting stale, how to read possibly needed pages in at the same tiem it's reading one that is needed, how to juggle pages that are intended for the pagefile but have only made it to cache, how to skip cache and write directly to disk when needed, and so on.


Dear God, I've rambled. It just bugs me when virtual memory and pagefile get interchanged or if someone says virtual memory is physical memory plus pagefile.



 

DouglasAdams

Junior Member
Nov 9, 2004
20
0
0
1)
sorry but why does linux put it's swapfile in a partition of it's own if ithis is such a bad idea?
surely the arguement about head re-positioning over fragentation is a hardware thing and should equally apply to any os.

2)
if you tell pq magic to make you a linux swapfile why does it give up a fixed size one in it's own partition?
surely those nice ppl who wrote partition magic did this for a reason.

3)
if you let windows default to loading the pagefile to your windows partition, when you make a ghost image of windows you will get the pagefile too. even just after an initial install with office loaded this can double the size of the image. frankly, it's a waste! i used to be able to fit a basic windows install (40+ minutes work) on a cd-r but with the pagefile it became too damn big.

for the record:
since i started to put windows and all ms programs in one partition;
the pagefile (min and max both set to a little above the max recommended by windows), all temp files, backup files (i.e. rar'd copies of my data) and a few ghost images in another partition;
with everything i really didn't want to disappear (i.e. data, non-ms progs, etc) in a third partition
however, when i had windows and the pagefile/temp files/etc all on one drive crashes were far more frequent - some with data loss too!

in fairness, most of my machines do have more than one hard drive so the pagefile on those is on a different hard drive to windows but when i only have one drive i stand by my reasoning.

also, my data hardly ever needs much defraging. in fact only the windows partition needs defraging most of the time and that's no-where near as bad as it was previously.

my current configuration makes me feel much safer; i spend far less time performing paranoid backup upon backup; i have more time to do what i want to do; the sun is shining and the birds are singing.

finally, i would wonder just how many average users would actually notice any possible difference in performance if they put their pagefile in a different partition of a single drive system. would it take 5 or 10 seconds longer to reboot? maybe 2 seconds longer to load word? frankly, unless you're talking about servers or huge databases, etc, then i doubt most ppl would notice...and those who would - get a life!
 

stash

Diamond Member
Jun 22, 2000
5,468
0
0
Slightly off topic, but I know a great resource for this stuff has been Inside Windows 2000 Third Edition. The latest version of this book is almost here (finally). It's now called Microsoft Windows Internals, Fourth Edition and includes information about 2003, XP and 64-bit Windows.

Check it out if you are interested. It is scheduled to be published December 8th.

http://www.amazon.com/exec/obi...1?v=glance&s=books
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
sorry but why does linux put it's swapfile in a partition of it's own if ithis is such a bad idea?

It's just the way it's always been done, you can use a file on another filesystem if you really want to. Also I would hazard to say that Linux is less aggressive with swap usage so it's less of a performance hit since the heads aren't seeking there as often. If you're paging in and out of swap it's going to suck no matter what, but having to seek to a dedicated partition on the same physical drive is going to make it worse even if just a little.

if you tell pq magic to make you a linux swapfile why does it give up a fixed size one in it's own partition?

They were following suit with the defacto standard and they probably added the code just to list it as another feature. And you can't really have a dynamic sized partition.

if you let windows default to loading the pagefile to your windows partition, when you make a ghost image of windows you will get the pagefile too. even just after an initial install with office loaded this can double the size of the image. frankly, it's a waste! i used to be able to fit a basic windows install (40+ minutes work) on a cd-r but with the pagefile it became too damn big.

Ghost is smart enough not to include the pagefile in it's image, it creates an entry in the ghost so that the file is recreated on restore but it takes virtually no space in the image.

however, when i had windows and the pagefile/temp files/etc all on one drive crashes were far more frequent - some with data loss too!

BS, file location doesn't cause crashes.

my current configuration makes me feel much safer; i spend far less time performing paranoid backup upon backup; i have more time to do what i want to do; the sun is shining and the birds are singing.

Woohoo placebos that make you skip backups, what a great idea!

finally, i would wonder just how many average users would actually notice any possible difference in performance if they put their pagefile in a different partition of a single drive system. would it take 5 or 10 seconds longer to reboot? maybe 2 seconds longer to load word? frankly, unless you're talking about servers or huge databases, etc, then i doubt most ppl would notice...and those who would - get a life!

Exactly, all the stuff you outline above that you said you do on your own systems is completely pointless and you should get a life.

 
sale-70-410-exam    | Exam-200-125-pdf    | we-sale-70-410-exam    | hot-sale-70-410-exam    | Latest-exam-700-603-Dumps    | Dumps-98-363-exams-date    | Certs-200-125-date    | Dumps-300-075-exams-date    | hot-sale-book-C8010-726-book    | Hot-Sale-200-310-Exam    | Exam-Description-200-310-dumps?    | hot-sale-book-200-125-book    | Latest-Updated-300-209-Exam    | Dumps-210-260-exams-date    | Download-200-125-Exam-PDF    | Exam-Description-300-101-dumps    | Certs-300-101-date    | Hot-Sale-300-075-Exam    | Latest-exam-200-125-Dumps    | Exam-Description-200-125-dumps    | Latest-Updated-300-075-Exam    | hot-sale-book-210-260-book    | Dumps-200-901-exams-date    | Certs-200-901-date    | Latest-exam-1Z0-062-Dumps    | Hot-Sale-1Z0-062-Exam    | Certs-CSSLP-date    | 100%-Pass-70-383-Exams    | Latest-JN0-360-real-exam-questions    | 100%-Pass-4A0-100-Real-Exam-Questions    | Dumps-300-135-exams-date    | Passed-200-105-Tech-Exams    | Latest-Updated-200-310-Exam    | Download-300-070-Exam-PDF    | Hot-Sale-JN0-360-Exam    | 100%-Pass-JN0-360-Exams    | 100%-Pass-JN0-360-Real-Exam-Questions    | Dumps-JN0-360-exams-date    | Exam-Description-1Z0-876-dumps    | Latest-exam-1Z0-876-Dumps    | Dumps-HPE0-Y53-exams-date    | 2017-Latest-HPE0-Y53-Exam    | 100%-Pass-HPE0-Y53-Real-Exam-Questions    | Pass-4A0-100-Exam    | Latest-4A0-100-Questions    | Dumps-98-365-exams-date    | 2017-Latest-98-365-Exam    | 100%-Pass-VCS-254-Exams    | 2017-Latest-VCS-273-Exam    | Dumps-200-355-exams-date    | 2017-Latest-300-320-Exam    | Pass-300-101-Exam    | 100%-Pass-300-115-Exams    |
http://www.portvapes.co.uk/    | http://www.portvapes.co.uk/    |