|
|
|
|||||||
|
|
||||||||
|
|
|
|
|
|||||
|
||||||||
|
Paging File and Pagefile DefragmentationEditors Note: This article was written before the releaseof Diskeeper version 4.0 which defragments the pagefile at boot time. Paging file fragmentation can impact system performance. How muchdepends on system configuration and use. Here is a guide to how much of a problem paging file fragmentation canbe, along with some solutions. Impact on the SystemPaging file fragmentation can affect your system in two ways. Firstand worst, it indirectly slows your system by preventing files from being created contiguously and by making itharder to defragment them later. This is because the paging file fragments, being scattered all over the disk,break up the free space so there isn't any single space big enough to hold the larger files. It can then take significantlylonger to write new files and read existing ones and your overall performance drops. Since the paging file is lockedby Windows NT, it can't be moved or defragmented, so Diskeeper cannot do anything about it. Second, paging activity can be slowed down, depending on the degreeof paging file fragmentation. If the paging file fragments are larger than 64 kilobytes each, fragmentation isn'ta problem, because only 64 kilobytes (the system limit) are read at one time. So, even if you had a 100-megabytepaging file in one large contiguous location, it would still take 1,500 I/Os to read the whole thing. But, if thefragments are smaller than 64 kilobytes, then you will have multiple I/Os just to read one chunk of data. Additionally,the data itself isn't necessarily contiguous; for example, if a program has 60 kilobytes stored in the paging file,the data may reside in three widely separated 20-kilobyte pieces. With an extremely fragmented paging file, say100 megabytes in size, with ten thousand fragments, there is a very noticeable lag every time it is accessed, sinceeach paging file fragment averages only 10 kilobytes. On most systems, the paging file has different Initial and Maximumsizes. Until the Initial limit is reached, the file usually tends to be contiguous, because the Initial limit spaceis created all at one time, but after the Initial limit is reached, the additional parts of the paging file tendto be fragmented, because no space has been created in advance. This is done in an effort to save disk space, asthe additional space (the Maximum setting) may never be used. Thus the first data to go into the paging file ismore likely to be contiguous, and can be read with a single I/O. The later data may be fragmented and take longerto retrieve. Next, you need to consider how often the paging file is used. An averagebusiness Windows NT site has many processes running simultaneously, or the machine is a server serving many users,or runs memory-intensive applications such as graphics or video. In such a case, a fragmented paging file may impactperformance, depending on usage and other factors. Of course, if you only run one application at a time and thatapplication doesn't use much memory, you may never use the paging file at all and paging file fragmentation isnot worth spending any time handling. Defragmenting the Paging FileThe paging file is open for exclusive use by the Windows NT system.While Diskeeper cannot currently defragment it, there are ways to defragment the paging file, or at least reducethe degree of its fragmentation. This method is fairly simple, but requires having more than one partition,and you need Diskeeper 2.0 or later, or Diskeeper Lite:
Use the following method if you only have a single partition. Thisalso requires Diskeeper 2.0 or later, or Diskeeper Lite:
If you are running Diskeeper 1.0x:
Other Useful PointsA paging file can be created with different Initial and Maximum sizes.The advantage of this is having a higher paging file capacity available without permanently using disk space. However,with hard disk prices as low as they are now (and still dropping), this is not much of a concern any longer. Werecommend that you set the paging file Initial and Maximum sizes to the same value. This prevents the paging filefrom fragmenting in the future. The paging file can reside on any partition, and you can have as manypaging files as you have partitions. The ideal arrangement is one large paging file for each disk controller. Thisgives you the fastest access. Next best is one paging file per disk. This is less than ideal only because the controllercan only access one disk at a time, so it's a little slower. Third in rank is having more than one paging fileon a single hard disk. This can be much slower because the read/write head has to move from one partition to anotherif both paging files need to be accessed. If you have a paging file on the system partition that is larger thanthe total amount of system memory, then, if a blue screen crash should occur, the contents of the memory will bewritten to the paging file. This can be very useful for determining why the crash occurred. Paging files are an efficient way to get some benefit from spare diskspace. You should keep at least 20% free space (Microsoft is currently recommending 25%) on each partition, asperformance drops off rapidly as the disks become fuller. If you have even more free space, you can make additionalpaging files (but only one per partition). If you run memory-intensive applications such as document scanning,five or six hundred megabytes of extra paging file can dramatically increase your throughput.
If you have any comments about this article orany requests for new technical articles e-mail
|
||||||||
|
|
Executive Software Europe |
|
||||||