PDA

View Full Version : Moving Swap file issue


mikehende
06-20-2006, 07:26 PM
Hey guys, I am now into the OS side of things on the A+ and I came across the Swap File issue today, since I only have 512RAM on this machine and have had the Low-virtual-memory prompt appear a few times already, I am thinking of moving the swap file to my bigger hard drive as per the instructions from this tutorial

http://www.petri.co.il/pagefile_optimization.htm

but before I should decide to do so, just wanted to check in here to get your opinions on if this will be helpful/worthwhile or not? While we're at it, maybe you can also explain the relationship between hard drive space and the swap file? Meaning, I have 7 gigs free on my C drive and I never load anything new or at least any big files on there, every addition is usuall made on the added much bigger drive which has approx. 147GB's free so my question is, why would moving the swap file from a drive that has 7GB's free to a bigger drive make any difference?

kelly
06-20-2006, 08:33 PM
Mike, I would put the sway file on the larger drive. The first drive needs its own elbow room and putting the sway file on a separtate drive is a better way to go. I've heard this on this bbs, I think. This is because you have one drive working with the OS and data, while the other drive is working the memory.

There are others here who know more than I on this subject. Let's see what they say.
-td

Seth
06-20-2006, 08:43 PM
Hi Mike,

Moving the swap file is a low priority tweak. Any performance increase derived from such will be insignificant compared to other XP tweaks as well as simply adding more ram.

If you're getting the "Low Virtual Memory" prompt with 512Mb of ram, then it's likely that the virtual memory is set to an incorrect custom level. I usually recommend leaving the page file on "System managed". I would also check that the Processor Scheduling and Memory Usage is set to "Programs".

If the above is done and you still get the prompt, then you either have some sort of memory leak, or you open multiple ram heavy applications simultaneously.

Seth
06-21-2006, 02:00 AM
Mike, I would put the sway file on the larger drive. The first drive needs its own elbow room and putting the sway file on a separtate drive is a better way to go. I've heard this on this bbs, I think. This is because you have one drive working with the OS and data, while the other drive is working the memory.

This is true in theory. However in practice and under most circumstances, you won't notice much performance difference. The second best option to more ram (but far below it) would be putting the swap file on a much faster drive and on a separate controller.

It's similar to the whole "defragmentation" thing. Defragging a highly fragmented drive will boost performance, but in almost all cases the speed increase is not noticable.

mikehende
06-21-2006, 06:28 AM
Thanks for info guys but Seth if I understand you correctly, simply put, moving the Swap file might not be worth the trouble?

Seth
06-21-2006, 11:03 AM
Thanks for info guys but Seth if I understand you correctly, simply put, moving the Swap file might not be worth the trouble?

Moving the swap file is easy, but if you're going to see any performance increase, then the swap file should be on a drive that's installed on a separate controller. In addition, the swap file drive would have to be much faster than the "c" drive to see a performance increase. Try it out with what you have though, it won't hurt anything.

Now above and beyond that, moving the swap file to increase performance is kind of like replacing an engine that just needs a tune up. In other words, if you have a memory problem (physical or virtual), then the other points I discussed are of much higher priority than moving the swap file.

mikehende
06-21-2006, 12:44 PM
Very well explained, got it, thanks!

Seth
06-21-2006, 01:33 PM
No prob Mike.

Other than the problem areas I mentioned in my first post, there is another memory related issue that comes to mind:

After the operating system assigns memory to a specific application, that memory may not be available again even when the application is closed. The computer would have to be restarted in such a case. You'll notice this as a system lag or perhaps a memory error. For example, Torrent downloads/uploads as well as online malware scanners can cause this issue.

dbarrow
06-21-2006, 02:18 PM
Moving Paging File...
In XP, there are a few advantages to moving the Page File.

1. Page File should be on the fastest drive
2. Page file is utilized by XP EVEN IF you have 2g of ram!
By design... there are things the OS will place in the Page File regardless of how much free ram you have.
3. System manged size is quite adequate and the Page File works differently, and much more efficiently, than Swap File in Win9x
4. Page File can be placed in a PARTITION with fixed size
5. If possible, that partition should be on a drive other than the OS drive, if comparable speed. (decreases delay accessing Page File and OS files at the same time)

