datto / dattobd

kernel module for taking block-level snapshots and incremental backups of Linux block devices

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Will the system memory exhaust?

zhanghaiyang9999 opened this issue · comments

After creating the snapshot, if the original volume data changes very frequently, will the system memory be exhausted?
Because when one bio comes, need to clone one bio and add the bio to the queue via bio_queue_add.

If the cow file writing is slower than the original volume writing speed, the system memory must be used exhaust and cause system crash, right?

yes, but there is a limit. a given block will only be cowed once. So for example, the superblock gets rewritten to many times, it's only going to end up in the cow file the first time.
that said if you take the worse case scenario and rewrite the entire disk while taking a snapshot, yes you could run into that problem, but you'll blow out the cow file before that happens.

yeah. We have seen the effect you are talking about but we've never run into the case where we ran out of memory before we ran out of cow file.
maybe you could contrive such a situation, but we've never seen it in normal use.