Live data from Hacker News

Preparing for the .NET 10 GC

maoni0.medium.com

21–30 of 64 posts

Re: Preparing for the .NET 10 GC

#21
post #10

One anecdote from working with .Net for over 20 years: I've had a few situations where someone (who isn't a programmer and/or doesn't work with .Net) insists that the application has a memory leak. First, I explain that garbage collected applications don't release memory immediately. Then I get sucked into a wild goose chase looking for a memory leak that doesn't exist. Finally, I point out that the behavior they see…

[dead]

Re: Preparing for the .NET 10 GC

#22
post #11
post #10

One anecdote from working with .Net for over 20 years: I've had a few situations where someone (who isn't a programmer and/or doesn't work with .Net) insists that the application has a memory leak. First, I explain that garbage collected applications don't release memory immediately. Then I get sucked into a wild goose chase looking for a memory leak that doesn't exist. Finally, I point out that the behavior they see…

> It does make me wonder: How practical is it to just use traditional reference counting and then periodically do a mark-and-sweep? I know it's a very different approach than .net was designed for. (Because they deliberately decided that dereferencing an object should have no computational cost.) It's more of a rhetorical question. This is what CPython does. The trade off is solidly worse allocator performance, howev…

So basically you're trading lowering RAM consumption for higher CPU consumption?

FWIW: When I look at Azure costs, RAM tends to cost more than CPU. So the tradeoffs of using a "slower" memory manager might be justified.

Re: Preparing for the .NET 10 GC

#23
post #7

Earlier quoted context omitted.

Or if the author used their real name.

For what it's worth, Maoni is the author's real name. Maoni0 is what they go by everywhere. You can find interviews and plenty of their other content if you search around a bit.

Using a handle instead of their full name on an article is a choice. The first impression is not “knowledgeable employee making post about company’s product.”

Posting from a Microsoft blog would to some extent fix this, to the OP’s point.

(I know - who cares. But first impressions are what they are)

Re: Preparing for the .NET 10 GC

#24
post #22
post #11

Earlier quoted context omitted.

> It does make me wonder: How practical is it to just use traditional reference counting and then periodically do a mark-and-sweep? I know it's a very different approach than .net was designed for. (Because they deliberately decided that dereferencing an object should have no computational cost.) It's more of a rhetorical question. This is what CPython does. The trade off is solidly worse allocator performance, howev…

So basically you're trading lowering RAM consumption for higher CPU consumption? FWIW: When I look at Azure costs, RAM tends to cost more than CPU. So the tradeoffs of using a "slower" memory manager might be justified.

It depends on workload. It is difficult to quantify the trade offs without knowing that.

The problem is in languages like C#/Java almost everything is an allocation, so I don't really think reference counting would work well there. I suspect this is the reason PyPy doesn't use reference counting, it is a big slowdown for CPython. Reference counting really only works well in languages with low allocations. Go mostly gets away with a non-compacting mark-sweep collector because it has low level control that allows many things to sit on the stack (like Rust/C/C++, etc.).

Re: Preparing for the .NET 10 GC

#25
post #5

This post would carry a lot more authority if it was on an official MS or .net blog; instead of Medium. (I typically associate Medium with low-quality blog entries and don't read them.)

The author is one of the main GC architects on .NET, so we in the known are aware of who she is.

Here is an interview with her,

https://www.youtube.com/watch?v=ujkSnko0JNQ

Having said this, I agree with you, the Aspire/MAUI architects do the same, I really don't get why we have to search for this kind of blog posts on other platforms instead of DevBlogs.

Re: Preparing for the .NET 10 GC

#26
post #11
post #10

One anecdote from working with .Net for over 20 years: I've had a few situations where someone (who isn't a programmer and/or doesn't work with .Net) insists that the application has a memory leak. First, I explain that garbage collected applications don't release memory immediately. Then I get sucked into a wild goose chase looking for a memory leak that doesn't exist. Finally, I point out that the behavior they see…

> It does make me wonder: How practical is it to just use traditional reference counting and then periodically do a mark-and-sweep? I know it's a very different approach than .net was designed for. (Because they deliberately decided that dereferencing an object should have no computational cost.) It's more of a rhetorical question. This is what CPython does. The trade off is solidly worse allocator performance, howev…

Dotnet does both mark and sweep as well as compaction, depends on what type of GC happens.

Re: Preparing for the .NET 10 GC

#27
post #25
post #5

This post would carry a lot more authority if it was on an official MS or .net blog; instead of Medium. (I typically associate Medium with low-quality blog entries and don't read them.)

The author is one of the main GC architects on .NET, so we in the known are aware of who she is. Here is an interview with her, https://www.youtube.com/watch?v=ujkSnko0JNQ Having said this, I agree with you, the Aspire/MAUI architects do the same, I really don't get why we have to search for this kind of blog posts on other platforms instead of DevBlogs.

They should probably cross-post in both.

Re: Preparing for the .NET 10 GC

#29
post #8
post #3

It's incredibly frustrating the author doesn't actually say "Garbage Collector (GC)" I'm aware but something niggling in the back of my head had me second guessing.

Even worse: they don't explain what the DATAS acronym means. Seems like the author makes too many assumptions about the knowledge base of their reader IMO.

I am guessing he doesn't expect linking from outside. The blog post before this one starts: "In this blog post I’m going to talk about our .NET 8.0 GC feature called DATAS (Dynamic Adaptation To Application Sizes)."

Re: Preparing for the .NET 10 GC

#30
Maybe I missed it, but is there a shadow mode to estimate the memory and perf impact without actually enabling the feature? Or better yet, a way to analyze existing dotnet 8 GC logs to understand the approx impact?
Post reply on HN