All of the referenced memory leaks have been fixed as of Go tip, but a
summary is:

1) Maps were leaking when GOMAXPROCS > 1
2) When append created a new underlying array, it still considered the old
    live. When that old array contained pointers, those pointers in turn
    still be considered live. As a result they would never be garbage
3) The third issue, as it turns out, was really the same underlying issue
as #2
    just manifesting in a different way. It involved a mix of sub-slices and
    appends in such a way that the underlying array had to grow, and when
    happened it led to the issue in #2.

Because downloading and validating the Bitcoin block chain involves
churning an
obscene amount of data, these leaks were huge issues for us. We were
upwards of 4GB of memory usage. After the fixes, we are seeing ~180MB.
were particularly challenging to track down because the memory profiling of
claimed everything was fine and wasn't showing any of the leaked memory was
allocated, but the OS clearly showed it was and as a result all we could
is memory was just being gobbled up at alarming rates with no indication

On Saturday, October 5, 2013 11:58:59 PM UTC-5, bit...@gmail.com wrote:

Quite interested about the memory leaks you found in Go. Can you elaborate?
On Sunday, October 6, 2013 11:20:33 AM UTC+9, Dave Collins wrote:

Hello gophers,

As some of you probably already know, we've been working on an
alternative full
node Bitcoin implementation written entirely in Go.

It is named btcd and we've just released an initial public alpha version

I've written a blog post about the release which provides information
such as a
brief history, the current status, design decisions, an architecture
regression test results, and next steps.

The blog entry is here: https://blog.conformal.com/?p=421
The code is on github here: https://github.com/conformal/btcd

If you're interested in Bitcoin and Go (which I don't imagine you'd be on
mailing list if you weren't interested in Go!), feel free to take a look.
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

Discussion Posts


Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 4 of 9 | next ›
Discussion Overview
groupgolang-nuts @
postedOct 6, '13 at 2:20a
activeOct 9, '13 at 3:17p



site design / logo © 2022 Grokbase