Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for CRIU page server #5

Open
SallyKAN opened this issue Nov 1, 2022 · 0 comments
Open

Support for CRIU page server #5

SallyKAN opened this issue Nov 1, 2022 · 0 comments

Comments

@SallyKAN
Copy link

SallyKAN commented Nov 1, 2022

Hi, fastfreeze is an amazing job!
I am currently using fastfreeze to bootstrap the start-up of Java applications, however, I have found that during the restore process, the most time cost comes from writing images to files on disk (including uncompressing). For example, the total time of the restore process is 1.3 sec, but the I/O operation might take up 0.7 sec.

[ff.run] (0.038s) Application clock: 47.1s
[ff.run] (0.041s) Starting set_ns_last_pid server
[ff.run] (0.042s) + set_ns_last_pid /var/tmp/fastfreeze/run/set_ns_last_pid.sock
[ff.run] (0.142s) Continuing reading image in memory...
[ff.run] (0.706s) Uncompressed image size is 695 MiB, rate: 1022 MiB/s
[ff.run] (0.706s)   Shard 1: 158 MiB, rate: 233 MiB/s
[ff.run] (0.706s)   Shard 2: 182 MiB, rate: 268 MiB/s
[ff.run] (0.706s)   Shard 3: 184 MiB, rate: 271 MiB/s
[ff.run] (0.706s)   Shard 4: 170 MiB, rate: 250 MiB/s
[ff.run] (1.272s) criu> (00.563271) Running pre-resume scripts
[ff.run] (1.272s) criu> (00.563505) Restore finished successfully. Tasks resumed.
[ff.run] (1.272s) criu> (00.563512) Writing stats
[ff.run] (1.272s) criu> (00.563610) Dismissing the image streamer
[ff.run] (1.272s) criu> (00.563657) Running post-resume scripts
[ff.run] (1.273s) Application is ready, restore took 1.3s

Since fastfreeze uses CRIU as the core engine, I noticed there is a page server option in CRIU to optimize the memory transfer process, but it only supports transferring page images on the fly. Considering fastfreeze would compress all the images generated by criu-image-streamer, I am wondering if fastfreeze supports CRIU page server function?

Also, I searched the source code of fastfreeze, there is an option called tcp_listen_remap which is not mentioned in the README doc now, could it be used to optimize the memory transfer process?

 let Self {
                image_url, app_args, on_app_ready_cmd, no_restore,
                allow_bad_image_version, passphrase_file, preserved_paths,
                tcp_listen_remap, leave_stopped, verbose: _, app_name,
                no_container } = self;

Thanks in advance!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant