VOTE: where to place your virtual memory? (swap file)

View Poll Results: Swap file ideal configuration?

Voters
9. You may not vote on this poll
  • Let Windows manage the settings automatically (regardless of how many HDDs you have)

    3 33.33%
  • Keep your OS and swap on the same HDD, the usual configuration of one HDD

    1 11.11%
  • Separated: one for OS and data, and another for SWAP

    1 11.11%
  • SSD specifically, reduce the wear: keep your OS on the SSD, and SWAP on another drive

    1 11.11%
  • SSD: keep everything on the SSD, it wears down but it's way faster

    4 44.44%
Multiple Choice Poll.
Page 1 of 3 123 LastLast

  1. Posts : 132
    W10
       #1

    VOTE: where to place your virtual memory? (swap file)


    Hi everyone, what's the best place for your SWAP file (virtual memory?)

    Over many years most computers had only one hard drive and Windows would create a swap file on the same drive. This can be configured to have multiple swap files (letting Windows manage the disks and virtual memory), and you could also configure this to some extent. BUT... due to past prices, configurations, client decisions: the usual case was only one drive using virtual memory on that same drive.

    Now we have options.

    I have used in the past many computers (Windows, Mac, Linux, etc) with just one hard drive and virtual memory enabled on that same drive. However, with the introduction of SSD's, I configured my computers to have one main SSD and one extra HDD (mechanical), storing the virtual memory on the mechanical drive, why? to reduce the wear on the SSD while also increasing performance using 2 channels for data instead of one. Sure, 5000RPM HDDs would perform differently than 7200RPM (7200 is faster).

    But a mechanical HDD (7200RPM) is still slower than an SSD, perhaps... even storing the SWAP on the same SSD, the SSD wins?

    What do you think? While I have used this setup (multiple hard drives with separated SWAP, using none on SSDS), I'm now more curious about debating the topic. Yes, there are articles about this, but it's just general advice.

    - - - Updated - - -

    I haven't made any detailed or specific benchmarks, so far, to me separate drives work great.

    The only downside I see, is due to power savings: when the second disk is not used for a long time, it goes to sleep, and stays that way as long as the system doesn't need any swap, but the moment it does: it will pause for a bit while the disks wakes up. Yes this can be easily fixed turning off power savings for that disk.
      My Computer


  2. Posts : 6,345
    Windows 11 Pro - Windows 7 HP - Lubuntu
       #2

    hroldan said:
    I have used in the past many computers (Windows, Mac, Linux, etc) with just one hard drive and virtual memory enabled on that same drive. However, with the introduction of SSD's, I configured my computers to have one main SSD and one extra HDD (mechanical), storing the virtual memory on the mechanical drive, why? to reduce the wear on the SSD while also increasing performance using 2 channels for data instead of one..
    Virtual memory is normally very big (many G) and explorer shows that it is written at every boot.
    If you have more physical memory than you normally use, you don't need virtual memory. I have 8G and never seen more than half in use.
    Just in case, I have set may virtual memory to the HDD on a fixed value (16G) and nothing to the SSD. My M.2 SSD has 7 years and 96% still healthy.

    @hroldan, can you explain "also increasing performance using 2 channels for data instead of one"?
      My Computers


  3. Posts : 15,494
    Windows10
       #3

    Simple - nothing to debate.

    1 ssd + hdd, put it on SSD - far more efficient. Forget worrying about wearing out ssd - modern ssds have much better endurance than early gen 1 ssds

    2 ssds - does not really matter too much but you will probably get a marginal performance improvement if you put it on second ssd.

    I no longer use hdds for internal use on pc/laptops.

    I only use them (ones I removed from pcs) in usb enclosures as storage devices.

    In fact, I hardly even use conventional ssds if I can use an nvme drive.
      My Computer


  4. Posts : 15,494
    Windows10
       #4

    Megahertz said:
    can you explain "also increasing performance using 2 channels for data instead of one"?
    Using two drives is rather like driving on a dual carriageway i.e. you can process data on each drive in parallel.

    Of course, the benefit is somewhat marginal, as other aspects become the bottleneck e.g. cpu speed.
      My Computer


  5. Posts : 132
    W10
    Thread Starter
       #5

    Thanks for the comments!
    Megahertz said:
    @hroldan, can you explain "also increasing performance using 2 channels for data instead of one"?
    Yes, it's exactly as @cereberus says.

    Let's say you are writing 1G of data to a HDD, while Windows needs to write 250mb TO swap, and reading 250mb FROM swap. Using just 1 HDD means 1.5 gigabytes traveling via the same SATA port, and that can't happen all at once. So, having 2 HDDs for the same needs would mean using 2 different and independent SATA ports, one for 1G and another for the 250+250mb.

    Using 2 hdds removes the bottleneck. To be more specific, it removes 'that' bottleneck, and from that point, it would depend on your cache, RAM, CPU, etc to become the next bottleneck, but most times it's the HDD the one slowing everything down on modern hardware.
      My Computer


  6. Posts : 18,432
    Windows 11 Pro
       #6

    Megahertz said:
    Virtual memory is normally very big (many G) and explorer shows that it is written at every boot.
    You do realize that the entire swap file is not written at every boot. The only thing that happens at boot time is that space is reserved in the file allocation for the swap file. A few hundred KB at most is written for the swap file on boot, not several GB.
      My Computer


  7. Posts : 295
    Windows 10 Pro
       #7

    You can't move the swap location and never were able to move it. The choices are to turn it off or on PER DRIVE. Not pick and chose a drive. Many people who may not know any better may think that's wrong, but it's not. Look it up, do the research and prove me wrong from verifiable reputable sources (not public forums) with at least a well-worded four paragraph post.

    Also, you should just let Windows handle it. If you are using an old platter HDD for the OS, then set the min and max 1.5x the amount of RAM the swap same size to help reduce fragmentation. Though, there is even some debate on doing that rather than just let Windows handle the swap file.

    Here's a quick Google: https://answers.microsoft.com/en-us/...e-893f8328f347

    There is no real way to change where the file is stored, but you can no longer have it in place this way. Just make sure that there is still a swap file on the other drive.


    VOTE: where to place your virtual memory? (swap file)-gfyjtygy.jpg
      My Computer


  8. Posts : 295
    Windows 10 Pro
       #8

    Here's a possible hacky way of doing it.

    https://social.technet.microsoft.com...w8itproinstall
      My Computer


  9. Posts : 295
    Windows 10 Pro
       #9

    Megahertz said:
    If you have more physical memory than you normally use, you don't need virtual memory.
    Kinda, sorta yes, BUT! Swap should be on regardless because some programs are coded that say, "hey, where's your swap file?" and will fail due to the absence of a writable swap file. Not all programs are like that, but some are. So just keep swap on. I ran into this problem myself.
      My Computer


  10. Posts : 15,494
    Windows10
       #10

    F22 Simpilot said:
    You can't move the swap location and never were able to move it. The choices are to turn it off or on PER DRIVE. Not pick and chose a drive. Many people who may not know any better may think that's wrong, but it's not. Look it up, do the research and prove me wrong from verifiable reputable sources (not public forums) with at least a well-worded four paragraph post.

    Also, you should just let Windows handle it. If you are using an old platter HDD for the OS, then set the min and max 1.5x the amount of RAM the swap same size to help reduce fragmentation. Though, there is even some debate on doing that rather than just let Windows handle the swap file.

    Here's a quick Google: https://answers.microsoft.com/en-us/...e-893f8328f347





    VOTE: where to place your virtual memory? (swap file)-gfyjtygy.jpg

    I do not follow your point - here I selected E drive, managed.

    It does not matter from which drive has the pagefile drive from a functionality viewpoint, although there can be a performance gain moving it.

    Yu can even have multiple pagefile drives (one per drive) but many people think they are independent and related to the drive they are stored on. This is not the case.

    They are not - basically they are "containers" that get filled up sequentially i.e. if "RAM" is needed, one pagefile is used until it fills up, then the second one fills up and so on.

    All that is done is the extra "RAM" is spread across across multiple files - it is a bit like storing a zip file as multiple (chained) physical files. Nobody ever really splits zip files anymore - it was very common back in days of small usb flash drives.

    Finally, the pagefile is only a temporary file, so you cannot really physically move it per se. You can "effectively" move it by deleting it on old drive and recreating on on new drive.
    Attached Thumbnails Attached Thumbnails VOTE: where to place your virtual memory? (swap file)-page.png  
    Last edited by cereberus; 27 Oct 2023 at 13:28.
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 13:09.
Find Us




Windows 10 Forums