Results 1 to 13 of 13

Thread: Ideal size for the swap file of the virtual memory...

  1. #1
    Senior Member retroborg's Avatar
    Join Date
    Aug 2003
    Posts
    679
    Thanks
    19
    Thanked
    19 times in 13 posts

    Ideal size for the swap file of the virtual memory...

    My system:

    WinXP PRO SP-2
    P4 2.4GHZ 400MHZ FSB
    768MB RDRAM (Rambus) 400MHZ
    GeForce4 Ti 4200 128MB AGP 8X
    Seagate IDE 120GB + 200GB HD 7200RPM

    What’s the ideal size for the swap file of the virtual memory for my rig?
    Should I set it to “System Managed”, or 1536MB – 2304MB & why?
    Also, should I place the swap file into the “C:” partition where the OS is, or should I place it into one of the “outer” partitions?

    Primary Master 120GB HD is divided Into:
    C:\ 15GB (OS WinXP partition)
    D:\ 40GB
    E:\ 65GB

    Secondary Master 200GB HD is divided Into:
    H:\ 100GB
    I:\ 100GB

    Thanks in advance.

  2. #2
    Registered+
    Join Date
    Dec 2003
    Location
    London, UK
    Posts
    46
    Thanks
    1
    Thanked
    1 time in 1 post
    • Fuzz's system
      • Motherboard:
      • Asus P5E-VM HDMI
      • CPU:
      • Intel Core2Duo E8400 @ 3.0GHz
      • Memory:
      • DDR2-800 4GB
      • Storage:
      • 1 x Crucial C300 128GB SSD, 1x 1TB Samsung 2.5" HD
      • Graphics card(s):
      • Onboard Intel X3500
      • PSU:
      • Corsair 620W
      • Case:
      • Silverstone SG03B
      • Operating System:
      • Windows 7 Ultimate
      • Monitor(s):
      • Sony SDM-P234 23"
      • Internet:
      • O2 11Mb

    Question

    RAM x 1.5 = Swap File size (or so I've read in a lot of places)

    so

    768 x 1.5 = 1152MB

    Set it to a set amount of 1152 - 1152. The reason for this is so that the page file wont get fragmented by changing size all the time. It also makes your system faster as XP doesn't have to keep resizing your page file.

    Where to store it?

    On your secondary Master 200GB HD (Drive H).
    As you have more then 1 phyiscal HD always put it on the one where Windows isn't stored. (Unless your Windows HD is uber fast and the other is an ancient slow HD which is about to die!)
    Putting it on one of the partitions of the Windows HD (in your case your primary 120GB HD) is just the same as putting it on the C drive itself.
    Remember that while reading the partitiions windows can't really read your c drive which will have an impact on your systems performance even if you have windows installed on a WD Raptor HD.

    I'll give you an example. My HD set up is as follows. (All drives are SATA)

    My system has 2GB of RAM DDR 400 with a Page File of 3072MB
    2 x WD 74GB Raptor HD - one is drive C with windows on it and the other is drive D with My Documents and some other stuff on it.
    2 x Samsung 160GB Spinpoint HD - Set as Raid 0 to give me a 298GB HD in windows (Drive R) containing DV / AV files from my camcorder. Also my Page file is located on this Raid array.

    Normally my swap file is set as inital - max size = 3072 - 3072 on Drive R (My Raid 0 array). This keeps the Page file in one piece as windows isn't trying to resize it all the time.

    Last week I put the swap file on the C drive as I had to pull the Samsungs out for a upgrade (my D drive is full in case you're wondering).
    Now while it was on the C drive I noticed a performance drop (I use the sleep and resume function a lot), it wasn't due to fragmentation as my drives are defragged every couple of days but simply due to windows being on the same drive).
    Now I've got 2 x 250GB Samsungs set up as Raid 0, again the performance drop was still there.
    It wasn't untill I moved the Page file from the Windows HD did the performance drop disappear, which shows you can have the fastest HD on the market but you will still get a perforance hit.

    Anyway I hope that helps you out mate!

  3. #3
    Senior Member retroborg's Avatar
    Join Date
    Aug 2003
    Posts
    679
    Thanks
    19
    Thanked
    19 times in 13 posts
    Yes!
    That was one of the most helpful & straight forward post I've read on this subject from 10 different forums!

    Thanks a lot!

  4. #4
    Nox
    Nox is offline
    Vorsprung durch Technik
    Join Date
    Oct 2003
    Location
    Hampshire
    Posts
    2,023
    Thanks
    2
    Thanked
    2 times in 2 posts
    • Nox's system
      • Motherboard:
      • Yes
      • CPU:
      • Yes
      • Memory:
      • Yes
      • Storage:
      • Yes
      • Graphics card(s):
      • Yes
      • PSU:
      • Yes
      • Case:
      • Yes
      • Monitor(s):
      • Yes
      • Internet:
      • Yes
    this is a topic that will get you 50 different answers!

    Fuzz is right in saying to set the size static so it won't change, but as for the actual size of it my opinion differs.

    If you were to ask me, i'd say its to do with what apps you run. Take a look at your page file, see how much your pc is using it - then go and do your regular stuff for a few hours. Don't close anything, but look back at your pagefile. See how much is being used now, and set the size to around 10-20% larger than is currently being used. If you start getting out of memory messages, up it by another hundred megs until they stop.

    A static multiplier is a bit daft I would of thought - i have 2gb of memory, so adding a 3gb pagefile would give me 5gb total? Fine, except I probably only run the same things as people with 1gb (2.5 total) wasting space and potentially performance if the machine decides to use the 3gb pagefile rather than memory!

    It should also be stored on the fastest part of the fastest HD.

    Nox

  5. #5
    Ex-MSFT Paul Adams's Avatar
    Join Date
    Jul 2003
    Location
    %systemroot%
    Posts
    1,926
    Thanks
    29
    Thanked
    77 times in 59 posts
    • Paul Adams's system
      • Motherboard:
      • Asus Maximus VIII
      • CPU:
      • Intel Core i7-6700K
      • Memory:
      • 16GB
      • Storage:
      • 2x250GB SSD / 500GB SSD / 2TB HDD
      • Graphics card(s):
      • nVidia GeForce GTX1080
      • Operating System:
      • Windows 10 x64 Pro
      • Monitor(s):
      • Philips 40" 4K
      • Internet:
      • 500Mbps fiber
    Paging file size & location, always a topic bound to create much debate

    For location, Fuzz is spot-on - use the fastest drive possible, ideally on a separate channel as well as separate physical disk to the OS, RAIDed if possible.

    For size, as Nox pointed out the more physical memory you have, the less likely you are to need virtual memory, so basing the paging file size on the amount of RAM doesn't make sense.

    Use PERFMON to monitor the counter "Paging File / % Usage Peak", run this in the background for a while as you hammer your system - load all the apps you normally run at the same time and then check out what the peak value is.
    If you're running at around 75% usage then I would say that is pretty much spot-on, allowig a little headroom for other apps or upgraded versions of your current apps in the future which are more memory intensive.
    If your paging file usage is really low then you can safely reduce the size.


    Things to bear in mind:
    - a larger than necessary paging file makes no impact on system performance (good or bad)
    - a smaller than necessary paging file will introduce "running low on virtual memory" messages
    - extending a paging file at a later date may make it fragmented
    - a dynamic paging file will only use the space it needs (within bounds) so makes better use of disk space, at the possible cost of having a partially-fragmented swap file when there is a huge amount of virtual memory in use
    - is disk space that expensive a commodity these days?


    Random notes:
    Windows will use physical memory where possible, it won't use virutal memory "because it is there" - memory chunks get paged to disk when it is either needed (all physical memory in use) or during a cleanup operation when "standby" memory is paged out - this is memory that has not been used in a while or belongs to minimised apps.

    The virtual address space of most 32-bit apps is 2GiB, so if you have this much physical memory then when single-tasking you should see a lot less paging for resource-intensive apps.
    As an example, runing Star Wars Galaxies on 2GiB machine after having only 1GiB previously was an insane difference - when moving between planets the OS only has to read in data from the disk instead of having to simultaneously read data & read/write the paging file.

    If you completely remove the paging file from the system disk then you can't do a kernel dump in the event of a bugcheck, but this won't affect most people as they don't know how to use the debugger to analyse the dump anyway.
    Last edited by Paul Adams; 11-10-2005 at 09:03 AM.
    ~ I have CDO. It's like OCD except the letters are in alphabetical order, as they should be. ~
    PC: Win10 x64 | Asus Maximus VIII | Core i7-6700K | 16GB DDR3 | 2x250GB SSD | 500GB SSD | 2TB SATA-300 | GeForce GTX1080
    Camera: Canon 60D | Sigma 10-20/4.0-5.6 | Canon 100/2.8 | Tamron 18-270/3.5-6.3

  6. #6
    Seething Cauldron of Hatred TheAnimus's Avatar
    Join Date
    Aug 2005
    Posts
    17,168
    Thanks
    803
    Thanked
    2,152 times in 1,408 posts
    A lot of people who still keep a pagefile with 2gig-o-ram, don't actually need a pagefile still.

    As Paul said, check what you need, you can save disk space, performance, boy does it save performance.

    I did some benching on a RAID-5 of 15krpm drives, to see what happens when i remove a pagefile on a system with 2gig of ram, running some 80 proccesses, a few mimimized (windows is page happy with apps that haven't been used lately, when the system is idle, this is a good thing!) the performance differnce was quite stricking. If you use something like "filemon" from sysinternals.com you can see just how many requests that file gets. This really does impact performance quite strickingly.

    The upshot of my benches (which were to prove a point to a client) was that its better to have enough ram to not need a pagefile, than to have a 0.4ghz speed increase on the CPUs. Now hopefully this isn't a suprise, and i didn't bench this with gaming, this was an overall server type benchmark (SQL, AD, and AniDBG).

    But when you think how cheap 2gig of ram is now adays! (heck my laptop runs happily without a pagefile on 1gig, until i need to run HL2).
    throw new ArgumentException (String, String, Exception)

  7. #7
    Senior Member retroborg's Avatar
    Join Date
    Aug 2003
    Posts
    679
    Thanks
    19
    Thanked
    19 times in 13 posts
    So if the physical RAM is 256MB, the ideal swap file should be 1.5 X 256 = 384MB, fixed for both initial size & Max size?

    Or 2.5 X 256 = 768MB fixed for both Min & Max?

  8. #8
    Registered+
    Join Date
    Dec 2003
    Location
    London, UK
    Posts
    46
    Thanks
    1
    Thanked
    1 time in 1 post
    • Fuzz's system
      • Motherboard:
      • Asus P5E-VM HDMI
      • CPU:
      • Intel Core2Duo E8400 @ 3.0GHz
      • Memory:
      • DDR2-800 4GB
      • Storage:
      • 1 x Crucial C300 128GB SSD, 1x 1TB Samsung 2.5" HD
      • Graphics card(s):
      • Onboard Intel X3500
      • PSU:
      • Corsair 620W
      • Case:
      • Silverstone SG03B
      • Operating System:
      • Windows 7 Ultimate
      • Monitor(s):
      • Sony SDM-P234 23"
      • Internet:
      • O2 11Mb
    How much does Windows recomend when you're looking at the V.M. window?

  9. #9
    Senior Member retroborg's Avatar
    Join Date
    Aug 2003
    Posts
    679
    Thanks
    19
    Thanked
    19 times in 13 posts
    For the 256MB system it recommends: 384 min / 768 max
    For the 768MB system it recommends: 1152 min / 2304 max

    I think I should set the VM at 768MB fixed & 2304MB fixed, for each system separately...

  10. #10
    Nox
    Nox is offline
    Vorsprung durch Technik
    Join Date
    Oct 2003
    Location
    Hampshire
    Posts
    2,023
    Thanks
    2
    Thanked
    2 times in 2 posts
    • Nox's system
      • Motherboard:
      • Yes
      • CPU:
      • Yes
      • Memory:
      • Yes
      • Storage:
      • Yes
      • Graphics card(s):
      • Yes
      • PSU:
      • Yes
      • Case:
      • Yes
      • Monitor(s):
      • Yes
      • Internet:
      • Yes
    see comments above!

    looking at my system currently - my pagefile is 4gb large (wow lol!) and 1.1gb is in use. Why the hell is windows using all that in a page file when my system memory has over 900mb available???

    Nox

  11. #11
    Ex-MSFT Paul Adams's Avatar
    Join Date
    Jul 2003
    Location
    %systemroot%
    Posts
    1,926
    Thanks
    29
    Thanked
    77 times in 59 posts
    • Paul Adams's system
      • Motherboard:
      • Asus Maximus VIII
      • CPU:
      • Intel Core i7-6700K
      • Memory:
      • 16GB
      • Storage:
      • 2x250GB SSD / 500GB SSD / 2TB HDD
      • Graphics card(s):
      • nVidia GeForce GTX1080
      • Operating System:
      • Windows 10 x64 Pro
      • Monitor(s):
      • Philips 40" 4K
      • Internet:
      • 500Mbps fiber
    Quote Originally Posted by Nox
    looking at my system currently - my pagefile is 4gb large (wow lol!) and 1.1gb is in use. Why the hell is windows using all that in a page file when my system memory has over 900mb available???
    A couple of things I can think of straight off:

    Paged pool memory is is allocated at system boot and user mode processes can select to reserve various sized chunks of this type of memory, for example for user session settings.
    It is a region of virtual memory in system space that can be paged in and out of the system. Device drivers that don't need to access the memory from DPC/dispatch level or above can use paged pool.

    Processes running which have reserved/committed memory which has not been used for a while (or the application is minimized) so it is marked as "standby" - periodically (or when required) standby memory is paged to disk to make the most physical memory free for those that need it.


    If you write a program which allocates, say, 1GiB of memory and then sits there doing nothing, even if there is 32GiB free of physical memory it will still get paged out eventually if it is not used.

    A new process that is spawned will check for free memory in 3 ways, in order of preference:
    - first it looks for "zeroed" pages, which is memory that has been securely wiped and is ready for use
    - then it checks for "standby" pages, which still contain data from other processes and have to be zeroed before they can be used
    - then it aggressively prunes running processes to reduce their working sets (physical memory in use) and create some pages to zero and use

    If you minimise an app, the working set is massively reduced as the bulk of the pages are flagged as standby.
    ~ I have CDO. It's like OCD except the letters are in alphabetical order, as they should be. ~
    PC: Win10 x64 | Asus Maximus VIII | Core i7-6700K | 16GB DDR3 | 2x250GB SSD | 500GB SSD | 2TB SATA-300 | GeForce GTX1080
    Camera: Canon 60D | Sigma 10-20/4.0-5.6 | Canon 100/2.8 | Tamron 18-270/3.5-6.3

  12. #12
    Illegal Alien wedge22's Avatar
    Join Date
    Jul 2003
    Location
    Vancouver
    Posts
    1,947
    Thanks
    1
    Thanked
    0 times in 0 posts
    • wedge22's system
      • Motherboard:
      • ASUS H87i PLUS
      • CPU:
      • 4770k
      • Memory:
      • 2x4GB Crucial Ballistix DDR3
      • Storage:
      • OCZ 240GB SSD and Seagate 3TB HDD
      • Graphics card(s):
      • PNY GTX 780 OC
      • PSU:
      • Silverstone SFX 450G
      • Case:
      • Fractal Node 304
      • Operating System:
      • Windows 8.1
      • Monitor(s):
      • Yamakasi 27" IPS and 1080p 100" Projector
      • Internet:
      • 50MB
    Is it worth setting VM to system managed size at all?
    Main Rig: i2600k@4.3Ghz/ASUS P8P67 PRO/MSi GTX580/16GB Mushkin/HAF X/Noctua NH-D14

  13. #13
    Senior Member
    Join Date
    Oct 2005
    Posts
    589
    Thanks
    12
    Thanked
    32 times in 19 posts
    Is PERFMON the best application to find the ideal page file size?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 63
    Last Post: 14-11-2011, 09:17 AM
  2. Nero vision express saying:'Burn process failed'
    By johnnr892 in forum Help! Quick Relief From Tech Headaches
    Replies: 15
    Last Post: 11-12-2005, 11:43 PM
  3. Page File Size in WinXP..
    By Starburn in forum Software
    Replies: 15
    Last Post: 26-04-2005, 11:03 AM
  4. Nero or Burner ?
    By Foxile in forum Help! Quick Relief From Tech Headaches
    Replies: 30
    Last Post: 04-04-2005, 07:31 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •