Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What heap size for a web page is considered too large?

I've been looking at Chrome's wonderful Heap Snapshots and started wondering if there were any experiments / ballpark measurements done about what's the "limit" for memory usage on a web page.

For example, if my heap snapshot shows a total of 10Mb, that's almost certainly not an issue on any computer made in the last 5 years.

But at what point would it be a problem for a significant portion of users? 50Mb? 100Mb? 300Mb?

Links to relevant articles would be much appreciated.

like image 713
Adam A Avatar asked Dec 14 '10 01:12

Adam A


People also ask

How much heap memory is too much?

Memory allocations are dynamic in later operating systems. There's no limitation for memory allocation. However, if you allocate too much memory to the desktop heap, negative performance may occur. It's why we don't recommend that you set a value that is over 20480.

How big should be heap size?

The heap size value is determined by the amount of memory available in the computer. Initial heap size is 1/64th of the computer's physical memory or reasonable minimum based on platform (whichever is larger) by default. The initial heap size can be overridden using -Xms.

What should be the max heap size?

The default startup heap size is 1.5 GB. This value must be a number between 1.5 GB and the maximum amount of memory allowed by your operating system and JVM version. Consider the following examples: If you have a Windows system with a 32-bit JVM, then a process can have a maximum heap size of 2 GB.


1 Answers

I am extending Google Chrome with 3D graphics support. Due to unoptimized code my page sometimes takes several gigabytes in memory. I do not think there is a limit, except that on Windows, Google Chrome is 32-bit application, which are limited to ca. 1.3 GiB by the OS. On Linux Google Chrome is 64-bit, so limit is ca. 256 TiB (262144 GiB), which in principle means no limit at all.

like image 164
Sergiy Belozorov Avatar answered Oct 13 '22 17:10

Sergiy Belozorov