RAM and Swap File

Moderator: jsachs

Post Reply
tomczak
Posts: 1370
Joined: April 25th, 2009, 12:56 am
What is the make/model of your primary camera?: Fuji X-E2
Contact:

RAM and Swap File

Post by tomczak »

There is tons of conflicting advise on it out there, the most thoughtful of which seems to be: http://blogs.technet.com/b/markrussinov ... 55406.aspx

But I'm still lost - what would be a good approach (the system has 8Gb RAM, and Windows7/64 seems to allocate 1.5 times that for Swap file automatically):

1) leave the windows alone?
2) set it to some min=1024, max=2048, or such, and see what happens?
3) turn virtual memory off altogether (which appears not to be a good idea according to the above...)?

Cheers!
Maciej Tomczak
Phototramp.com
jsachs
Posts: 4220
Joined: January 22nd, 2009, 11:03 pm

Re: RAM and Swap File

Post by jsachs »

On 32-bit systems, I always set the swap file to the max allowable - 4GB.
Jonathan Sachs
Digital Light & Color
mjdl
Posts: 80
Joined: April 25th, 2009, 12:35 pm
What is the make/model of your primary camera?: Nokia N8-00

Re: RAM and Swap File

Post by mjdl »

Wild speculation on my part, since I've never really looked into the question, but if PWP (x64 version) is actually writing temporary files somewhere on disk while processing images, rather than just keeping everything in memory (much faster!) and allocating/re-allocating memory as required, then experimenting with placing those temporary files on a so-called "ramdisk" may be a worthwhile excursion to see if you can achieve a speed-up.--Of course, only do this if PWP allows specifying where it writes temporary files on disk, since putting your entire %TEMP% directory in memory probably would not be a good idea.

Wikipedia has a summary article on what software is available, and some of it is free: https://en.wikipedia.org/wiki/List_of_R ... e_software

There's also a remark on that page: [quote]Windows also has a rough analog to [the Unix] Tmpfs in the form of "temporary files". Files created with both FILE_ATTRIBUTE_TEMPORARY and FILE_FLAG_DELETE_ON_CLOSE are held in memory and only written to disk if the system experiences low memory pressure. (See http://msdn.microsoft.com/en-us/library ... g_behavior) In this way they behave like tmpfs, except the files are written to the specified path during low memory situations rather than swap space. Maybe PWP could use such a strategy for all temporary files.
jsachs
Posts: 4220
Joined: January 22nd, 2009, 11:03 pm

Re: RAM and Swap File

Post by jsachs »

The big advantage of 64-bit Windows is that it breaks the 2GB/application limit imposed by 32-bit Windows. Thus if you have a machine with say 8GB of RAM, PWP can use much more RAM before having to swap. Keeping your swap file on a SSD might also be a good idea, but there is some debate as to whether it might decrease the lifespan of the drive as they are rated for fewer read/write cycles than a hard drive. First choice with 64-bit Windows would be more RAM rather than a SSD.
Jonathan Sachs
Digital Light & Color
mjdl
Posts: 80
Joined: April 25th, 2009, 12:35 pm
What is the make/model of your primary camera?: Nokia N8-00

Re: RAM and Swap File

Post by mjdl »

I have to apologize for my reply above, it's irrelevant to the original query. Saturday afternoon mind wanderings...

Back in the Windows 2000 days, a standard piece of advice was to set the max. and min. size of the swap file to the same fixed value, to avoid any unnecessary expansion/contraction of the swap file which might become fragmented and thus incur more disk head movements--but I doubt whether any practical difference could be observed back then and certainly now with far faster mechanical disks!
Post Reply