All my machines have the PAGING FILE on a dedicated 3g fixed P: on a faster SATA drive.
Size = 1.5x amount of installed ram
Set Page File to fixed size same as partition

While speed of access is something you won't really be able to see, differences are in milliseconds, there is a verified difference in bench marks. This method is faster.

The biggest advantage to a fixed size is no fragmentation.
When the Page File is mixed in with the OS, as a variable size system manged file, it expands or contracts depending on need. As such, it leads to fragmentation and pushes around OS files leading to fragmentation of the OS files as things get pushed around and shifted by system optimization. Fragmentation of the OS leads to decreased speed.

A fixed size Page File on a dedicated partition can't fragment as it is one contiguous file in a fixed location.
It never needs to be defragemented and does not push around the OS files, which if on a dedicated partion themselves, leads to far less fragmentation of the OS partition. There is improvement in the automatic (beyond your control) defrag and optimization of the OS files routinely performed by XP.

Will you see a difference on a high end machine?
Probably not, especially with today's fast buffered drives.
Will it help on a marginal machine with limited resources?
Every little bit helps so worth a try!

When moving the Page File to a different location, remember to TURN OFF paging file, create new location, reboot, TURN ON paging only on the new drive location, then delete the prior page files that were created to restore that free space.

mikehende
06-21-2006, 04:34 PM
I decided to give this a try just so I know how to do it more than for any other reason. Will start looking into this tomorow, BTW, how do I determine which drive is faster, by their rpm speed or transfer rate?

Seth
06-21-2006, 07:00 PM
I decided to give this a try just so I know how to do it more than for any other reason. Will start looking into this tomorow, BTW, how do I determine which drive is faster, by their rpm speed or transfer rate?

In general, the rpm is proportional to the transfer rate. However, many factors factors determine the real world transfer speed.

Click here (http://www.snapfiles.com/download/dlhdtune.html) for a utility that will measure your actual transfer rate.

mikehende
06-21-2006, 07:28 PM
Thanks for the link but if you don't have that utility, how will you know which drive is faster? There should be some way to tell, maybe by comparing specs? If so, exactly which specs need to be compared?

Seth
06-21-2006, 07:43 PM
The main spec will be the rotational speed. In general, higher rpm=higher transfer rate.

I found this (http://www.pcguide.com/ref/hdd/perf/perf/spec/transMedia-c.html) explanation for you. Scroll down near the bottom and you'll find a dtr calculation.

mikehende
06-21-2006, 08:24 PM
Ok, so now from reading the link you sent me I understand why you need that utility to measure accurately the speed of drives especially if you have 2 drives with the same listed DTR, correct? If so, then I will have to run the utility on both of my drives ]which are 7200RPM] to see which and if one if faster, appreciate very much all of the help Seth, will continue with this tomorow so stay tuned all.

Seth
06-21-2006, 08:32 PM
Ok, so now from reading the link you sent me I understand why you need that utility to measure accurately the speed of drives especially if you have 2 drives with the same listed DTR, correct? If so, then I will have to run the utility on both of my drives ]which are 7200RPM] to see which and if one if faster, appreciate very much all of the help Seth, will continue with this tomorow so stay tuned all.

You're very welcome...and yes, run it on both drives.

I just had a better look at the link I posted, and it's even more thorough than I initially thought. If you poke around that site, you'll know what I meant by the "real world" dtr depends on many factors. Therefore, the dtr calculation is only theoretically correct. The true DTR can be determined by the utility I posted.

mikehende
06-22-2006, 10:53 AM
Ready to proceed but want to have a CLEAR picture of what I am going to do, so to make sure I would like to ask questions here and maybe you guys can advise me futher?

1] My 2 hard drives are on the Primary Controller, the original drive [40GB] with the OS on it, the master, the other added-on bigger [160GB]drive, the slave. I have both a cd and dvd burner on the Secondary controller. What's the best setup for me here for all 4 drives since I will have to restructure all the drives now to accomodate the swap file?

