Results 1 to 4 of 4

Thread: Windows Swap File

  1. #1
    Senior Member skozzy's Avatar
    Join Date
    Jan 2008
    Location
    Brisbane
    Age
    55
    Posts
    525
    Thanks
    31
    Thanked 19 Times in 16 Posts
    Rep Power
    217
    Reputation
    114

    Default Windows Swap File

    I have a laptop here which used to have 4gb ram and recently I upgraded it to 16gb, I left the swapfile running cause an application I use occasionaly needs it. But once it does use it the data stays in there even when there is ample ram free.

    I don't want to disable the swap file, but is there a way to trigger windows to put that data back in ram so the swap file usage is Zero. The laptop is a low spec machine with an AMD cpu. I have noticed that once the swapfile begins to fill up or be used the CPU usages increases, and I notice this even more when I set the power saving settings to force the CPU to run at 5% in the power options. Also tested CPU usage when the swap file was never used and there is a noticable difference. The application being used doesn't seem to suffer or feel laggy. It is more wanting to keep the CPU usage down.

    But if I have 6gb free and 3gb used on the swap file I would like to somehow be able to get that reloaded in ram so swapfile usage shows Zero. Is it possible.



Look Here ->
  • #2
    Premium Lager

    Join Date
    Jan 2008
    Age
    60
    Posts
    4,882
    Thanks
    1,635
    Thanked 2,711 Times in 1,230 Posts
    Rep Power
    1175
    Reputation
    40746

    Default

    Make your swap file in a virtual drive in your spare RAM. Will make access quicker.
    __________________________________________________ __
    Statistically, if you wait long enough, everything will happen!

  • #3
    Banned

    Join Date
    Feb 2012
    Posts
    2,361
    Thanks
    166
    Thanked 1,206 Times in 607 Posts
    Rep Power
    0
    Reputation
    16631

    Default

    The people who designed Windows OS system's behavior are not fools. Having a paging file gives the operating system more choices, and it won't make bad ones.

    Pagefile.sys is the place where Windows OS moves the least used "pages" of memory out to in order to free up more RAM for the applications you are actually using.
    So it should be clear that Pagefile.sys is filled up only when your Windows OS runs low on RAM.

    So wondering what sense does it make to re-locate / create a Pagefile.sys to / in RAM?

  • #4
    Senior Member

    Join Date
    Mar 2008
    Posts
    1,265
    Thanks
    139
    Thanked 643 Times in 368 Posts
    Rep Power
    455
    Reputation
    10815

    Default

    Actually Windows employs a pre-emptive paging system. The page table of all processes is periodically (and frequently) examined and all pages that have not been touched for a time (I'd have to look the interval up, google working set trimming if you are interested) are lazy written to the swap file and marked as available. There's not a lot that can be done to alter this behaviour. Even in a system that has 128 brazillion googlebytes of RAM, Windows will write most (there is a pool of non-swappable RAM) pages to the swap file. The idea behind this is that it permits Windows to quickly satisfy memory allocation requests even if all available RAM has been assigned already.

    Windows 8 introduced swapfile.sys for metro apps and other things.

    linux on the other hand is typically configured at the other end of the scale, write pages out to swap only on short falls. linux is highly configurable in this respect so you could adjust the kernel so that it works similarly to Windows but by the default found in most if not all is far closer to the other end of the scale.

    skozzy, the data is not actually being removed from RAM (unless something has made a request for RAM of course), it's just being pre-emptively written to the swap file so there's no need to read it back as such. If you want to lessen the likelihood of the RAM being allocated to something else, say caching, which means the pages would really have to be fetched from swap, look into turning off Windows' superfetch. It's a double edged sword though, turning off superfetch may well result in slower overall operation of the laptop. You can also change the memory allocation strategy used by Window on the Performance tab of system properties - programs or background services. This also fiddles with process scheduling and a few other things so that double edged sword is always lurking.
    Last edited by SpankedHam; 06-08-15 at 07:56 AM.

  • The Following 2 Users Say Thank You to SpankedHam For This Useful Post:

    jwoegerbauer (06-08-15),tristen (06-08-15)

  • Bookmarks

    Posting Permissions

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