Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Thanks for concurrency improvements
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  9 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Gustavo Niemeyer  
View profile  
 More options Aug 3 2011, 8:35 am
From: Gustavo Niemeyer <gust...@niemeyer.net>
Date: Wed, 3 Aug 2011 09:35:28 -0300
Local: Wed, Aug 3 2011 8:35 am
Subject: Thanks for concurrency improvements
Hey Dmitry,

Just a quick public acknowledgement for your recent efforts in the
concurrency aspects of the runtime.  I've just run a real world
benchmark provided by someone using mgo with the r59 release, and it
took about 5 seconds out of 20, without any changes in the code.

Please keep up the great work.

--
Gustavo Niemeyer
http://niemeyer.net
http://niemeyer.net/plus
http://niemeyer.net/twitter
http://niemeyer.net/blog

-- I never filed a patent.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
jimr  
View profile  
 More options Aug 3 2011, 12:13 pm
From: jimr <jim.robin...@gmail.com>
Date: Wed, 3 Aug 2011 09:13:11 -0700 (PDT)
Local: Wed, Aug 3 2011 12:13 pm
Subject: Re: Thanks for concurrency improvements

This note caught my eye because I just had another experience where
the Go language just made my life a whole lot easier.  So I'd like to
follow up Gustavo's note by sending a general thank-you to the Go
developers for making such a nice language, period.

I have a program I'm working on that ends up using HTTP to POST or PUT
resources onto another server.  The general flow of the first draft of
the program was along the lines of:

    for id := range idSet {
        entry := generateEntry(id)
        if doUpdate(entry) {
            if u.Update(entry) {
                success[entry.URL] = true
            }
        }
    }

I found that this was far too slow, but I also found that if I faked
u.Update, to just write its data to /dev/null, the program was 25x
faster than when I actually sent data to the remote server.  That
seemed to indicate I was probably spending a lot of time blocking,
waiting on the remote server.

So with a few simple changes, thanks to Go's design, I added code to
spawn a few goroutines to handle the updates:

func (u *Updater) Updater(entries chan Representation, status chan
map[string]bool) {
    m := make(map[string]bool)
    for entry := range entries {
        m[entry.URL()] = u.Update(entry)
    }
    status <- m

}

and code to submit entries to those goroutines:

....
    updateEntries := make(chan Representation)
    updateStatus := make(chan map[string]bool)
    for i := 0; i < u.Config.GoRoutines; i ++ {
        go u.Updater(updateEntries, updateStatus)
    }
....
    for id := range idSet {
        entry := generateEntry(id)
        if doUpdate(entry) {
            updateEntries <- entry
        }
    }
...
    close(updateEntries)
...

the code was able to execute many more operations per second. In
this case, with 3 goroutines, I see a 3x to 4x speed-up:

       HTTP UPDATES PER SECOND

SERIAL CODE           CONCURRENT CODE
Mean     : 16.1298    Mean     : 62.6208
StdDev   : 4.8292     StdDev   : 27.7307
Variance : 23.3216    Variance : 768.9911
Minimum  : 1.0000     Minimum  : 1.0000
Maximum  : 27.0000    Maximum  : 126.0000
Percentiles           Percentiles
     25% : 14.0000         25% : 45.0000
     50% : 17.0000         50% : 65.0000
     75% : 20.0000         75% : 83.0000
     95% : 22.0000         95% : 104.0000
     99% : 24.0000         99% : 113.0000

It's extremely nice to have a language that makes concurrency so easy
to use.

Jim


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Brandon Mercer  
View profile  
 More options Aug 3 2011, 12:17 pm
From: Brandon Mercer <yourcomputer...@gmail.com>
Date: Wed, 3 Aug 2011 12:17:42 -0400
Local: Wed, Aug 3 2011 12:17 pm
Subject: Re: [go-nuts] Re: Thanks for concurrency improvements
My sentiments as well. I came from the "hardware is cheap" camp but it
seems a terrible waste what we do with it at times. Thanks for this
language, your hard work and giving us such a great tool that lets us
build stuff quickly, that runs quickly, and is easy to develop. :)
Brandon


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Andrew Gerrand  
View profile  
 More options Aug 3 2011, 2:48 pm
