[CRIU] criu as forkall

Inti Gonzalez-Herrera inti.glez at gmail.com
Mon Feb 3 03:10:38 PST 2014


Hello,

I found CRIU last week and I realized that it can be used to implement some
sort of forkall. In short, I am working in a java application and I need to
start the application many times. The problem is that the start-up time is
not negligible and I need to start many of them. My first idea was to
implement something as Android Zygote but that path lead me to a huge
modification in the Linux kernel.

Fortunately, I found this project and I guess I can use it. I already
checked and CRIU is able to dump the application in the exact moment I
want. It deals properly with sockets and so on (almost, there is a little
exception which is triggered when the connection is lost; however it is not
a problem for me).

Now, the problem I have is that I don't know how to restore the same
application at the same time due to the PID problem. I mean, first restore
is OK but in the second one the system cannot assign the same PID. Is there
a way to solve that problem? Is it implemented?  What are the command line
option? If the solution involves something else, can you please provide an
example?
I can see that a solution is to execute the app in a new namespace. I will
solve the pid problem but it will imply other problems?

Can you suggest some workarounds? I guess that the only use of pids I have
are those inside the pthread library and maybe others with the virtual
machine.

Thanks
Inti Gonzalez
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openvz.org/pipermail/criu/attachments/20140203/3b5dbe48/attachment.html>


More information about the CRIU mailing list