Can garbage collection work efficiently with huge memories?

This is more of a theoretical question than a practical one. I know that GCs are currently working with a large process that uses 1.2 or 3 GB of memory, but I would like to know if it is theoretically possible to have an efficient GC with really huge memory (1000 Go or more).

I ask this question because even if the GC can run its algorithm gradually, it needs to wait to scan all the objects before releasing the object, to make sure that no other object is using it. Thus, in a very large system, memory should logically be freed less frequently. If the memory is very large, an unused object will be freed so rarely that the GC will no longer be interested.

Do you know studies or articles on this subject?

+3
source share
6 answers

I really expect garbage collection to be an even greater benefit for systems with very high memory requirements. My experience today is related to this (although I have not used thousands of GB, only dozens).

Typically, systems that use large amounts of memory use large collections of objects - so often you have a similar number of allocations, but some allocate very large ones. This allows you to maintain the performance of GC approximately equal to a system that uses less memory, because GC perf. really attached to the number of root objects, not the total size of the objects.

, , , , . (, , .NET) , , .

+2

, , , . , Java .NET , . (, ), , . , , .

, , , , , . , .

. http://www.simple-talk.com/dotnet/.net-framework/understanding-garbage-collection-in-.net/.

edit: , . , .

+3

, , , . , .

, . , , .

GC, , . , . - .

+2

. , , . , , , , , . . in-memory , , , , , .

Jacob

+2

The more heap memory you have, the more efficient the garbage collector. To avoid long pauses, you need a reasonable modern collector that works gradually. (A simple such builder is packaged with Lua 5.1 .)

For a good article on this, see Garbage collection can be faster than stack allocation from Andrew Appel.

0
source

Source: https://habr.com/ru/post/1715215/


All Articles