View Full Version : Pagefile ON or OFF for gaming?
Special_K
03-21-2006, 07:13 AM
this thread http://www.totalbf2.com/forums/showthread.php?t=63519 has a few suggestions for maximising gaming performance
what do you guys thunk?
do any of these suggestions have any merit?
mr_knowitall15
03-21-2006, 03:34 PM
it probably helps a little. personally, id rather NOT put up with the choppy BS that using the hard drive for memory causes(and losing some space), and just buy 2 gigs of memory. (Thats what i did a bit back actually) and for bf2, 2 gigs of RAM is HIGHLY reccomended. Photoshop likes it too.
i did a bit of experimentation on this a while back (pre BF2 days mind) going all the way from 256mb to 5gb page file, all i noticed was the effect after 1024mb was minimal if at all noticable, i currently run 768-1024mb pagefile but am thinkin of going the 2gb ram route, is it worth it? are loading times significantly improved? also can you get rid of pagefile completely with 2gb?
OmegaMerc
03-21-2006, 05:45 PM
I run my page file @ 2GB regardless. Some programs hack up a loogy if you don't give them page files, some don't start up at all.
HelloIDistance
03-21-2006, 06:06 PM
i did a bit of experimentation on this a while back (pre BF2 days mind) going all the way from 256mb to 5gb page file, all i noticed was the effect after 1024mb was minimal if at all noticable, i currently run 768-1024mb pagefile but am thinkin of going the 2gb ram route, is it worth it? are loading times significantly improved? also can you get rid of pagefile completely with 2gb?
Definitely go with the 2GB of RAM if you can. You can really tell the difference if you game, especially if you play BF2. I wouldn't get rid of the pagefile all together becuase like OmegaMerc said some programs won't run or run strangely without a pagefile.
Below is my standard blurb on why you should never turn the swapfile off.
The thing that "PC enthusiasts" often get wrong is speed of RAM. People think that running 30 MHz less RAM frequency, running 2T or running 3-4-3-8 instead of 2.5-3-3-8 will hurt their performance. It doesn't on AMD64, unless you have very special applications (such as cryptography or low-quality video encoding). For all real-world applications more RAM is always more valuable than the above factors. For AMD64, the situation is different on other CPUs.
--- begin copy-n-paste ---
You should never disable the swap space, unless you know for fact that
your OS makes bad decisions for your particular workload.
If you do not have swapspace you force your OS to never remove
junk from RAM, junk that it can prove will most likely never be
touched again (such as from processes that were used during startup
but now sleep until the end of the uptime).
Also, people thinking that they get a huge speedup from having no
swapfile usually don't understand that only anonymous and dirty pages
will end up in swapspace. Readonly and copy-on-write pages not yet
touched will never be moved to spawspace anyway, they are just dropped
and then read back from disk.
By not giving the OS swapspace you force it to go against its
own idea of what is good to do and drop more such readonly/non-dirty
pages of semi-active pages instead of doing the right thing of moving
proven most likely ever inactive dirty pages to swapspace - where they
belong.
Heretic
03-22-2006, 06:39 PM
The title is a bit misleading....you really never should disable your swap space (other than for maintenance/defragging). What the link suggests is setting a fixed size for your page file, which probably does increase performance, but not by much.
Coroner Kyle
03-22-2006, 07:08 PM
From my knowledge setting the page file to a single size where initial size equals max size helps with fragmentation of your drive. By never allowing the page file to change size it will not become fragmented because it never changes size and therefore your drive will become less fragmented and it will help shorten defrag times.
STEvil
03-22-2006, 09:48 PM
1024-1024 is what I use on all my systems.
Also, people thinking that they get a huge speedup from having no
swapfile usually don't understand that only anonymous and dirty pages
will end up in swapspace.
This is almost correct, pay attention to the column on the right. Each page fault is an access request by a program to ram for information it needs which was moved to the page file.
From my knowledge setting the page file to a single size where initial size equals max size helps with fragmentation of your drive. By never allowing the page file to change size it will not become fragmented because it never changes size and therefore your drive will become less fragmented and it will help shorten defrag times.
This is certainly true.
You never want a fragmented paging space (this is why Unix derivate by default use a partition, not a file).
If it is in a file, you should always set the page file to the maximum you think you will ever use while the drive is unfragmented and then lock it.
If you later need more you should delete the file entirely, defrag the drive (if neccessary copy back and forth to another partition or drive) and then create a new one from scratch.
If you have multiple harddrives, always enable paging space on all drives. Even when some of the drives are slower than others it is usually a huge advantage.
But keep paging space away from drives that are heavily active during program startup. During program startup you have lots of old stuff paged paged out to satisfy the needs of the starting program, and your boot drive will have a lot of random seeks when resolving dynamic library references and to load the program's configuration and code.
b1tterman
03-27-2006, 03:23 PM
try running operation: flaspoint without pagefile, for example, and you'll get the point
Deus Excalibur
03-27-2006, 05:19 PM
This is slightly off topic but now that the OPs question has been answered,
Would gaming/windows performance be faster if you run RAID 0
or
if you have one drive serve as a windows/game drive and the other as a page file drive?
I'm getting dual raptors soon and I'm trying to think what configuration to run them in :/
This is slightly off topic but now that the OPs question has been answered,
Would gaming/windows performance be faster if you run RAID 0
or
if you have one drive serve as a windows/game drive and the other as a page file drive?
I'm getting dual raptors soon and I'm trying to think what configuration to run them in :/
RAID0 is useless when your usage pattern is random seeks/reads from a single concurrent process (which is what the usage pattern of a starting game is).
For the purpose of fast program startup, it is a good idea to separate the OS installation with its heavily seeked in *.DLLs (or *.so) from other heavily accessed data during startup, in this case the game installation.
Unless you are very short on RAM, it will be better to separate game and OS installation instead of pagefile and OS installation.
Crankster
03-28-2006, 11:00 AM
There is notable differance between 2 and 4 gig's of ram in BF2.
Semper Fi
03-28-2006, 06:35 PM
even with 2 gigs of ram, EQ2 will crash on occasion saying it ran out of memory if swapfile is disabled.
NoDamage
04-01-2006, 06:00 PM
1024-1024 is what I use on all my systems.
This is almost correct, pay attention to the column on the right. Each page fault is an access request by a program to ram for information it needs which was moved to the page file.No, the vast majority of page faults (usually at least 90%+) are soft faults which are resolved in memory without requiring a disk read. You can verify this yourself using the pfmon.exe utility with comes with the Windows XP Support Tools. In Windows, the "Mem Usage" column of Task Manager corresponds to the size of the working set of the process - the current amount of physical memory allocated to the process. When Windows needs to trim the working set of a process, it will remove some of the pages from that working set and place it on the standby list. Pages in the standby list have been removed from the working set but have not been reallocated or overwritten. Thus, the page in question can still be resident in memory, despite not currently being in the working set of the process. If the process needs to access the page again, it is directly moved from the standby list back into the working set without incurring a disk read, because it was never actually removed from memory to begin with. This is known as a soft fault as opposed to a hard fault which does require a disk read.
Because of the way the virtual memory manager works, the vast majority of pages are either in the active list (corresponding to actual memory pages in use by various processes) or in the standby list. When a fresh page needs to be allocated, Windows will first look at the zeroed list or the free list before going to the standby list, so most of the time trimmed pages are still resident in memory and can be soft faulted back into the working set of the process without the disk read.
One last thing, since the Mem Usage column only describes the size of the working set of the process, it does not really describe the total memory usage consumed by the process. If you were to look at the total virtual address space consumed by each process, it would be significantly greater than what Task Manager's Mem Usage reports. Task Manager is fairly deceptive in this regard, which causes a lot of confusion regarding page files and virtual memory. (The Commit Charge listed in Task Manager doesn't correspond to the total memory usage of your system either, in reality virtually all of your physical RAM is being used either in the active list or standby list.)
Anyway, virtual memory in modern operating systems is pretty complicated and doesn't really work the way most people think it works. Disabling the page file does not disable paging because paging is an inherent aspect of modern memory management systems, and you really shouldn't disable the page file because disabling it doesn't actually do what you think it might do.
b1tterman
04-03-2006, 09:37 PM
even with 2 gigs of ram, EQ2 will crash on occasion saying it ran out of memory if swapfile is disabled.
after some hours of playing, true
KoHaN69
04-04-2006, 09:21 PM
when 2gb of Ram can run at 2.5-3-4-5 @300mhz, i will get it.
meanwhile 2x 512mb and using a 1gb of pagefil on a usb stick is ok for me.
vBulletin® v3.7.0, Copyright ©2000-2008, Jelsoft Enterprises Ltd.