StarTeam memory management on 32-bit and 64-bit Windows Operating Systems.

0 Likes

Problem:

StarTeam memory management on 32-bit and 64-bit Windows Operating Systems.

Resolution:


  • Product Name: StarTeam
  • Product Version: All
  • Product Component: Server
  • Platform/OS Version: N/A


StarTeam memory usage on 32-bit Operating Systems
The maximum amount of memory a 32-bit windows operating system can access is 4 Gigabytes. By default when running StarTeam on a 32-bit operating system the StarTeam server application can access a max of 2 Gigabytes of memory. This is not a limitation of StarTeam but a limitation of all 32-bit applications running on 32-bit environments. Typically windows allocates a max of 2 Gigabytes to any process running on the operating system and reserves 2 Gigabytes for the operating system itself.

Windows has the ability to increase the amount of memory that a 32-bit application can access. This is called 3Gig Ram Tuning. If 3 Gig Ram Tuning is applied, Windows reduces the amount of memory available to the operating system kernel to 1 Gigabyte and increases the amount of memory available to the application to 3 Gigabytes. In reality the maximum is probably around 2.5 gigabytes as some of the extra memory is reserved and cannot be accessed by the application.

In order to take advantage of 3 Gigabyte Ram Tuning 32-bit applications need to be compiled with the /LARGEADDRESSAWARE compiler switch. StarTeam Server 2008R2 is compiled with this switch so StarTeam can access some of the extra 1 Gigabyte of memory allocated by 3 Gig Ram Tuning. However, it should be noted that if StarTeam memory usage is above 2.5 Gigabyte then any spike in memory usage can cause a server crash. StarTeam does not have to have exceeded 3 Gigabyte of memory to experience a crash.

If customers are running a StarTeam server and the memory usage is regularly over 2.5 GB and they have been experiencing crashes due to memory allocation errors then they should consider moving from a 32-bit OS to a 64-bit OS.

As the maximum amount of memory a 32-bit windows operating system can address is 4 GigaBytes there is no benefit to StarTeam to having more memory than this installed on the server. In fact having more memory installed i.e. 8 or 16 GigaBytes can negatively impact the stability of the operating system.
StarTeam memory usage on 64-bit Operating Systems In a 64-bit operating system the maximum memory address space available is 16 TeraBytes. This is split up as 8 TeraBytes for applications and 8 TeraBytes for the operating system. A 32-bit application running on a 64-bit Windows runs in the WOW64 subsystem. WOW64 is an emulator that allows 32-bit Windows-based applications to run seamlessly on 64-bit Windows. Each 32-bit application receives 4 GigaBytes of memory space in the WOW64 environment but the application cannot make use of the extra memory unless the application has the IMAGE_FILE_LARGE_ADDRESS_AWARE flag set in the image header. This is achieved by compiling the application with the /LARGEADDRESSAWARE flag. If this flag is not set, the 32-bit application will be allocated 4 GigaBytes of memory space but will only be able to access a maximum 2 GigaByte memory space.

So, in effect the current 32-bit version of StarTeam can use the extra 1 GigaByte of memory available to it by running on a 64-bit version of Windows. However, again this will in reality probably mean a maximum of 3.5 Gigabtyes and memory usage above this may still make the server vulnerable to crashing if a spike in usage occur.

The 64-bit version of the server that’s coming in Hamachi (Summer of 2009) will be able to take advantage of memory exceeding the 4 GigaByte boundary because it will be a native 64-bit app.


One of the extra benefits of running 32-bit applications on a 64-bit AMD64-based computer and 64-bit Windows is the potential for having more application memory made available to the 32-bit applications. On a 32-bit Windows system, the maximum memory available is 4GB, which must be shared between the operating system, memory-resident drivers, applications and application data. By contrast, on a 64-bit system, the WOW64 infrastructure can allocate up to 4 GigaByte of RAM to a 32-bit Windows application and that address space does not need to accommodate the operating system or drivers. That gives the full
4 GigaByte of memory space to the application, a significant increase for resource-hungry applications.

The 64-bit versions of Windows and the WOW64 subsystem handles the memory pool and virtual memory more efficiently than 32-bit versions of Windows which should improving stability for 32-bit applications.
However, execution speed under WOW64 is similar to its speed under 32-bit Windows, so there is improvement in performance under a 64-bit windows.

For more details see the articles listed below:

WOWing Your 32-Bit Applications with 64-Bit Windows Part 1

Comparison of 32-bit and 64-bit memory architecture for 64-bit editions of Windows XP and Windows Server 2003

Below is a list of the OS maximums for various versions of Microsoft Windows:

Windows Server 2003 (32 bit)

Datacenter SP2: 128 GB
Enterprise SP2: 64 GB
Standard SP1: 4 GB
Datacenter R2: 128 GB
Enterprise R2: 64 GB
Standard R2: 4 GB
Web Edition: 4 GB
Small Business Edition: 4 GB

Windows Server 2008 (32 bit)


Datacenter: 64 GB
Enterprise: 64 GB
Standard: 4 GB
Web Server: 4 GB

Windows Server 2003 (64 bit)

Datacenter SP2: 2 TB
Enterprise SP2: 2 TB
Standard SP1: 32 GB
Datacenter R2: 1 TB
Enterprise R2: 1 TB
Standard R2: 32 GB
Small Business Edition: 128 GB

Windows Server 2008 (64 bit)

Datacenter: 2 TB
Enterprise: 2 TB
Standard: 32 GB
Web Server: 32 GB
Windows 2000 Professional: 4GB Windows 2000 Server: 4GB Windows 2000 Advanced Server: 8GB with PAE enabled Windows 2000 Datacenter Server: 32GB with PAE enabled


Old KB# 29395
Comment List
Related
Recommended