Ask your own question, for FREE!
Computer Science 27 Online
OpenStudy (anonymous):

(a) In both Windows and Linux when you are installing the OS you have a choice where the swap (for virtual memory) goes: (1) on a separate disk (swap disk) or (2) a file on the Windows disk (swap file). (a.1) Which would be faster? (a.2) Other than speed, give one advantage of picking swap disk OR swap file.

OpenStudy (anonymous):

i'm confused on the question, isn't swap disk/file the same thing?

OpenStudy (rsmith6559):

Windows doesn't have a swap partition. It has page file[s]. On their servers, the page files can be put on other drives, but I've had no luck doing that with their desktop versions. Swap partitions, or drives are a hold over from the days that drive size was measured in kilobytes. Many areas of the file system consisted of many physical drives that were made into a logical volume of a decent size. If the swap partition is on a separate physical drive, you have another disk controller writing data when swapping is happening. The key to file system speed is spindle speed and spindle count. A drive that spins faster can be written to faster, and will have a faster seek time than a slower one. Many drives acting as a logical volume will divide the writing between them, increasing throughput. I usually make a swap partition twice as big as the RAM in a machine. 8GB RAM = 16GB swap. I can always add a swap file later if I need it. Swapping/paging is undesirable. It's considered 1000 times slower than memory access, because drive access times are measured in microseconds and memory access is measured in nanoseconds. If swapping gets too bad, thrashing can occur. Thrashing is when the computer is spending all it's time swapping pages of memory in and out that it has no time to do useful work.

OpenStudy (anonymous):

@rsmith6559 is exactly right, but didn't address a.2. Besides the difference in speed having swap partition on a different disk(rather than on the same as the os), you also gain some redundancy for the swap file in the event of a drive failure. Realistically though, if your OS drive fails like that, you've probably got bigger problems than accessing the contents of the swap space.

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!