MS.COM Operations Tools Team WebLog

Hey - What does this button do?

The effects of /PAE on large file copies

In the world of Operations, one of the many tasks that you perform routinely is large file copies.  Recently, the point was brought up that when the copy operation is initiated from a server that does not have the /PAE, the copy completes significantly faster than when the operation is initiated from a server with /PAE enabled.  So I thought I would take a few minutes and explain why this is not simply perception, but reality. 

For those unfamiliar, enabling /PAE allows all processors that are based on the IA-32 architecture (beginning with the Intel Pentium Pro) to support a new 36-bit physical addressing mode named Physical Address Extension (PAE). PAE allows up to 64 GB of physical memory and maps up to 64 GB of memory into a 32-bit (4 GB) virtual address space.  Using the /PAE switch causes the size of the Page Table Entry (PTE) to increase from 4 Bytes to 8 Bytes. The number of PTEs that are required when you translate memory is increased as the amount of memory in a computer increases.  PTE’s actually reside in an array called a Page Table.  Before the CPU can find a byte of data on a page of memory, it must first construct another page of memory that contains the mapping information needed to find the page.  The mapping information is called a page table. So when someone says that PTE’s are used to map I/O space, kernel stacks, or files – they mean that the PTE will point to where in physical memory, that piece of data resides.

Okay, so where was I...oh yeah, large copy operations when /PAE is enabled.  Almost all standard copy utilities (copy, xcopy, robocopy, etc) use the CopyFile and CopyFileEx functions and because these functions use buffered I/O, the maximum size of a file that you can copy depends on the amount of paged-pool memory that is available at the start of the copy procedure and whether the Physical AddressExtensions (PAE) kernel is in use.

With the standard kernel, 1 kilobyte (KB) of paged pool is required for each megabyte (MB) of file size that is opened for buffered I/O. Because there are two files involved in a copy procedure, 2 KB of paged pool are required for each MB in the source file. When the PAE kernel is used, the overhead is doubled and 4 KB of paged pool is required for each MB in the source file.

                                                                                                                                                                        

The calculation works like this.

 

2 Kilobyte of Memory is 2,048 bytes.

 

2048 / 4 = 512 PTE’s. : divide by 4 because our PTE size is 4 Bytes.

 

With PAE enabled our PTE’s double in size. So our value of 512 is the same but we are multiplying by 8 bytes.

 

512 (Amount Of PTE’s) * 8 (Bytes of PTE) = 4096 Bytes (4KB) . This gives our overhead to our paged pool while doing our large file copy.

 

So as you can see, in the case of large copy operations will actually perform worse on a server with /PAE enabled!

 

That's all for now

 

Scott

Published Thursday, September 30, 2004 8:07 PM by mscomts

Comments

No Comments
New Comments to this post are disabled

This Blog

Syndication

Tags

No tags have been created or used yet.

News

All opinions posted here are those of the author(s) and are in no way intended to represent the opinions of our employer. This is provided "AS IS" with no warranties, and confers no rights. Use of included code samples are subject to the terms specified in the Terms of Use.

© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Microsoft
Page view tracker