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

Radostin Stoyanov rstoyanov1 at gmail.com
Sun Sep 1 12:51:46 MSK 2019


Hello Nick,

On 19/08/2019 12:53, 梁辰 wrote:
> 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.

CRIU dump iterates recursively over the process tree. When you 
checkpoint a (parent) process this will also dump all child processes.

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

Could you please share the output of "ls -l" for the directory which 
contains the image files?

> Thanks for any light you can shed.
>
> Nick
>
> _______________________________________________
> CRIU mailing list
> CRIU at openvz.org
> https://lists.openvz.org/mailman/listinfo/criu

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openvz.org/pipermail/criu/attachments/20190901/227b3736/attachment.html>


More information about the CRIU mailing list