The page file controversy on an SSD!?

Discussion in 'Operating Systems' started by G73S, Mar 14, 2012.

  1. G73S

    G73S Senior member

    Joined:
    Mar 14, 2012
    Messages:
    635
    Likes Received:
    0
    I have read numerous articles by searching on google.....

    some say that even if you have enough RAM and will probably never use a page file, it is best to set it to 1024 min / max or 2048 min / max just incase any ancient program keeps looking for a page file. I have never run across this situation but I used to keep my pagefile to 1024 min / max

    now that I have upgraded to an SSD, I read that putting a pagefile on an SSD is bad as it may degrade the life of the SSD due to constant reads/writes

    I am very confused now.......what shall I do?

    Disable the SSD since I have 16 GB of DDR3 RAM? Or set it to 1 GB on the SDD? or set it to 1 GB on my secondary 7200 RPM Seagate Momentus XT? or what do you think?

    There isn't one thread I read that has the same answer,,everyone keeps saying something different.

    And for the life of me I can't figure out why does Microsoft by default set the pagefile to the same size as your RAM...I mean it's pretty dumb to have 4 or 8 or even 16 GB of RAM + a 16 GB pagefile......like holy crap who would ever use that? Doesn't the RAM flush itself anyway when it's out of space?

    PS: I don't play any games, all I do is surf the net on firefox, period

    My system specs:
    ASUS G73Sw
    • Intel Core i7 2630QM @ 2.0/2.9 GHz.
    • 16 GB DDR3 1333 MHz. SDRAM
    • nVIDIA GeForce GTX 460M 1.5GB GDDR5 VRAM
    • 17.3" 16:9 HD+ (1600x900) Screen
    • Kingston KC100 120GB SSD + Seagate 500GB 7200RPM SSH
    • Windows 7 Home Premium (x64)
     
  2. lxskllr

    lxskllr Lifer

    Joined:
    Nov 30, 2004
    Messages:
    44,627
    Likes Received:
    85
    I'd put the page file on a platter drive if you have one in the system. If not, maybe you could put it on a thumb drive, or SDcard. I don't remember if you can do that in Windows or not. I think the damage due to SSD writes is overstated. It does wear it out, but by the time it does, you'll be ready for a new drive anyway. That said, there's no point in causing needless wear, and it seems like Windows will always use a pagefile, no matter how much ram you have.
     
  3. Nothinman

    Nothinman Elite Member

    Joined:
    Sep 14, 2001
    Messages:
    30,672
    Likes Received:
    0
    Windows may proactively throw some data into the pagefile to save I/O later on, but it won't use it for no reason at all and if you've got "constant reads/writes" your workload is too much for the memory in your system.

    It's a good idea to put it on a secondary drive to save space on the SSD, but that's about it.
     
  4. sm625

    sm625 Diamond Member

    Joined:
    May 6, 2011
    Messages:
    7,767
    Likes Received:
    22
    I just put my pagefile on the SSD. I have 3 machines set up that way. Even if it reduces the life of the SSD, we're talking about going from 30 years to 10 years at worst. Any modern SSD is going to handle the wear very intelligently. And with many SSDs you can even find out how worn it is. If after a couple years you see that 20% of the NAND is no longer any good, you might want to start worrying. So far I have not seen any real reason to bother. Chances are you wont be happy with the drive's performance after a few years and will upgrade anyway, so its kind of a moot point.

    Here is a screen shot from the ssdlife utility:

    [​IMG]
     
  5. boochi

    boochi Senior member

    Joined:
    May 21, 2011
    Messages:
    984
    Likes Received:
    0
    Set your page file to the smallest windows recommended setting which should be 800MB if you are running 16GB.
     
  6. Bubbaleone

    Bubbaleone Golden Member

    Joined:
    Nov 20, 2011
    Messages:
    1,792
    Likes Received:
    2
    From MSDN:

    Microsoft minimum paging file recommendation: Installed memory capacity x 1.5 = paging file size.

    Microsoft maximum paging file recommendation: Installed memory capacity x 2.0 = paging file size.

    16GB x 1.5 = 24,576 MB

    16GB x 2.0 = 32,768 MB


    I never put the paging file on the system drive, whether SSD or HDD. Put it on your HDD.
     
    #6 Bubbaleone, Mar 14, 2012
    Last edited: Mar 14, 2012
  7. Nothinman

    Nothinman Elite Member

    Joined:
    Sep 14, 2001
    Messages:
    30,672
    Likes Received:
    0
    And experience and common sense say that with those memory sizes, if you're using the pagefile enough to require it to be 1.5x the size of your virtual memory that the system will be unusable because it will constantly paging instead of doing real work.

    The only time you need the pagefile to be at least the same size as your physical memory is if you want a full memory dump on STOP. Otherwise, set it to something more reasonable like 1G or 2G and set the max to something higher to allow for expansion in case something does go nuts. But in practice you're still probably better off letting the process eating all of that memory get killed than making the system unusable and effectively DoSing yourself.
     
  8. Bubbaleone

    Bubbaleone Golden Member

    Joined:
    Nov 20, 2011
    Messages:
    1,792
    Likes Received:
    2
    This ^........ :D Just wanted the documentation out there for consideration.
     
  9. sm625

    sm625 Diamond Member

    Joined:
    May 6, 2011
    Messages:
    7,767
    Likes Received:
    22
    Here is the ssdlife report on the drive I been using for 5 months:

    [​IMG]

    edit: It had a 2GB pagefile from day 1.
     
    #9 sm625, Mar 14, 2012
    Last edited: Mar 15, 2012
  10. Bubbaleone

    Bubbaleone Golden Member

    Joined:
    Nov 20, 2011
    Messages:
    1,792
    Likes Received:
    2
    This topic has really caught my interest. I want to know more...and why! So I went looking for the most up-to-date info on the hows and whys about paging files, and I found this very recent and concise article that throws out all the out-of-date garbage, gets down to practical up-to-date facts, and directly answers the OP's questions:

    How To Size Page Files on Windows Systems

     
    #10 Bubbaleone, Mar 14, 2012
    Last edited: Mar 14, 2012
  11. Phynaz

    Phynaz Diamond Member

    Joined:
    Mar 13, 2006
    Messages:
    8,941
    Likes Received:
    85
    Put the page file on your SSD. You bought the SSD to go fast, right?
     
  12. SimMike2

    SimMike2 Platinum Member

    Joined:
    Aug 15, 2000
    Messages:
    2,575
    Likes Received:
    1
    I refuse to baby my SSD. I put virtually everything except large video files and my download directory on the drive. Anything less would be like people putting that ugly uncomfortable plastic on their couches.
     
  13. G73S

    G73S Senior member

    Joined:
    Mar 14, 2012
    Messages:
    635
    Likes Received:
    0
    After reading a myriad of articles on various sites/forums

    I ended up setting the Pagefile to 1024 min/max on the SSD C: Partition as my pagefile will rarely if ever be used

    A quote from Microsoft/Technet forums;
     
  14. entfy

    entfy Junior Member

    Joined:
    Mar 13, 2012
    Messages:
    17
    Likes Received:
    0
    For the amount of memory you virtually have access to, the necessity for a pagefile is moot. You might as well allow the maximum allowable amount on your ram as you will never be able to use such a massive amount. Also with the new SSD caching that is what I'm getting ready to do. I have taking my 120gb ocz ssd partitioned in in half installing the base necessities on the ssd partition and then have the other half combined with my 1tb hdd for the 56gb maximum allowable cache. What ever you use most often will be stored on the ssd and the page file will never be touch as it would most likely save the page file on the SSD to begin with as it is the most commonly used file.
     
  15. jnewegger23

    jnewegger23 Member

    Joined:
    Jun 15, 2013
    Messages:
    32
    Likes Received:
    0
    I know this is over a year old but was easy to find off of google so others may still benefit. @g73s when you say 1024min/max you set both the min and the max the same at 1024? Would it be better to make the min 16 or 0 and the max 1024? I just am not clear on the concept as what if the page file is not exactly 1024, wouldn't a range be better? Simply put does anyone have a different min and max as opposed to setting both the same? I'm guessing there' s a reason there's a range. Any light on this would be much appreciated! Thanks!
     
  16. lxskllr

    lxskllr Lifer

    Joined:
    Nov 30, 2004
    Messages:
    44,627
    Likes Received:
    85
    Setting the same min/max made more sense on platter drives. It was done to prevent fragmentation, and theoretically speed performance. That isn't a concern on SSDs, so different min/max might be better. It'll potentially save space, and distribute wear. I doubt it matters much, but I'd give it range if I were setting it up today on Windows with a SSD.
     
  17. powerhouse65

    powerhouse65 Junior Member

    Joined:
    Dec 29, 2013
    Messages:
    24
    Likes Received:
    0
    Why is Windows so complicated? Anyway, here is what I remember:

    1. If you have a notebook or let your computer hibernate, the page file size should be the size of the RAM plus a few MByte.
    2. Given enough RAM, under Linux I would reduce the "swapiness" - I don't know if Windows has anything similar.
    3. If you got Windows 7 or later, put the page file on SSD - it should be able to deal with an SSD properly. Use the Windows default.
    4. Make sure you don't fill up the SSD - there should always be some 20% or more free capacity. This will ensure prolonged lifetime and increased performance.
    5. If possible, put your OS and programs on SSD, and store your data on an HDD. This will not only reduce the writes to the SSD (and prolong its lifetime), but it may also help protect your data. Why? When a SSD fails, all data is irrecoverably gone. With an HDD, you may get early symptoms/warnings when things start to fail, giving you an opportunity to backup your data. Data on a corrupted HDD can often be rescued.
     
  18. shortylickens

    shortylickens No Lifer

    Joined:
    Jul 15, 2003
    Messages:
    61,747
    Likes Received:
    174
    I have a leftover SSD I was thinking about using as a swap drive. Anybody else ever tried that?
     
  19. ashetos

    ashetos Senior member

    Joined:
    Jul 23, 2013
    Messages:
    203
    Likes Received:
    0
    I do the opposite of most people so feel free to flame me.

    In my experience, given enough memory, you can safely disable the pagefile in both Windows and Linux. I've done this in at least 10 systems.

    Now why would you want to disable it? Because the pagefile is not written only when you're out of memory, but also when you have plenty of free memory. You can check Resource Monitor and see that pagefile.sys gets written even when you have a lot of free memory.This happens so that if you eventually run out of memory you will have already moved enough data into the pagefile so as to deallocate buffers quickly and not cripple performance. The performance implication of having a pagefile is that your disk is constantly written and this increases disk response time when you actually need to use the disk to launch a program, to use an application cache etc. In my experience a pagefile decreases snappiness of Windows and makes laptops hotter due to constant disk activity. It also reduces SSD lifetime unnecessarily. Finally, it wastes disk space, which counts if you're on a small OS partition. You might want to disable hibernation for the same reason.

    What does enough memory mean? In my experience, for simple office work and browsing 4 GB is plenty of memory to safely disable the pagefile. If you are also gaming, you need at least 6 GB of memory to safely multitask. If you're a power user, you need to monitor your RAM usage anyway, so don't load 4 Virtual Machines and expect everything to go smoothly without a pagefile (or even with one). Linux is typically less resource hungry than Windows, so you can be OK for light work with 2 GB RAM and no swapfile with most Linux distributions.

    I'll close with the advantages of having a pagefile in Windows:
    1. When you're out of physical memory no processes have to die to free memory space.
    2. It allows for crash dumps if there is a BSOD.
    3. You have more free memory because buffers that are not used are swapped out (e.g. the bluetooth driver stack). Having more free memory also increases application throughput through file-system caching (response time/throughput tradeoff, I prefer response time so I disable the pagefile).
    4. It can absorb memory leaks of badly written applications.
    5. Allegedly, some applications don't work without a pagefile, never seen it though.
     
  20. imagoon

    imagoon Diamond Member

    Joined:
    Feb 19, 2003
    Messages:
    5,199
    Likes Received:
    0
    Windows isn't really complicated, it is complicated because some people perceive they are making massive improvements in performance messing with things.

    1) That is the hibernation file that needs to be the size of RAM. Swap can be disabled and you can still hibernate your machine. MS recommends the swap file be equal to ram + 300mb.
    2) I would need to dig around but there are registry keys that exist to change the swapiness of Windows.
    3) agree
    4) partly agree. Most drives have slack space so filling them to 100% shouldn't cause a problem.
    5) some what agree. Some SSD's give you warnings and go in to read only.
     
  21. ctk1981

    ctk1981 Golden Member

    Joined:
    Aug 17, 2001
    Messages:
    1,449
    Likes Received:
    0
    My last two systems in the past 5 years have had 16gb of ram. I disabled page file on both and have never encountered a problem because of it.
     
  22. Squeetard

    Squeetard Senior member

    Joined:
    Nov 13, 2004
    Messages:
    799
    Likes Received:
    5
    Same, no page file at all in Windows 7, since release. No issues. First system only had 6gb of ram too.
     
  23. Lat

    Lat Member

    Joined:
    Feb 18, 2012
    Messages:
    47
    Likes Received:
    0
    Yes, I bought my SSD for its speed. Thus, I stuck with the Samsung (I have an 840 Pro) recommendation of putting the page file on the SSD, 200 to 2000MB. I have 16GB of ram, for reference.

    Initially, I had your same concerns regarding the degradation of my SSD. What prompted me to not worry though was this:
    http://techreport.com/review/25559/the-ssd-endurance-experiment-200tb-update

    Honestly, even with TLC, you'll have plenty of writes and usage time before your SSD will ever have issues.

    Edit: whoops, there's a 500TB update for the SSD endurance test. http://techreport.com/review/25889/the-ssd-endurance-experiment-500tb-update
    That's 140GB of writes per day for 10 years!
     
    #23 Lat, Jan 10, 2014
    Last edited: Jan 10, 2014
  24. jnewegger23

    jnewegger23 Member

    Joined:
    Jun 15, 2013
    Messages:
    32
    Likes Received:
    0
    Wow, it looks like we revived this otherwise necropost!

    @Lat

    You're the only person I've seen list their min max values differently with a range! So, you decided on 200MB min to 2000MB. When I get to that field it makes sense to me to do it that way. Anyone else care to explain why it would be better to have the same min max vs a range like Lat? Due to lack of info out in the ether, I'm currently set with the min max at 1024. I'd like to change it to a range if someone could explain at least in theory why it would be better. For now, I'm going with majority rule for lack of better reasoning. I tend to upgrade parts within 2-5 years so I'm likely to upgrade before the ssd degrades too much and am not considering turning off page file atm. That said without arguing to turn off page file could anyone focus on the min max range settings further please! thanks!
     
  25. Virgorising

    Virgorising Diamond Member

    Joined:
    Apr 9, 2013
    Messages:
    4,470
    Likes Received:
    0
    Just found this, I thought it was interesting re what MS has done starting with W7:


    Superfetch Improvements For Windows 7
    "During Windows7 development, we made a number of improvements to how Superfetch manages memory. Many of these changes were directly in response to customer comments. At a high level, some of these improvements are as follows:
    (1) Be quieter: Even though Superfetch always utilizes low-priority I/O for its memory population in order to avoid interfering with foreground activity, we found that many users get annoyed at hearing the disk activity and seeing the disk light blink. In Windows7, Superfetch is a lot more respectful of user presence.
    (2) Be more selective: In Windows7, Superfetch still populates the OS cache with frequently-accessed data from the disk and prioritizes RAM contents, but the underlying algorithms have been improved over Vista. As a result, Superfetch now typically prefetches a smaller, but more relevant volume of data from the disk and prioritizes memory more effectively.
    Overall, our results (from a number of users over weeks) indicate that disk activity due to Superfetch is significantly lower in Windows7 compared to Vista while system responsiveness is much improved due to fewer hard page faults from the pagefile and other files." Mehmet Iyigun - Principal Development Lead at Microsoft