Should I leave the 40gb drive with the OS on the Primary controller and switch the 160gb drive to the Secondary controller so then I'll be switching with either the cd or dvd burner? If so, the setup would then be that the Primary controller would have the 40gb drive and the cd burner and the Secondary controller will have the 160gb drive [on which the swap file will be placed] and the DVD burner, will this work or is there a better setup?

dbarrow
06-22-2006, 12:32 PM
That works for me! Make the drives the primary and cd/dvd slave.

mikehende
06-22-2006, 12:47 PM
Great, next:

2] Partitioning the 160gb drive for the swap file:
The drive's capacity is listed as 149 but it is a 160gb, how is this possible? What happened to the other 11gb's?

dbarrow
06-22-2006, 01:23 PM
There is a difference between size of the drive, as rated by the mnfr., and usable file space as recognized by the OS
(there is an MSKB article that explains this)
Overhead involved with MBR and file tables and sector and block size as determined by the format.
There is also a "redundancy factor" built into the drives with blocks and sectors not used by the OS that are used to replace bad sectors when they are marked by a chkdsk scan.

2x40g platters do not an 80g drive yield....

mikehende
06-22-2006, 02:17 PM
yes, I remember reading about CHKDSK marking bad sectors in the section on hard drives, it never explained that this was taken into account when rating drive size. Ok next, right now the F [bigger drive] is showing 35gb used with 113 free. First thing I'd like to know concerning partitioning is if I can partition a 3gb space for the swap file on this drive without have to format the entire drive thereby losing the 35gb of info I already have on there? I don't have anything external on which I can back up the entire 35gb of info so I would like to know if this 35gb will be safe?

dbarrow
06-22-2006, 09:58 PM
Partition Magic.... it will create the new partition and resize the existing one.

mikehende
06-23-2006, 03:19 PM
I was hoping to do this without it costing me anything since this is a one-time experiment, this software costs $69.95 and I am being told that you can't use the demo. I had thought that this could be done by using basic windows utilities so I am guessing that only this software will do becuase I wish to save what I already have on there and any other way will mean I will have to wipe the drive clean first?

Seth
06-23-2006, 04:04 PM
Windows won't partition without losing the data.

Third party programs won't lose the data, but even they recommend backing it up as a precaution.

I have run across a freeware "No data loss" repartioning utility. I can't remember the name of it though...I'll have a look.

mikehende
06-23-2006, 04:06 PM
Thanks, take your time, no hurry!

Seth
06-23-2006, 04:22 PM
Actually Mike, now that I've given it a few more minutes of thought...even if I found that freeware version, I wouldn't name it.

Repartitioning a drive that has sensitive data is very risky. I wouldn't trust any freeware program, and if I used Partition Magic, I would still backup the data. Without backup, you're risking your important data to perform an experiment that will likely not increase performance.

I suggest you wait until you can backup the data. After that, format the drive and create your partitions through Windows.

mikehende
06-23-2006, 04:36 PM
Makes sense, yes, I can definitely wait or wait a minute, I will be loading 95, 98, 98SE, ME and NT on the old PII test pc I have lying around here from next week onwards just to familiarize myself with those OS's so I can do any partitioning experimenting with that pc and I have 2 older hard drives around here somewhere, in this case then I won't need any special utilities, correct?

Seth
06-23-2006, 05:50 PM
95,98, and ME can't format a NTFS drive without first deleting and recreating a partition(s). Even so, these os's can only format using FAT. You can use boot floppies from bootdisk.com and use FDISK to repartition any drive, but the drive should then be formatted using NTFS if it's to be used on an NT system.

For partitioning and formatting NTFS, I've always used the XP setup cd. I don't know if you can repartition a slave drive from within Windows XP. Perhaps you can using "Disk Management". Someone else will probably know however.

kelly
06-27-2006, 08:25 PM
I've used Acronis' Disk Director for resizing. Works well, never had an issue. Retails for $50. You can probably get it for around $35. I'm going to contact Acronis and register to become a reseller. Maybe get even better pricing.
-td