pagefile.sys

Hello!

I’m opening a new thread so to avodi making more offtopic in this thread: http://forum.avast.com/index.php?topic=63621.165

I have an older hard-drive at home, so I’m thinking of puting it in my PC so that I’ll have two HDD’s and so that I can have another pagefile.sys on my second HDD and use it for more virtual RAM. Do you think that’s a good idea since I can’t afford to buy new “real” RAM? And what kind of problems can I face in doing this, will I have to reinstall Windows XP (hope not)? There’s also a possibility of a virus being on that old HDD, maybe even in it’s boot sector, I’m not sure.

Please help me deal with this! :slight_smile:


If it were me and I suspected a virus on the old hard drive, I would not install it.


You can’t use two pagefiles - just one and I’d suggest you to keep it on primary HDD where you have the boot system. Unlike pagefile, hibernation file cannot be moved on different partition than the boot one.

If you connect the second HDD into PC, its MBR/Boot shouldn’t be executed if it’s not set as primary HDD.

Strange… even Windows allow this… Not need to use a 3rd party tweak ::slight_smile:

Are you sure? Because I’ve read that you can, and that’s the main reason I’m thinking of doing this. It that’s really not possible, I’ll rather sell my old HDD and buy more RAM.

sorry, my bad - just don’t disable pagefile on boot volume, otherwise minidump files wouldn’t be created. I’d set up the pagefile on the fastest HDD.

Are you sure about this? Bacause then I have nothing to worry about, then I just have to format this second drive in Windows (low-level of course, including MBR/boot sector). And both HHD’s are SATA, so there is no need to set the jumpers to master/slave I think. Do you know of any good utility to do this? And malware can’t just “escape” to my good HDD (before formatting), right?

The second thing I want to do is to have 2 pagefile.sys files, one on each HDD, so that I’ll have more virtual memory than I have now. Do you guys know how to configure that?

Thank you VERY MUCH for helping me! :slight_smile:

Firstly, decide whether you even want dump or mini-dump files in the event of a system crash! Personally, I don’t want them, nor do I need them, so I eliminated that option entirely on all my PCs. In laymans terms, if you don’t know how to open it, and don’t know how to read it, then you don’t need it :slight_smile:

OK, sleeves rolled up, lets get you up and running! First step is to get rid of that possible virus. The easy way to do this is via a low level format of the disk, but this cannot be done from windows! If you have a floppy drive and a bootable MS DOS floppy, then fdisk will do the job, otherwise download a copy of the Ubuntu (Linux) trial CD and burn it to a CD, you can boot from that and the linux utilities will do the job. In either event, take your current working hard disk OUT of the PC before you start, so you don’t blow away the wrong disk (experience talking!) :slight_smile:

Once the disk is cleaned off, put your main disk back in on the primary IDE channel as the master drive. Put the second disk on the secondary IDE channel as the master drive (you may need to move the CD drive to the slave position to do this).

Calculate your total system RAM and multiply it by 3 - 3 gigs in your case - this is the size of the partition you need to create for your swap partition, so begin by making that partition at the very beginning of the now-blank disk. I always give it the drive letter “S” for “Swap”. Format that partition with NTFS and you’re almost done. What I will often do when I set up my friend’s PCs is make that drive writeable by the system account only so they can’t save any other files there!

Right click on My Computer and go to Properties. Under Advanced - Performance options, you will find the option to change your swap-file settings. Add a new swap file to the S drive and make both min and max the same size - 2.5 x your total RAM (2560mb in your case). This will create a fixed size swap file, and so less likely to fragment over time. Whilst you are there, remove the swap file entirely from the C drive - this will also turn off the mini-dump option and throw up several warnings, just click though them! The system will want to reboot as soon as you are done, so let it do that. It will be a little slow coming back up as it has to write the new file and remove the old one!

Couple of minor jobs left to do:

  • Tell windows not to index the S drive
  • Tell Avast to ignore the S drive in its regular scans