From: Andrew Gerrand <a...@golang.org>
Date: Wed, 3 Aug 2011 11:48:57 -0700 (PDT)
Local: Wed, Aug 3 2011 2:48 pm
Subject: Re: Thanks for concurrency improvements

Indeed. Thanks for your excellent work, Dmitry.

Nice to see it paying off so quickly.

Andrew


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dave Cheney  
View profile  
 More options Aug 3 2011, 7:43 pm
From: Dave Cheney <d...@cheney.net>
Date: Thu, 4 Aug 2011 09:43:21 +1000
Local: Wed, Aug 3 2011 7:43 pm
Subject: Re: [go-nuts] Re: Thanks for concurrency improvements
I'd also like to give a note of public thanks to Dmitry for his
ongoing efforts improving the runtime. Your work is very much
appreciated and will benefit countless current and future Go users.

Cheers

Dave


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Adriaan Wiers  
View profile  
 More options Aug 3 2011, 9:52 pm
From: Adriaan Wiers <adriaan.wi...@gmail.com>
Date: Wed, 3 Aug 2011 18:52:52 -0700 (PDT)
Local: Wed, Aug 3 2011 9:52 pm
Subject: Re: Thanks for concurrency improvements

On Wednesday, August 3, 2011 9:35:28 AM UTC-3, Gustavo Niemeyer wrote:

> Just a quick public acknowledgement for your recent efforts in the
> concurrency aspects of the runtime.  I've just run a real world
> benchmark provided by someone using mgo with the r59 release, and it
> took about 5 seconds out of 20, without any changes in the code.

I second that and would also congratulate Gustavo. It is so much more common
to see people complaining than recognizing good work. Kudos to both.

Adriaan.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Carl  
View profile  
 More options Aug 4 2011, 4:02 am
From: Carl <2ca...@googlemail.com>
Date: Thu, 4 Aug 2011 01:02:32 -0700 (PDT)
Local: Thurs, Aug 4 2011 4:02 am
Subject: Re: Thanks for concurrency improvements
On 3 Aug., 14:35, Gustavo Niemeyer <gust...@niemeyer.net> wrote:

> Hey Dmitry,

> Just a quick public acknowledgement for your recent efforts in the
> concurrency aspects of the runtime.  I've just run a real world
> benchmark provided by someone using mgo with the r59 release, and it
> took about 5 seconds out of 20, without any changes in the code.

> Please keep up the great work.

5 seconds out of 20 is huge, I second the above acknowledgement!

The primary reason I took an interest in the Go language was because
of its concurrency and scalability perspectives...

Imagine if you are running thousands of Servers (or perhaps 900000
Servers) and you save just 10% or 20% of your processor time and
energy only by using more efficient algorithms on the concurrency
side. Calculate that into Dollars saved or even just emissions saved.
Its a compelling business case :-) .


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dmitry Vyukov  
View profile  
 More options Aug 8 2011, 3:01 pm
From: Dmitry Vyukov <dvyu...@google.com>
Date: Mon, 8 Aug 2011 12:01:57 -0700 (PDT)
Local: Mon, Aug 8 2011 3:01 pm
Subject: Re: Thanks for concurrency improvements

On Wednesday, August 3, 2011 4:35:28 PM UTC+4, Gustavo Niemeyer wrote:

> Hey Dmitry,

> Just a quick public acknowledgement for your recent efforts in the
> concurrency aspects of the runtime.  I've just run a real world
> benchmark provided by someone using mgo with the r59 release, and it
> took about 5 seconds out of 20, without any changes in the code.

> Please keep up the great work.

> Thank you, guys! You are welcome! It's really nice to hear such responses.

More is coming, stay tuned ;)

Btw, while you are here, I've started work on the concurrent "co" package,
and would like to hear your thoughts on it, I will start a separate thread
for it.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Martin Capitanio  
View profile  
 More options Aug 8 2011, 5:47 pm
From: Martin Capitanio <m...@capitanio.org>
Date: Mon, 8 Aug 2011 14:47:44 -0700 (PDT)
Local: Mon, Aug 8 2011 5:47 pm
Subject: Re: Thanks for concurrency improvements

I just want to note that your web page is cool too.
http://www.1024cores.net/home/lock-free-algorithms

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »