Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a memory limit for a single .NET process

We are currently thinking of building a cache-system to hold data pulled out of an SQL database and make it available to a couple of other applications (website, webservice, etc). We imagine the cache to be running as a windows service and basically consist of a smart dictionary which holds the cache entries. My question is, is there a limit to the working set of the application (it will be running under windows server 2003)? Or is the amount of physical memory the limit?

like image 654
Mats Avatar asked Oct 14 '08 08:10

Mats


People also ask

How much memory can a .NET application use?

NET 1.0 the memory limit of . NET object is 2GB. This means you cannot for example create array which contains elements with more than 2GB in total.

What is the maximum memory size for a process?

The 2 GB limit refers to a physical memory barrier for a process running on a 32-bit operating system, which can only use a maximum of 2 GB of memory. The problem mainly affects 32-bit versions of operating systems like Microsoft Windows and Linux, although some variants of the latter can overcome this barrier.

What is the maximum amount of virtual memory a process can take up?

On 32-bit versions of Windows, a single process can map and address no more than 3GB of virtual memory at time. In 64-bit versions of Windows, a 32-bit process can map and address no more than 4GB of virtual memory at a time.

How much memory can a 64-bit process use?

A 64-bit register can theoretically reference 18,446,744,073,709,551,616 bytes, or 17,179,869,184 GB (16 exabytes) of memory. This is several million times more than an average workstation would need to access.


1 Answers

32bit or 64bit? 32bit is 2gb (for a process), 64 bit is 1TB (enterprise edition 2003 server).

However, the maximum size of a CLR Object is 2gb even on 64bit.

Update: the information above was correct in 2008. See Ohad's answer for more recent information. Windows 2016 server can have a maximum of 24TB.

like image 65
Chris S Avatar answered Sep 16 '22 12:09

Chris S