You now have your swap file on a separate drive, with a separate IDE controller, so reads and writes will not interfere with your normal drive useage - this should speed your machine up quite a bit. Also, the swap file is set to the largest size that Windows can assign (2.5 x RAM) so it won’t be changing size and is therefore less prone to getting fragmented! The reason the partition has to be larger than the swap file is that windows will pop up warnings if the available space on any drive is less than 10%. By dint of Microsoft programming wizardry, this warning can only be turned off for ALL drives, not just for one drive!

Lets take it up a notch: Create another partition on that hard drive - make it 6 gigs or so, and give it the drive letter “T” for Temp. Go back into system properties (right click my computer, etc.) and go into environmental variables. You will find 4 sets of temp variables there, 2 as user and 2 as system (Temp and Tmp). Change them all to point to the T drive. Once again, tell windows indexing not to index this drive, but this time tell Avast to watch this drive like a hawk since this is where a lot of viruses get into the system (downloaded software). Tell Firefox or your favourite browser to send all downloads there too and that’s another load off your main system drive!

If you still have lots of space left on that drive, consider taking up the rest of it with yet another partition - letter “U” for User. Right click on “My Documents” and change the location to the U drive - windows will offer to move all your documents for you, let it do that. You now have all your programs on one drive, and all your data on another! Even if you get a bad virus that trashes your system drive, your documents are all safe on another drive!

Sorry for the wall of text, feel free to ask if you have any questions though :slight_smile:

Dave

I would suggest that you try Ebooster

But it is not free

http://www.eboostr.com/

Thank you Davey for your help (and Chris too), but before I start asking more questions, please tell me how much will I gain with adding another HDD and moving the pagefile.sys from C:\ to the new HDD (in terms of virtual memory, not in terms of new HDD free space). Thank you! :slight_smile:

PS: As gain I mean what will I gain in terms of lower latency when recording music (for example).

There is nothing quite like extra RAM to speed up a machine, however it has diminishing returns. As far as gains by moving the swapfile is concerned, consider this:

Recording music (to CD, or to disk from another source) is very disk intensive since the disk has to keep up with the speed of the data coming in or going out. Now if your memory buffers should run low, the OS may decide to swap some stuff out to disk, making the disk work even harder to try and read/write two different areas of the disk at the same time.

By having the swap file (and temp folders) on another hard disk with a separate controller, that extra effort is undertaken by the second disk while the main disk carries on with the music recording, so reducing the chance of the recording being damaged due to slower transfer speeds which cause the latency to begin with!

While I can’t answer the latency question directly, since that is based on the hardware involved, I can tell you that any swapping to disk by means of the swapfile will always slow the computer down. At least with two disks, the memory swap isn’t further delayed by waiting for the hard disk to finish it’s current read.

Naturally, having the disk properly defragmented helps a lot too. I thoroughly recommend MyDefrag (www.mydefrag.com) for the job. It is very cheap (free for home use), very efficient and can even be set to run as a screensaver!

I notice you have 1GB of RAM, but don’t list your video specifications, so I’m guessing you are using the integrated video card. This is fine, but it will take a chunk out of your available RAM to run it, dropping your available memory by 10 or even 20% before you start to load the operating system. For music recording, I would seriously look at adding more RAM to the machine - that would reduce the swap file useage tremendously - don’t forget that using a swap file reduces the speed of the computer to the speed of the hard disk!

I don’t have an integrated VC, I have nVidia 6600 video card. I don’t know if moving swap file will lower latency for recording & mixing music, that’s why I’m not sure if I should even do this… Anyway,thank you for your reply, it’s very informative!

Edit: Just found out that my old WD2000 HDD is 1.5 GB/s and the one I already use is a faster WD3200 HDD is 3 GB/s. I’ve read that moving the swap file to a slower disk is not a good idea. What do you think? Thank you.