Building/Upgrading a PC for TS2

<< < (3/112) > >>

akatonbo:
Windows doesn't take up half of my RAM. There is a number I can't get below, yes, but it's closer to a quarter.

witch:
So, excuse my ignorance, but I don't understand how these numbers relate to each other. I see I have custom settings, I assume my ex set them, should I change anything? I have 2Gb RAM.

Hegelian:
There is an inverse relationship between the amount of RAM (random-access memory) and the size of Paging File you need. Because Windows needs to run on a wide (wild?) variety of machines, Microsoft takes a sledgeahmmer approach and allows Windows to take a huge chunk of your available hard-drive space for the Paging File. The problem with this is that there are two memory managers working at the same time:  one caches data from the hard drive in memory in order to keep it readily available for applications, because RAM is much faster than a hard drive at transferring data; at the same time the virtual memory manager (VMM) is swapping idle data in RAM to the Paging File on the hard drive to free up RAM. So you see the problem:  One hand is moving data to RAM, and the other hand is moving it back to the hard drive, but into the Paging File instead of just leaving it as it is in the original file. In addition, as you move past 512 MB of RAM, the VMM is "stronger" than the cache manager, so you can end of with hundreds of MB in the Paging File while less than half your RAM is being used. Until I limited the size of the Paging File on my PCs, Windows XP was using only about 25% of my installed RAM.

To understand the problem a bit better, keep in mind that virtual memory was introduced in the days when RAM was much more expensive on a per-megabyte basis than it is now, and the amount you could have was much lower (either because of the physical limitations of your motherboard, or because Win98 could only use 512 MB). Windows 3.1 needed to run on PCs with as little as 64 MB or 128 MB RAM, and the new Windows applications needed more than that. The solution was to use a designated portion of the hard drive as an extension of the physical RAM in the PC, hence "virtual" memory. Then as now, RAM access was much faster than hard-drive access, but since this was the only way to get large programs to run, or to have more than one application open at the same time, that's what we got.

In those days, the common recommendation was to set your paging file to 2.5X your physical RAM, which was fine when that meant dedicating 320 MB of hard drive space to virtual memory on a machine with 128 MB RAM. But as the RAM in the typical PC moved to 512 MB and beyond, this formula was no longer appropriate. Today, when installed RAM is typically 1 GB or greater, it actually hurts performance to have your paging file set to some multiple of RAM, or even to the same amount.

That said, there is no one optimal paging-file setting that applies to every PC and every PC user. There are ways to determine the optimal setting for a particular machine that are not difficult. In WinXP Pro, you can log Paging File use by turning on the performance log at Control Panel > Administrative Tools > Computer Management > Performance Logs and Alerts > Counter Logs > Pagefile Use. You would then experiment with different Paging File settings, running several of your most memory-demanding applicaitons at the same time (loading several large images into Photoshop and performing a few operations on them is a good test), and then setting the maximum Paging File size to about 50 MB more (or 20%, if that makes you feel more comfortable) than the maximum Paging File use reported by the log. The log files can be read in Excel.

With 1 GB RAM (now 1.5 GB), I have the Paging File on drive C (the boot drive) set for a minimum of 20 MB and a maximum of 50 MB. On drive E, I have the main paging file set to a minimum of 100 MB and a maximum of 800 MB. With these settings, Windows actually uses all my installed RAM instead of just the first 300 MB or so, and "disk thrashing" (excessive access of the Paging File) has virtually ceased. Everything runs faster and more smoothly because applications don't need to be constantly retrieving data from an oversized Paging File on the hard drive. The image below shows my RAM and Paging File usage as I write this; the Paging File use is actually a bit high, but I have six apps open at the moment, including three Web pages:




A couple things to keep in mind:  If you have more than one physical hard drive, it is good to have the Paging File on the drive that does not contain Windows (use a disk defragmenter like Norton Speed Disk to have the file located at the start of the drive, and unfragmented for optimum performance). However, note that WinXP likes to have a small Paging File on the boot drive (usually C:) even if the main file is on another drive; this file should be at least 20 MB. If you have only one drive, you can still set a minimum and maximum such as the 100/800 MB I use, although it won't be at the beginning of the drive. With the cost of hard drives so low these days, it can be a good investment install a second, relatively small 7200 RPM drive (or a really big one if the drive you have now is short of space), and move the main Paging File to that drive.

