Amiga.org
The "Not Quite Amiga but still computer related category" => Alternative Operating Systems => Topic started by: ptek on July 17, 2004, 06:37:45 PM
-
Hi all,
I have a Athlon XP 2000+ machine with windoze XP and 256MB RAM.
Since 256 MB seems not to be enough for the hungry OS, I must live with a pagefile (virtual memory) bitting my disk :-)
So, I decided to create a extra partition for exclusive virtual memory use. This way, I prevent fragmentation on the system disk gaining some performance as you may already realized.
My big question is: Which filesystem should I use ?
I read somewhere that NT filesystem has more overhead than FAT32. And FAT32 in turn has more overhead than FAT.
For best performance should I use FAT ?
The partition is about 1GB, so FAT should handle it.
-
-
Personally i blame fragment for file fragmentation.
-
If you can put it on a diferent disk it would be a little better then if it was on the same disk but a different partition.
A long time ago I read an article that said you should put a pagefile on a FAT(32) formatted drive, tho I can't remember the reasons. I since put it on a NTFS partition (different disk then the partition XP lives) and don't notice any performance when it was on a FAT partition (which was the same partition only needed a fet NTFS permissions set on that one..).
-
What happens if you get a great big fat CF IDE and use that to hold your swapfile (having first given it a whole IDE chain to itslef ;-) )
-
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.
-
100.000 cycles are usually garantueed.
-
I cannot emphasize this enough: GO WITH NTFS. NTFS is a more secure file system, it keeps track of itself MUCH better than either FAT or FAT32, it can take random power loss on the chin and come right back, it doesn't fragment nearly as much as either FAT file systems, it compresses better (if you need such a thing in this day and age). It's just much, much, much more robust. Please do yourself a favor, spare yourself the heartbreak and GO WITH NTFS!
You'll thank me! :)
-
@B00tDisk-
Yes, of course, for boot and data partitions, use NTFS, no doubt about it. The feature set puts it far above any other Windows filesystem. But, do you need ANY of those features for a swap partition? (What should I format my swap partition as was the original question...)
My gut instinct is to use FAT32 for your swap, if you're going to use a dedicated partition. Why add the overhead of NTFS permissions and fault recovery to a drive that doesn't need them?
But, I don't really think breaking out swap from your Windows partition will give you any noticable performance gains over a non-fragmented fixed-size pagefile on an NTFS partition, though. At one of my old jobs, we benchmarked several different NT swap setups, and chose to go with a fixed-size pagefile on the NTFS system partition, as it was the all-around most efficient setup for a single HD workstation. We found no appreciable speed difference by placing swap in a seperate partition, and, of course, you lose the ability to easily increase your pagefile should the need occur.
If you have two or more drives in your system, and they are identical drives, putting the swap partition on the drive that does not contain the system partition will speed up things a slight amount. But if that drive is slower than your system drive, the small speed gains you make can be wiped out... and you may even get a performance penalty. (In other words, I wouldn't recommend putting an old 1 gig drive in your system for the sole purpose of having a swap drive -- it'll hurt more than it helps.)
-
Yes, my concern was about performance (less overhead) and to prevent fragmentation (the hint to use a fixed size pagefile was welcome :-) ).
About FAT32 vs FAT16, I think i'll go for FAT16. here's why:
http://www.storagereview.com/guide2000/ref/hdd/file/fileFAT32.html
and extensively explained futher on:
http://www.storagereview.com/guide2000/ref/hdd/file/partFAT32.html
Since my partition is relative small, the amount of slack FAT16 will take will not be so important, and I agree the NTFS might slow down thinks a bit due to the extra feature it offers (user rights, etc)
And look for the "Overall Performance" table on this:
http://www.ntfs.com/ntfs_vs_fat.htm
I hope 1GB partition is considered small
:-D
-
Hum,
Sounds good...
And you probably won't run into any difficulties, er, before you buy another 256 ram module (which are incredibly cheep), and do away with the swap file & HD altogether... :-)
---------------
Star Shrek (http://technetcast.ddj.com/img/os-shrek-200x222.jpg)
-
One simple solution: get more memory, and run the swapfile onto a Ramdisk. Windows requires an extensive swapfile, just try switching it off and running Word as an example! This is the only way to stop the harddisk grinding.
For speed (on disk) a fixed size swapfile, set right after installing Windows, will do best. A small partition at the start of an oversized drive will also work faster. Keeping it cleared of temp files and defragmented regularly also helps ... a quick harddisk will access faster than flash memory for that kind of access pattern BTW!
-
@ptek
Don't partition, get a separate harddrive for the swapfile. You could pick up a 1GB one really cheap somewhere I'm sure. If windows is accessing the swap partition on your main harddrive, the heads aren't accessing the data you want, so the heads have to go back and forth. With a spearate harddrive for the swapfile, you've got a different drive heads doing different things all at once.
-
A seperate old 1Gb drive will be slower than a newish 30+ Gb one sharing Windows! If you create, say, a 10Gb partition at the start of a 160Gb disk it goes well quick, too!
Anyway, to set up a Ramdisk you used to run a program called ramdisk under Dos (it came with 5.0 to 6.22 IIRC), under Windows you'd need to use something like this (http://www.arsoft-online.com/products/product.php?id=1).
-
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
-
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. :-)
For best performance should I use FAT ?
FAT32 isn't much different in my tests than FAT16, but is more flexible.
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. :-)
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...
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.
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!)
-
@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).