Welcome, Guest. Please login or register.

Author Topic: Windows WITH a swapfile :-)  (Read 4312 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline Trev

  • Hero Member
  • *****
  • Join Date: May 2003
  • Posts: 1550
  • Country: 00
    • Show only replies by Trev
Re: Windows WITH a swapfile :-)
« Reply #14 from previous page: July 18, 2004, 02:20:48 AM »
You're only going to store one file (pagefile.sys) on this disk/partition, so storage lost to half-empty clusters isn't an issue. At most, you'll lose n-1 bytes, where n is the size of the cluster, plus the overhead of the file system and the directory entry. (Storage loss per file for a typical file system is normally n/2.)

Fragmentation will remain an issue, as the data written to the page file becomes fragmented over time, whether or not the page file itself is fragmented.

For best performance, you should use NTFS with 64K clusters. FAT partition performance degrades quickly with size. (Side note: never convert a FAT partion to NTFS, as the partition will always use 512 bytes clusters. Very poor performance.)

The size of the page file should be based on the memory requirements of your applications and is usually something like max(total, largest_allocated) - physical + 12 (i.e. the maximum of either the total amount of memory used by all applications or the largest block of memory allocated by a single application minus the amount of physical memory in the system plus 12).

If you intend to produce and debug system dumps, you must have a page file on your system disk. You'll get slightly better performance by using a separate partition. You'll only see increased performance on a separate ATA disk if you place the disk on its own channel.

Quick note. A page file is about allowing you to do more with less. A properly written application with accurate memory requirements souldn't suffer performance problems just because a page file exists on the system. Setting aside physical memory as a RAM disk for storing the page file just doesn't make sense. If you don't need the extra memory, remove it. If you don't need the page file, don't create one (or just use the minimum required).

And from the perspective of the FAT file system, 1GB is, as Mike Meyers would say, "Friggin' huge!"

Trev
 

Offline Waccoon

  • Hero Member
  • *****
  • Join Date: Apr 2002
  • Posts: 1057
    • Show only replies by Waccoon
Re: Windows WITH a swapfile :-)
« Reply #15 on: July 18, 2004, 07:40:23 AM »
Quote
Since 256 MB seems not to be enough for the hungry OS, I must live with a pagefile (virtual memory) bitting my disk

You can't really get rid of the swap file.  It's more of a cache of unused memory than a crutch for a lack of memory, and Windows will do strange things without it.

256MB isn't that bad, though.  If your system is really torturing your drive with swapping, you might need to ditch some background tasks that are really out of control.  Norton Antivirus is the biggest background task I have on my system, taking up 11MB (well, MySQL takes up 25MB, too).

Just don't point your browser to www.fails.org.  Both IE and Mozilla will suck up 300+MB of memory trying to display that page.  :-)

Quote
For best performance should I use FAT ?

FAT32 isn't much different in my tests than FAT16, but is more flexible.

Quote
Just defrag once a week or so.

Just so long as you use the 2K/XP defrag.  The 98/Me defrag is a horrible waste of time.  :-)

Quote
You'll soon end up with a dead flash card. IIRC flash memory can only handle a certain number of reads/writes before it burns out, a windows swap file will probably reach that limit reasonably quickly.

Most modern flash cards page the memory so all addresses are evenly used.  You won't have 100,000 writes at address 0 and 5 writes at the end of the card.

Seeing how the swap file is never 100% full (or even 10% full), I doubt this would kill a flash card.  As to WHY you'd put a page file on a sluggish flash card...

Quote
Yes, of course, for boot and data partitions, use NTFS, no doubt about it.

I use NTFS on my main drive and FAT32 on my backup.  My system almost never hits the drive, so I don't worry about performance tuning.

Quote
RAM SWAP

A cool idea only if you put a tiny primary swap in a RAM disk, and a secondary large swap on the drive.  Photoshop seems to like that, since it touches its proprietary swap file every time you click the mouse (which is REALLY annoying if you're doing pixel art for webpages!)
 

Offline whabang

  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 7270
    • Show only replies by whabang
Re: Windows WITH a swapfile :-)
« Reply #16 on: July 18, 2004, 03:06:13 PM »
@ptek
First of all, you should try to reduce Windows' memory usage; there are tonnes of services that isn't needed at all.

Having a small HD for caching and such is nice. A 1 gig HD would probably be slow as hell, but there are 40 giggers with 8 megs of cache. Many of them tend to be quite fast. Personally, I have never experienced any major benefit from setting the swap-file on a separate drive, though I try to reduce swap-file first.

HAving the swap-file on a RAM-disk is incredibly fast. Unfortunately, it only works with Windows 9x (AFAIK).
Beating the dead horse since 2002.