<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Hello Nick,<br>
<br>
On 19/08/2019 12:53, 梁辰 wrote:<br>
<blockquote type="cite"
cite="mid:CAHUEYAUYPWJDVFXF5fVUMQjxVY7iT0knsb-2huqcqw36L-xGrg@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">We are using CRIU to reduce the startup time of
some system services and applications in our own system(OS like
Android).<br>
<br>
We have a process named zygote to fork all the apps in our
system, like the ZYGOTE process in Android, which has a lot of
works like loading libraries and other environment. And it is
indeed useful to enable criu for our zygote which means the
startup time of zygote is decreased when the system boots next
time. I am not sure why, my guess is that CPU is too busy during
the boot time of zygote while criu uses IO instead.<br>
<br>
However, we find it has no benefit to enable criu for apps,
especially for simple apps.<br>
BEFORE we use criu:<br>
An app is forked by zygote, which means zygote will share
libraries with app. 200ms is needed for a simply app to launch.<br>
<br>
AFTER use criu:<br>
App should dump all the libraries in img. The size of imgs is
about 20M even for a simple demo app, so it may costs 500ms in
CR_STATE_FORKING state.<br>
<br>
My question is:<br>
1.If there is, or, if it is possible to use criu in a PARENT
process, which means we can cut out some logic in criu when
dumping and restoring a CHILD process. Maybe we do not need to
dump libs in this case.<br>
</div>
</blockquote>
<br>
CRIU dump iterates recursively over the process tree. When you
checkpoint a (parent) process this will also dump all child
processes.<br>
<br>
<blockquote type="cite"
cite="mid:CAHUEYAUYPWJDVFXF5fVUMQjxVY7iT0knsb-2huqcqw36L-xGrg@mail.gmail.com">
<div dir="ltr"><br>
2.Why the size of imgs are so large, and what it could be?<br>
<br>
</div>
</blockquote>
<br>
Could you please share the output of "ls -l" for the directory which
contains the image files?<br>
<br>
<blockquote type="cite"
cite="mid:CAHUEYAUYPWJDVFXF5fVUMQjxVY7iT0knsb-2huqcqw36L-xGrg@mail.gmail.com">
<div dir="ltr">Thanks for any light you can shed. <br>
<div><br>
</div>
<div>Nick</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
CRIU mailing list
<a class="moz-txt-link-abbreviated" href="mailto:CRIU@openvz.org">CRIU@openvz.org</a>
<a class="moz-txt-link-freetext" href="https://lists.openvz.org/mailman/listinfo/criu">https://lists.openvz.org/mailman/listinfo/criu</a>
</pre>
</blockquote>
<br>
</body>
</html>