Live data from Hacker News

.NET Garbage Collector Basics and Performance Hints (2003)

msdn.microsoft.com

11–20 of 21 posts

Re: .NET Garbage Collector Basics and Performance Hints (2003)

#11
post #9

I wonder how much of the advice is still important with the improvements .NET GC has received over the decades [1] [2] [1] http://scottdorman.github.io/2008/11/07/clr-4.0-garbage-coll... [2] https://blogs.msdn.microsoft.com/dotnet/2012/07/20/the-net-f...

The optimizations improved GC performance in general reducing latency, but, the advice in the article is still good. One thing that may seem dated is the concern with Finalization, which is still a valid concern, but nowadays there are very few cases in which one needs to create a finalizer for their types.

Re: .NET Garbage Collector Basics and Performance Hints (2003)

#12
Back in 2005-2006 we ran into significant issues with the GC and pinned memory related to Windows sockets when building a networked server for XMPP. I believe the GC has improved since then for that scenario, but it was a big surprise when it happened. It was a classic case of a leaky abstraction.

http://blog.jdconley.com/2006/06/how-to-build-scalable-net-s...

Re: .NET Garbage Collector Basics and Performance Hints (2003)

#13
This is timely as I'm troubleshooting a .NET app with randomly long garbage collection times. I'm just the sysadmin in this scenario, without access to the code, so I'm approaching it from Splunk and AppDynamics. If anyone has suggestions beyond this article, I'd appreciate it :)

Re: .NET Garbage Collector Basics and Performance Hints (2003)

#14

This is timely as I'm troubleshooting a .NET app with randomly long garbage collection times. I'm just the sysadmin in this scenario, without access to the code, so I'm approaching it from Splunk and AppDynamics. If anyone has suggestions beyond this article, I'd appreciate it :)

This may be of interest:

http://www.red-gate.com/products/dotnet-development/ants-mem...

Re: .NET Garbage Collector Basics and Performance Hints (2003)

#15
post #12

Back in 2005-2006 we ran into significant issues with the GC and pinned memory related to Windows sockets when building a networked server for XMPP. I believe the GC has improved since then for that scenario, but it was a big surprise when it happened. It was a classic case of a leaky abstraction. http://blog.jdconley.com/2006/06/how-to-build-scalable-net-s...

I was still in high school when I read that post. Thanks for writing it. Buffer pooling is still incredibly relevant in .Net (as it is in many languages).

Re: .NET Garbage Collector Basics and Performance Hints (2003)

#17

This is timely as I'm troubleshooting a .NET app with randomly long garbage collection times. I'm just the sysadmin in this scenario, without access to the code, so I'm approaching it from Splunk and AppDynamics. If anyone has suggestions beyond this article, I'd appreciate it :)

This may be of interest: http://www.red-gate.com/products/dotnet-development/ants-mem...

That's a nice memory profiler, have good success with it. I've also used DebugDiag, https://www.microsoft.com/en-us/download/details.aspx?id=499... and plain ol' perfmon and its performance counters, to help track down GC-related issues.

Re: .NET Garbage Collector Basics and Performance Hints (2003)

#18
post #15
post #12

Back in 2005-2006 we ran into significant issues with the GC and pinned memory related to Windows sockets when building a networked server for XMPP. I believe the GC has improved since then for that scenario, but it was a big surprise when it happened. It was a classic case of a leaky abstraction. http://blog.jdconley.com/2006/06/how-to-build-scalable-net-s...

I was still in high school when I read that post. Thanks for writing it. Buffer pooling is still incredibly relevant in .Net (as it is in many languages).

Just for the sake of reference:

https://msdn.microsoft.com/en-us/library/system.servicemodel...

Re: .NET Garbage Collector Basics and Performance Hints (2003)

#19

Earlier quoted context omitted.

This may be of interest: http://www.red-gate.com/products/dotnet-development/ants-mem...

That's a nice memory profiler, have good success with it. I've also used DebugDiag, https://www.microsoft.com/en-us/download/details.aspx?id=499... and plain ol' perfmon and its performance counters, to help track down GC-related issues.

Agreed. Starting point PerfMon and PerfCounters, as an addition to great suggested profilers I would also have a look at PerfView / ETW.

https://blogs.msdn.microsoft.com/dotnet/2012/10/09/improving...

Re: .NET Garbage Collector Basics and Performance Hints (2003)

#20
post #18
post #15

Earlier quoted context omitted.

I was still in high school when I read that post. Thanks for writing it. Buffer pooling is still incredibly relevant in .Net (as it is in many languages).

Just for the sake of reference: https://msdn.microsoft.com/en-us/library/system.servicemodel...

Along these same lines, Microsoft.IO.RecyclableMemoryStream is also useful.

https://github.com/Microsoft/Microsoft.IO.RecyclableMemorySt...

Post reply on HN