RoarVM: The Manycore SqueakVM

We are happy to announce, now officially, RoarVM: the first single-image manycore virtual machine for Smalltalk.

The RoarVM supports the parallel execution of Smalltalk programs on x86 compatible multicore systems and Tilera TILE64-based manycore systems. It is tested with standard Squeak 4.1 closure-enabled images, and with a stripped down version of a MVC-based Squeak 3.7 image. Support for Pharo 1.2 is currently limited to 1 core, but we are working on it.

A small teaser:
1 core   66286897 bytecodes/sec;  2910474 sends/sec
8 cores 470588235 bytecodes/sec; 19825677 sends/sec

RoarVM is based on the work of David Ungar and Sam S. Adams at IBM Research. The port to x86 multicore systems was done by me. They open-sourced their VM, formerly know as Renaissance VM (RVM), under the Eclipse Public License. Official announcement of the IBM source code release:

The source code of the RoarVM has been released as open source to enable the Smalltalk community to evaluate the ideas and possibly integrate them into existing systems. So, the RoarVM is meant to experiment with Smalltalk systems on multi- and manycore machines.

The open source project, and downloads can also be found on GitHub:

For more detailed information, please refer to the README file.
Instructions to compile the RoarVM on Linux and OS X can be found in the INSTALL file.
Windows is currently not supported, however, there are good chances that it
will work with cygwin or pthreads for win32, but that has not be verified in
anyway. If you feel brave, please give it a shot and report back.

If the community does not object, we would like to occupy the mailinglist for related discussions. So, if
you run into any trouble while experimenting with the RoarVM, do not hesitate
to report any problems and ask any questions.

You can also follow us on Twitter @roarvm.

Tags: , , , , , ,

