[CRIU] Using CRIU to reduce the launch time of app

梁辰 haveagoodtime2010 at gmail.com
Mon Aug 19 14:53:04 MSK 2019


We are using CRIU to reduce the startup time of some system services and
applications in our own system(OS like Android).

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.

However, we find it has no benefit to enable criu for apps, especially for
simple apps.
BEFORE we use criu:
An app is forked by zygote, which means zygote will share libraries with
app. 200ms is needed for a simply app to launch.

AFTER use criu:
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.

My question is:
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.

2.Why the size of imgs are so large, and what it could be?

Thanks for any light you can shed.

Nick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openvz.org/pipermail/criu/attachments/20190819/51031590/attachment.html>


More information about the CRIU mailing list