On Wed, Jul 22, 2009 at 9:56 PM, tmountain <tinymount...@gmail.com> wrote:

>
> I've written a short blog post on using Clojure to search for
> available ssh servers on my companies VPN. It starts with a single-
> threaded example and then adds concurrency. The performance difference
> in this case was pretty extreme. Sweeping 254 hosts in a serial single-
> threaded fashion took twelve minutes with a network timeout of five
> seconds per host. Adding concurrency resulted in a full sweep in six
> seconds. If nothing else, I guess this is a good illustration of what
> a huge win concurrency can performance wise.
>
> I initially tried to use pmap to parallelize the connections, but it
> didn't provide any improvement (maybe I did it wrong?).


pmap will only use 1 thread per
CPU/core, and therefore is only useful for computationally intensive functions.
send-off definitely sounds like the right solution for this type of problem.

-- 
Cosmin Stejerean
http://offbytwo.com

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to