As best as I can calculate, the baseline overhead for an individual Actor
appears to be in the realm of 9.3kB. Or at least, I noticed a ~93MB memory
increase after spawning 10,000 Actors.
It certainly can't hold a candle to Erlang's ~300 bytes, but it's also
nowhere close to the overhead of a thread, especially in Ruby 1.9.
···
On Jan 22, 2008 9:44 PM, NewtonApple <newtonapple@gmail.com> wrote:
How does Revactor do in terms of memory? I know for things like
Stackless Python and Erlang, they can spawn thousands of threads
without even blinking... How does Revactor fare in this regard?
--
Tony Arcieri
ClickCaster, Inc.
tony@clickcaster.com
There's some really great opportunities for Ruby in this regard,
specifically with Rubinius. They recently added multi-VM support and
already support Actors. I've hacked together an inter-VM bridge which
allows Actors to communicate across VMs (almost) as if they're in the same
VM. With that sort of thing you can begin to achieve the dream of programs
that run N-times faster on N CPUs.
There is a blog for Revactor, BTW, although right now it only has the
release announcement. I'll certainly start blogging about the future of
Actors on Ruby soon:
On Jan 22, 2008 8:02 PM, Kevin Williams <kevwil@gmail.com> wrote:
I could go on and on about Fibers and lightweight concurrency
(Erlang-esque) programming, but suffice it to say that I'm really,
really excited to check this out. I think this is something you should
blog about and explain until you're blue in the face, until we all get
comfortable in concurrent programming. We can't just let all those CPU
cores go to waste, can we? Thanks for injecting this into our
consciousness.
--
Tony Arcieri
ClickCaster, Inc.
tony@clickcaster.com
Measurements are far more important than weight, what counts is if you
can fit the clothes and have the right look, not how much you weigh.
Being and staying healthy is paramount. If you do not have the body type
for editorial modeling there are other types of modeling work you can
try.You can vist www.mediahalo.com for more info.
Would you mind sharing the code for this? I was looking for a way to accomplish this by running multiple instances of the Ruby VM (by using fork { exec } ), and having them communicate through sockets.
···
On Jan 23, 2008, at 6:03 PM, Tony Arcieri wrote:
I've hacked together an inter-VM bridge which
allows Actors to communicate across VMs (almost) as if they're in the same
VM. With that sort of thing you can begin to achieve the dream of programs
that run N-times faster on N CPUs.
On Jan 22, 2008 9:44 PM, NewtonApple <newtonapple@gmail.com> wrote:
How does Revactor do in terms of memory? I know for things like
Stackless Python and Erlang, they can spawn thousands of threads
without even blinking... How does Revactor fare in this regard?
As best as I can calculate, the baseline overhead for an individual Actor
appears to be in the realm of 9.3kB. Or at least, I noticed a ~93MB memory
increase after spawning 10,000 Actors.
It certainly can't hold a candle to Erlang's ~300 bytes, but it's also
nowhere close to the overhead of a thread, especially in Ruby 1.9.
If Actor would be(come) a first-class citizen of Ruby, what would you expect the footprint for each Actor to be?