Default strategy for large object heap compaction
up vote
1
down vote
favorite
What is, by default, the strategy used by the .NET framework to compact the large object heap?
- never compacted
- compacted after a while (not as aggressively as generational heap)
What holds? If "after a while", are there a few details about "how long" or "when"?
(I'm interested in .NET framework versions higher than 4.5)
.net garbage-collection large-object-heap
add a comment |
up vote
1
down vote
favorite
What is, by default, the strategy used by the .NET framework to compact the large object heap?
- never compacted
- compacted after a while (not as aggressively as generational heap)
What holds? If "after a while", are there a few details about "how long" or "when"?
(I'm interested in .NET framework versions higher than 4.5)
.net garbage-collection large-object-heap
Which texts? It helps to know what we are reacting to.
– Henk Holterman
Nov 21 at 12:57
add a comment |
up vote
1
down vote
favorite
up vote
1
down vote
favorite
What is, by default, the strategy used by the .NET framework to compact the large object heap?
- never compacted
- compacted after a while (not as aggressively as generational heap)
What holds? If "after a while", are there a few details about "how long" or "when"?
(I'm interested in .NET framework versions higher than 4.5)
.net garbage-collection large-object-heap
What is, by default, the strategy used by the .NET framework to compact the large object heap?
- never compacted
- compacted after a while (not as aggressively as generational heap)
What holds? If "after a while", are there a few details about "how long" or "when"?
(I'm interested in .NET framework versions higher than 4.5)
.net garbage-collection large-object-heap
.net garbage-collection large-object-heap
edited Nov 22 at 19:52
asked Nov 21 at 12:41
Benoit Sanchez
292113
292113
Which texts? It helps to know what we are reacting to.
– Henk Holterman
Nov 21 at 12:57
add a comment |
Which texts? It helps to know what we are reacting to.
– Henk Holterman
Nov 21 at 12:57
Which texts? It helps to know what we are reacting to.
– Henk Holterman
Nov 21 at 12:57
Which texts? It helps to know what we are reacting to.
– Henk Holterman
Nov 21 at 12:57
add a comment |
1 Answer
1
active
oldest
votes
up vote
1
down vote
accepted
By default, the LOH is not compacted at all. Because that could be expensive.
From 4.5.1 on, you can us GCSettings to change that. The choices are CompactOnce and Never.
So you can manually trigger a Compaction, driven by your application logic.
The LOH is only collected (sweeped) during a Generation 2 collection. That may cause your "after a while" confusion. But collection is not compaction.
Thanks. But your phrasing suggests GCSettings.LargeObjectHeapCompactionMode is set forever while it's only a one shot assignation and will be reset after next blocking GC. docs.microsoft.com/en-us/dotnet/api/…. I think you should make it clear.
– Benoit Sanchez
Nov 21 at 13:21
Yes, it is only active for one Collect. That is what I meant with manually.
– Henk Holterman
Nov 21 at 13:46
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
accepted
By default, the LOH is not compacted at all. Because that could be expensive.
From 4.5.1 on, you can us GCSettings to change that. The choices are CompactOnce and Never.
So you can manually trigger a Compaction, driven by your application logic.
The LOH is only collected (sweeped) during a Generation 2 collection. That may cause your "after a while" confusion. But collection is not compaction.
Thanks. But your phrasing suggests GCSettings.LargeObjectHeapCompactionMode is set forever while it's only a one shot assignation and will be reset after next blocking GC. docs.microsoft.com/en-us/dotnet/api/…. I think you should make it clear.
– Benoit Sanchez
Nov 21 at 13:21
Yes, it is only active for one Collect. That is what I meant with manually.
– Henk Holterman
Nov 21 at 13:46
add a comment |
up vote
1
down vote
accepted
By default, the LOH is not compacted at all. Because that could be expensive.
From 4.5.1 on, you can us GCSettings to change that. The choices are CompactOnce and Never.
So you can manually trigger a Compaction, driven by your application logic.
The LOH is only collected (sweeped) during a Generation 2 collection. That may cause your "after a while" confusion. But collection is not compaction.
Thanks. But your phrasing suggests GCSettings.LargeObjectHeapCompactionMode is set forever while it's only a one shot assignation and will be reset after next blocking GC. docs.microsoft.com/en-us/dotnet/api/…. I think you should make it clear.
– Benoit Sanchez
Nov 21 at 13:21
Yes, it is only active for one Collect. That is what I meant with manually.
– Henk Holterman
Nov 21 at 13:46
add a comment |
up vote
1
down vote
accepted
up vote
1
down vote
accepted
By default, the LOH is not compacted at all. Because that could be expensive.
From 4.5.1 on, you can us GCSettings to change that. The choices are CompactOnce and Never.
So you can manually trigger a Compaction, driven by your application logic.
The LOH is only collected (sweeped) during a Generation 2 collection. That may cause your "after a while" confusion. But collection is not compaction.
By default, the LOH is not compacted at all. Because that could be expensive.
From 4.5.1 on, you can us GCSettings to change that. The choices are CompactOnce and Never.
So you can manually trigger a Compaction, driven by your application logic.
The LOH is only collected (sweeped) during a Generation 2 collection. That may cause your "after a while" confusion. But collection is not compaction.
edited Nov 21 at 13:07
answered Nov 21 at 13:01
Henk Holterman
207k22225394
207k22225394
Thanks. But your phrasing suggests GCSettings.LargeObjectHeapCompactionMode is set forever while it's only a one shot assignation and will be reset after next blocking GC. docs.microsoft.com/en-us/dotnet/api/…. I think you should make it clear.
– Benoit Sanchez
Nov 21 at 13:21
Yes, it is only active for one Collect. That is what I meant with manually.
– Henk Holterman
Nov 21 at 13:46
add a comment |
Thanks. But your phrasing suggests GCSettings.LargeObjectHeapCompactionMode is set forever while it's only a one shot assignation and will be reset after next blocking GC. docs.microsoft.com/en-us/dotnet/api/…. I think you should make it clear.
– Benoit Sanchez
Nov 21 at 13:21
Yes, it is only active for one Collect. That is what I meant with manually.
– Henk Holterman
Nov 21 at 13:46
Thanks. But your phrasing suggests GCSettings.LargeObjectHeapCompactionMode is set forever while it's only a one shot assignation and will be reset after next blocking GC. docs.microsoft.com/en-us/dotnet/api/…. I think you should make it clear.
– Benoit Sanchez
Nov 21 at 13:21
Thanks. But your phrasing suggests GCSettings.LargeObjectHeapCompactionMode is set forever while it's only a one shot assignation and will be reset after next blocking GC. docs.microsoft.com/en-us/dotnet/api/…. I think you should make it clear.
– Benoit Sanchez
Nov 21 at 13:21
Yes, it is only active for one Collect. That is what I meant with manually.
– Henk Holterman
Nov 21 at 13:46
Yes, it is only active for one Collect. That is what I meant with manually.
– Henk Holterman
Nov 21 at 13:46
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53412261%2fdefault-strategy-for-large-object-heap-compaction%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Which texts? It helps to know what we are reacting to.
– Henk Holterman
Nov 21 at 12:57