Software Tuning, Performance Optimization & Platform Monitoring
Discussion regarding monitoring and software tuning methodologies, Performance Monitoring Unit (PMU) of Intel microprocessors, and platform updating.

Address Windowing Extensions ( AWE ) technology on Windows platforms with Intel CPUs

SergeyKostrov
Valued Contributor II
8,014 Views
Hi everybody, It is a well known problem ( or limitation ) that a 32-bit application on some 32-bit Windows platforms can not allocate more than 2GB of memory. However, some 32-bit Windows platforms, for example Windows XP Professional or Windows Server 2003, support Address Windowing Extensions ( AWE ) technology ( designed by Microsoft ) and a 32-bit application could allocate more than 2GB of memory. Please take into account that Intel CPUs should have support for a Physical Address Extensions ( PAE ) feature. Enclosed is a very simple test-case in 'AweTestAppV1.zip' ( Visual Studio 2005 and up ) that tries to allocate different amounts of memory and allows to verify if a 32-bit application could allocate more than 2GB of memory on Windows platforms that support AWE. Notes: - An Intel CPU PAE feature is supported even on Intel Pentium(R) 4 CPU - A 32-bit Windows platform must support AWE ( for example, Windows XP Home doesn't support AWE ) - Please take a look at a small Readme.txt file for some technical details - For more information about AWE technology visit: http://msdn.microsoft.com/en-us/library/windows/hardware/gg487508.aspx Best regards, Sergey
0 Kudos
46 Replies
Bernard
Valued Contributor I
3,701 Views
Thanks Sergey! I have already downloaded your source code and extensive testing will be performed later.
0 Kudos
SergeyKostrov
Valued Contributor II
3,701 Views
>>...I have already downloaded your source code and extensive testing will be performed later... Excellent and thank you. Here are two additional notes: - Start with 1.5GB ( you will see a set of defines / by default I set it to 2.5GB ) - 1.86GB was the maximum amount of memory the application was able to allocate in the Release configuration on a 32-bit Windows platform ( when LARGEADDRESSAWARE is enabled ) - Use the Windows Task Manager in order to see how memory is allocated - When defines: #define _INIT_ALLOCATED_MEMORY_PASS1 #define _INIT_ALLOCATED_MEMORY_PASS2 are uncommented it takes some time to complete the initialization of memory. I recommend to comment out both at the beginning of tests: // #define _INIT_ALLOCATED_MEMORY_PASS1 // #define _INIT_ALLOCATED_MEMORY_PASS2
0 Kudos
Bernard
Valued Contributor I
3,701 Views
>>>Excellent and thank you. Here are two additional notes:>>> Tomorrow I will post my results. Btw AWE memory mapping is more secure because it won't be paged out.
0 Kudos
SergeyKostrov
Valued Contributor II
3,701 Views
>>Tomorrow I will post my results... Excellent. Will you be able to make a couple of screenshots? >>...Btw AWE memory mapping is more secure because it won't be paged out... I'm simply interested... Where did you find that information? Is it a statement from Microsoft?
0 Kudos
Bernard
Valued Contributor I
3,701 Views
>>>Excellent. Will you be able to make a couple of screenshots?>>> I could , but I do not know how to make a screenshots(I'm not joking). >>>I'm simply interested... Where did you find that information? Is it a statement from Microsoft?>>> I strongly recommend you to read the ultimative source of Win OS knowledge a book written by Mark Russinovich titled "Windows Internals" in its 5 and 6 edition. Sadly there you won't find any source code examples, but the amount of information transmitted to the readers is amazing and very insightful. http://www.amazon.com/Windows-Internals-Part-Covering-Server/dp/0735648735/ref=sr_1_2?s=books&ie=UTF8&qid=1354865140&sr=1-2&keywords=windows+internals+7th+edition
0 Kudos
SergeyKostrov
Valued Contributor II
3,701 Views
>>...I could , but I do not know how to make a screenshots... There is a 'Print Screen' button at the top of keyboard ( usually in a right part ). After you pressed it create a new image in MS Paint and press 'Ctrl+V' ( Paste ), edit if something needs to be corrected or marked, and press 'Save As' to save the image as a jpg-image. Jpg-format is a significantly smaller in size then default bmp-format.
0 Kudos
Bernard
Valued Contributor I
3,701 Views
>>>There is a 'Print Screen' button at the top of keyboard ( usually in a right part ). After you pressed it create a new image in MS Paint and press 'Ctrl+V' ( Paste ), edit if something needs to be corrected or marked, and press 'Save As' to save the image as a jpg-image. Jpg-format is a significantly smaller in size then default bmp-format.>>> Thanks Today I was busy with my project(I'm writing GUI calculator in Java which will be able to compute special and elementary functions).Tomorrow I will test your application.
0 Kudos
SergeyKostrov
Valued Contributor II
3,701 Views
Hi Iliya, I'll be ready for any questions related to these tests. Best regards, Sergey
0 Kudos
Bernard
Valued Contributor I
3,701 Views
>>>I'll be ready for any questions related to these tests.>>> Today I will do it. Will you be interested in my GUI calculator testing?
0 Kudos
SergeyKostrov
Valued Contributor II
3,701 Views
>>...Will you be interested in my GUI calculator testing? Iliya, I'm very sorry but UI is no longer my specialization. However, if you make some screenshots of the application I'll be able to provide some limited feedback. Is it OK? Best regards, Sergey
0 Kudos
Bernard
Valued Contributor I
3,701 Views
Thanks .Later I will send a fully working app. Now regarding your project I'm struggling with "bcdedit.exe /set PAE ForceEnable" option and it seems not effective I have memory failure allocation reportred by your app. I'm using win 7 and edited boot option with bcdedit.exe.
0 Kudos
Bernard
Valued Contributor I
3,701 Views
Tried also "bcdedit.exe set/ increaseuserva 3072" option wchich also was not effective(else statement is executed every time). Please post your OS configuration.What options were set in order to successfuly testr your app?
0 Kudos
SergeyKostrov
Valued Contributor II
3,701 Views
>>...I'm using win 7 and edited boot option with bcdedit.exe... I understood that you have Windows Server 2003 and I don't understand why are you using Windows 7. So, Please take a look at a Readme.txt file enclosed with the project. There is a link to a Microsoft's article about AWE and I also made a couple of notes. The most important are as follows: ... 1. ...test Microsoft AWE technology on Windows Server 2003 2. /3GB switch in Boot.ini file has to be used 3. Initial size of the Virtual Memory file has to be equal or greater than 3GB ... In order to set an Initial size of the Virtual Memory file please follow these steps: On Windows Server 2003 [ Start button ] -> Settings -> Control Panel -> System -> Advanced -> Performance Settings -> Advanced -> Change Virtual Memory -> Select 'Custom Size' radio button -> Set 'Initial size (MB)'=3072 and 'Maximum size (MB)'=8192 -> Press 'Set' button -> It is possible that a request to reboot the computer will be asked. Best regards, Sergey
0 Kudos
Patrick_F_Intel1
Employee
3,701 Views
Hello Sergey, Also note that 32bit apps on 32bit windows can use up to 3GB of memory. There is an article on this at http://msdn.microsoft.com/en-us/library/aa366778.aspx Pat
0 Kudos
Bernard
Valued Contributor I
3,701 Views
>>>I understood that you have Windows Server 2003 and I don't understand why are you using Windows 7.>>> No.I 'm using Win 7,but I have a few VM's with various OS's already pre-installed. Today I will create another VM with Win Server 2003 and extensive testing will be performed. I will report about the results. >>>>On Windows Server 2003 [ Start button ] -> Settings -> Control Panel -> System -> Advanced -> Performance Settings -> Advanced -> Change Virtual Memory -> Select 'Custom Size' radio button -> Set 'Initial size (MB)'=3072 and 'Maximum size (MB)'=8192 -> Press 'Set' button -> It is possible that a request to reboot the computer will be asked.>>> Thanks.
0 Kudos
SergeyKostrov
Valued Contributor II
3,701 Views
Hi Iliya, >>No.I 'm using Win 7,but I have a few VM's with various OS's already pre-installed. Do you use a VirtualBox software? >>Today I will create another VM with Win Server 2003 and extensive testing will be performed. I hope that it won't take too much your time. The test is really simple and I expected that it could be completed in a couple of minutes. Thanks for all your efforts.
0 Kudos
Bernard
Valued Contributor I
3,701 Views
>>>Do you use a VirtualBox software?>>> No VMware workstation 7.
0 Kudos
SergeyKostrov
Valued Contributor II
3,701 Views
>>>>Do you use a VirtualBox software? >> >>No VMware workstation 7. Thanks. >>...I hope that it won't take too much your time. The test is really simple and I expected that it could be completed in a couple of minutes. Iliya, please don't spend too much time on it unless you're really interested in AWE technology.
0 Kudos
SergeyKostrov
Valued Contributor II
3,701 Views
Hi Patrick, >>...There is an article on this at http://msdn.microsoft.com/en-us/library/aa366778.aspx. Thanks for the link and it has another link to a very good article: What is 4GT? http://technet.microsoft.com/en-us/library/cc786709(WS.10).aspx
0 Kudos
SergeyKostrov
Valued Contributor II
3,612 Views
Take into account that /3GB switch in the Boot.ini file could be used on the following systems: - Windows Server 2003 x64 Editions family - Windows XP Professional Edition - Windows 2000 Datacenter Server - Windows 2000 Advanced Server - Windows NT Server 4.0 Enterprise Edition
0 Kudos
Reply