FORK
Charles Oliver Nutter
headius at headius.com
Thu Apr 24 07:44:27 UTC 2014
What would it take to make Hotspot forkable? Obviously we'd need to
pause all VM threads and restarting them on the other side (or perhaps
a prefork mode that doesn't spin up threads?) but I know there's
challenges with signal handlers etc.
I ask for a few reasons...
* Dalvik has shown what you can do with a "larval" preforking setup.
This is a big reason why Android apps can run in such a small amount
of memory and start up so quickly.
* Startup time! If we could fork an already-hot JVM, we could hit the
ground running with *every* command, *and* still have truly separate
processes.
* There's a lot of development and scaling patterns that depend on
forking, and we get constant questions about forking on JRuby.
* Rubinius -- a Ruby VM with partially-concurrent GC, a
signal-handling thread, JIT threads, and real parallel Ruby threads --
supports forking. They bring the threads to a safe point, fork, and
restart them on the other side. Color me jealous.
So...given that OpenJDK is rapidly expanding into smaller-profile
devices and new languages and development patterns, perhaps it's time
to make it fit into the UNIX philosophy. Where do we start?
- Charlie
More information about the mlvm-dev
mailing list