3

How can I limit the size of c:\swapfile.sys?

I would expect wmic swapfileset to work, but it doesn't exist:

wmic swapfileset where name="c:\\swapfile.sys" set initialsize=1000,maximumsize=1000
swapfileset - Alias not found.

If I can't limit it I'll disable it

if I can't limit its size I'll probably disable it as described in https://superuser.com/a/512209/128465

It's killing my SSD

The Photos app uses 4GB memory:

wmic process get CreationDate,Name,PageFileUsage,PeakPageFileUsage | grep PhotosApp
20150129004217.258444+060  PhotosApp.exe                    2659428        4289992

Windows moves this to swapfile.sys when the app isn't used for a while. It bothers me that Windows is frequently writing 4GB to my SSD, because it cant handle more than 100TB writes

dir /ah %systemdrive%\swapfile.sys | tail -3 | head -1
2015-01-29  14:59     3 103 784 960 swapfile.sys

My speccy output:

Operating System
    Windows 8.1 Enterprise 64-bit
CPU
    Intel Core i7 3770K @ 3.50GHz   37 °C
    Ivy Bridge 22nm Technology
RAM
    32,0GB Dual-Channel DDR3 @ 668MHz (9-9-9-24)
Motherboard
    ASUSTeK COMPUTER INC. P8Z77-M PRO (LGA1155) 31 °C
Storage
    232GB Samsung SSD 840 EVO 250GB (SSD)   27 °C
    3726GB Seagate Expansion Desk USB Device (USB (SATA))   47 °C
John Peterson
  • 187
  • 3
  • 12
  • possible duplicate of [How to disable swapfile.sys on Windows 8?](http://superuser.com/questions/512141/how-to-disable-swapfile-sys-on-windows-8) – Ramhound Jan 29 '15 at 16:31
  • @Ramhound how is limiting its size the same as disabling it? – John Peterson Jan 29 '15 at 16:40
  • magicandre1981's answer explains what to do. – Ramhound Jan 29 '15 at 16:58
  • 2
    IMO, you're being a little paranoid/unrealistic about your SSD's life expectancy. – Ƭᴇcʜιᴇ007 Jan 29 '15 at 19:27
  • Related: [What is the purpose of “C:\swapfile.sys” in Windows 8?](http://superuser.com/questions/483302/what-is-the-purpose-of-c-swapfile-sys-in-windows-8) – Ƭᴇcʜιᴇ007 Jan 29 '15 at 19:29
  • @Ƭᴇcʜιᴇ007 source? my 100 tb source is https://www.google.com/search?q=ssd+endurance+experiment https://www.google.com/search?q=The+Samsung+840+Series+started+reporting+reallocated+sectors+after+just+100TB – John Peterson Jan 30 '15 at 20:05

0 Answers0