BT

Presentation: Conceptual Algorithms

by Werner Schuster on Jan 28, 2009 |

In this talk from RubyFringe, Tom Preston-Werner, one of the founders of GitHub, talks about "Conceptual Algorithms".

Tom walks us through a problem he encountered while writing the god tool. The Ruby process running god was leaking memory - for no obvious reason. Tom explains how he methodically explored the problem and tracked down the source of the problem. (Spoiler: it was a sneaky problem in the Ruby interpreter).

Tom finishes up by explaining his reasons to chose projects, and what he considers the "deathbed filter".

Watch Tom Preston-Werner on "Conceptual Algorithms".

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Entertaining talk by Markus Kohler

It's a little bit shocking how difficult it is in Ruby to analyze memory leaks.
Analyzing memory leaks is easy in Java (Eclipse Memory Analyzer).
Analyzing memory usage is much more difficult, but still can be done with MAT. Check my blogs posts

Re: Entertaining talk by Werner Schuster

I'm not so sure - the memory leak Tom's talking about is a leak in the Ruby interpreter not an application leak.
There are a bunch of leaks - although recently a fix for many of them was found:
www.infoq.com/news/2009/01/ruby-patches-fix-leaks
(turns out it was naughty GCC + the conservative Ruby GC).

For the nice kind of memory leak (the self-inflicted one in user code) Ruby doesn't need outside tools since it can look at the objects in the heap and iterate over the reachable ones. Eg here's a simple homegrown profiler using ObjectSpace:
scottstuff.net/blog/articles/2006/08/17/memory-...

Obviously - you'll still need some of the algorithms for analyzing the object graph and figuring out what might be a memory leak or not, and tools like MAT have these of course.

Wau!!! by Jure Srsen

Thanks a lot for this presentation, Tom!
I would listen to audio versions of this in a regular podcast :)
Jure Sršen

Re: Entertaining talk by Markus Kohler

Sure that was a leak caused by the GC not working correctly.
I never heard of such a bug in the JVM GC within the last 9 years.

You typically need an external tool, because if you don't have enough memory anymore you cannot use additional memory within the same process.

Re: Entertaining talk by William Louth

Entertaining? This guy would put you to asleep with his long drawn out project promotion, language (not just ruby itself), and inability to get to the point without meandering off the course in mid-flight. I find it amazing that the lesson in this session needed to said and in such a excruciating manner. And I thought Java conferences were bad filled with the same repeating talk show (sales) hosts.

William

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

5 Discuss

Educational Content

General Feedback
Bugs
Advertising
Editorial
InfoQ.com and all content copyright © 2006-2014 C4Media Inc. InfoQ.com hosted at Contegix, the best ISP we've ever worked with.
Privacy policy
BT