16 Responses to “RoarVM: The Manycore SqueakVM”

  1. Marco Devillers November 5, 2010 at 18:26 #

    Hi, my language is a mess 😉 and I am looking for a new VM to compile to. I would love to read a bit more on the RoarVM, but all articles are behind a paywall.

    Could you be so kind to mail me one of your papers discussing RoarVM?

  2. Rajesh Karmani January 17, 2011 at 21:13 #

    Congratulations! Just a clarification: does the VM allow execution of parallel Smalltalk programs? or does it discover some parallelism in existing Smalltalk programs and run them in parallel?
    Secondly, do you plan to add support for Java or C/C++? 🙂


  3. Stefan January 17, 2011 at 21:32 #

    The VM executes standard Smalltalk processes in parallel, instead of relying on pure green threads.
    Thus, usual Smalltalk programs will automatically benefit from the available parallelism, but they have to make use of it explicitly.
    There is nothing in the VM that infers any parallelism.

    Common Squeak and Pharo programs already use Smalltalk processes, but are actually designed with the guarantees of the green-threading scheduler in mind, which allows to experience the downside of shared-memory parallelism immediately… no safety nets, nothing.

    Support for other languages on top of the VM is planed, and already in the works with Ly and Sly. But other ‘main-stream’ languages are not planed for the moment.

  4. Rajesh Karmani January 29, 2011 at 21:54 #

    Thanks for the clarification Stefan. This is quite an exciting development and I am sure everyone would benefit by ports to other languages.
    To further understand, is there a cost to this safety net? To understand what you said, you use actual processes/threads for every actor instead of a green thread.
    However, when the node is over-subscribed (much larger number of actors than processors) wouldn’t it result in high creation and context switching times?

  5. Petr Ossipov March 5, 2011 at 10:52 #

    Hi, Stefan!
    This week I blindly have tried RoarVM on my DuoCore computer (windows XP) but failed.
    In Internet i did’t find neither instructions of RoarVM-installation details for Windows, nor simple examples of smalltalk programms running on 2 cores.
    I would appreciate your kindly advise/help :-).

  6. Stefan March 5, 2011 at 11:55 #

    Hi Rajesh:

    No, the Smalltalk processes are still lightweight entities. At startup of the VM, OS processes or threads are started and each can schedule Smalltalk processes as necessary. The only bottleneck for large number of Smalltalk processes is the scheduler design at the moment. It uses a central mutex and data structure, but aside from that creating Smalltalk processes is basically ‘free’.

    However, Smalltalk processes do not imply process-separation/distinct address spaces as it is the case for OS processes. Thus, they are not actors, and there is also no asynchronous message sending facility in the standard image.

  7. Stefan March 5, 2011 at 12:02 #

    Sorry Petr, but there is no Windows support out of the box. You might want to try something like POSIX Threads for Win32 to get it working. However, this is not ‘supported’, i.e., I tried it once halfhearted on my netbook, but gave up since my netbook is rather slow.
    In theory, all it takes is pthread support, or providing a wrapper for the win32 APIs in the platform support, and then a replacement for mmap either with plain malloc or mmap’s relative in the win32 API. The rest should be portable code.

    Hope that helps.

    Bye the way, Smalltalk processes are standard Smalltalk and doing a `[10 tinyBenchmarks] fork. [10 tinyBenchmarks] fork. [10 tinyBenchmarks] fork.` should give you some workload for 3 cores.

  8. Petr Ossipov March 5, 2011 at 15:48 #

    Thanks for advise, Stefan.
    I will try to follow your guidelines.
    I also have tried in Squeak4.1 your example:

    [10 tinyBenchmarks] fork. [10 tinyBenchmarks]fork.

    Only one core(of 2)work. Another core was waiting.

  9. Stefan March 5, 2011 at 16:24 #

    Did you start the RoarVM with something along the lines of `./rvm -num_cores 2 my_image_including_rvm_patches.image`?
    I hope we are able to release a new image soon. There are still one or two bugs which have been fixed but not released.
    In general, the MVC image is our main one, the Squeak and Pharo images are not fully supported yet. Sorry.

  10. Petr Ossipov March 5, 2011 at 18:04 #

    No, Stefan.
    I have tried in DOS only command-line
    Squeak squeak4.1.image num_cores 2.

    I have MVC variant also.
    My directory for MVC is following:
    Squeak.ini (educeCPUUsage=1)
    What one should type? Somewhat

    Squeak minimal-MVC.image-num_cores 2 my_image_including_rvm_patches.image

  11. Stefan March 5, 2011 at 18:27 #

    Ok, I see.
    The thing is, standard Squeak does not support multiple cores.
    And on a windows commandline, you would need to compile the RoarVM for Windows first. I guess, thats not the case here.
    Sorry, but as I said, there is no out ouf the box windows support. OSX and Linux are the platforms we are able to cover at the moment.

    Bye the way, the Squeak VM mailing list would be a perfect place for such a discussion.

  12. Petr March 5, 2011 at 20:28 #

    Ok, Stefan. With standard Squeak all is clear now.

    But your minimal-MVC.image works under Windows!
    What is unclear- how to start it properly to use 2 cores?

  13. Stefan March 5, 2011 at 20:59 #

    As I said, the standard Squeak VM you are using does not support multiple cores.
    And yes, of course, the image is compatible with Squeak (it is a Squeak 3.9 MVC image).

    There are only two ways to get it working, either porting the RoarVM to Windows, or using a supported operating system that is MacOS X or Linux.

  14. Petr Ossipov March 6, 2011 at 20:42 #

    Thanks a lot, Stefan, for helpfull advise.
    For me remains only one way, with Linux.

  15. Petr Ossipov March 11, 2011 at 17:54 #

    Good evening, Stefan!
    One question arises for me. Maybe you know answer. Whether it is possible with
    Linux and your image to use multicore graphics cards “NVIDIA” or similar. In my branche (computational dynamics)the C-programmer use MPI-library for parallel programming to work on these cards.
    Thanks in advance.

  16. Stefan March 11, 2011 at 18:48 #

    No, we do not provide anything in particular to enable programming via CUDA or OpenCL.

    However, you might find the OpenCL bindings for Squeak useful.