This is also a good strategy for data safety, since you can keep all your personal files on the second drive so when the time comes to reformat your boot drive and reinstall Windows (and that time will come!), you don't need to worry about backing up your data. Windows's "strategy" of dumping everything into a My Documents folder is no strategy at all, and setting up a proper document-filing system on a second hard drive is a good practice in any case. Most applications that work with documents and other files can have their default file-save destination folders changed in the application's options or preferences menu.  (BTW, with the TweakUI applet that comes with Windows XP Power Toys, you can easily change the location of the My Documents and other My" folders, where applications are installed, and other stuff.)

In this particular instance, with 2 GB of RAM, a Paging File with a minumum size of 2 GB is grossly excessive. Try scaling this back to something like 100/1000 and see how that works.  If you don't run into any problems and you still have noticeable disk access while running applications, try backing the maximum down to 800. And so on. A useful applet for monitoring RAM use is Cacheman XP.

Although the unregistered free version is mostly useful for monitoring your memory and Paging File usage, it will allow for some tweaks, the most useful being disabling Executive Paging, which will cause WinXP to keep more data in RAM and use the Paging File less. This is found in Cacheman's Tweaks tab (you can also edit this setting in the Registry, but I'm not going to recommend that in this venue).

There are more drastic recommendations out there, such as setting min and max to 300 MB, but being too aggressive in trimming down the Paging File can lead to problems, which while not fatal, can be aggravating to fix if you're not used to mucking around with your PC.  :)

Here's where to find the Performance logging in WinXP Pro (I don't know if this feature is available in XP Home):

akatonbo:
Quote from: Hegelian on 2006 May 29, 17:54:19

Windows 3.1 needed to run on PCs with as little as 64 MB or 128 MB RAM


You did mean KB and not MB, right?

Quote from: Hegelian on 2006 May 29, 17:54:19

That said, there is no one optimal paging-file setting that applies to every PC and every PC user. There are ways to determine the optimal setting for a particular machine that are not difficult. In WinXP Pro, you can log Paging File use by turning on the performance log at Control Panel > Administrative Tools > Computer Management > Performance Logs and Alerts > Counter Logs > Pagefile Use. You would then experiment with different Paging File settings, running several of your most memory-demanding applicaitons at the same time (loading several large images into Photoshop and performing a few operations on them is a good test), and then setting the maximum Paging File size to about 50 MB more (or 20%, if that makes you feel more comfortable) than the maximum Paging File use reported by the log. The log files can be read in Excel.

With 1 GB RAM (now 1.5 GB), I have the Paging File on drive C (the boot drive) set for a minimum of 20 MB and a maximum of 50 MB. On drive E, I have the main paging file set to a minimum of 100 MB and a maximum of 800 MB. With these settings, Windows actually uses all my installed RAM instead of just the first 300 MB or so, and "disk thrashing" (excessive access of the Paging File) has virtually ceased. Everything runs faster and more smoothly because applications don't need to be constantly retrieving data from an oversized Paging File on the hard drive. The image below shows my RAM and Paging File usage as I write this; the Paging File use is actually a bit high, but I have six apps open at the moment, including three Web pages:


...I'm going to have to play with that. I have the sinking feeling that it's going to make me buy more RAM, too.

Hegelian:
Quote from: akatonbo on 2006 May 29, 18:27:22

Quote from: Hegelian on 2006 May 29, 17:54:19

Windows 3.1 needed to run on PCs with as little as 64 MB or 128 MB RAM


You did mean KB and not MB, right?

Lol! No; the official minimum memory requirement for Windows 3.1 is 1 MB (640 KB + 256 KB). Win95 requires 4 MB and Win98 requires 16 MB. So yeah, I was thinking more of functional requirements rather than the absolute minimum.   ;D

But we're not talking Apple II here, which had 48 KB of RAM (my Franklin Ace 1000 had 64 KB!).

I don't think the issue of overriding the default virtual-memory settings in any version of Windows really became an issue until folks began having machines with 128 MB of RAM or more, but that's just my subjective impression.

Navigation

[0] Message Index

[#] Next page

[*] Previous page