criu icon indicating copy to clipboard operation
criu copied to clipboard

Can we dump without freezing the process?

Open mrc1119 opened this issue 3 years ago • 6 comments

Is there any way to do dump without freezing the process? Because my service is Redis, I have to provide services externally all the time. Or is there a way to reduce the effects of freezing?

Ask each superior to give help!

mrc1119 avatar Jun 16 '22 07:06 mrc1119

criu pre-dump was implemented exactly for this. It allows to dump memory while a process is continue running.

avagin avatar Jun 16 '22 15:06 avagin

criu pre-dump was implemented exactly for this. It allows to dump memory while a process is continue running.

Maybe I didn't give a clear description. I want redis to still handle service requests during dump. Even pre-dump have a freeze operation on Dumpee.

mrc1119 avatar Jun 17 '22 06:06 mrc1119

And I found a mistake when pre-dump:

pie: 55433: __fetched msg: 66 0 0 pie: 55433: __sent ack msg: 66 66 0 pie: 55433: Daemon waits for command (00.193417) Fetched ack: 66 66 0 (00.193419) Error (criu/mem.c:45): BUG at criu/mem.c:45 pie: 55433: Trimmed message received (12/0) pie: 55433: 55433: new_sp=0x7f8bfe2b1688 ip 0x7f8d023eebe1

criu --version

Version: 3.17

mrc1119 avatar Jun 17 '22 06:06 mrc1119

I want redis to still handle service requests during dump

@mrc1119 you can scale in-memory databases like Redis to run with master and replica instances in a cluster. https://redis.io/docs/manual/scaling/

rst0git avatar Jun 21 '22 08:06 rst0git

And I found a mistake when pre-dump: Error (criu/mem.c:45): BUG at criu/mem.c:45

You should not use --track-mem option if your kernel does not have CONFIG_MEM_SOFT_DIRTY. Though the fact that CRIU triggers BUG is wrong, thanks for finding this, see fix: https://github.com/checkpoint-restore/criu/pull/1921

Can we dump without freezing the process?

If you dump process state completely without freezing process you end up with inconsistent dump. So the short answer is NO.

Snorch avatar Jun 21 '22 09:06 Snorch

A friendly reminder that this issue had no activity for 30 days.

github-actions[bot] avatar Jul 22 '22 00:07 github-actions[bot]