Community discussions

MikroTik App
 
User avatar
Kentzo
Long time Member
Long time Member
Topic Author
Posts: 510
Joined: Mon Jan 27, 2014 3:35 pm
Location: California

How to achieve memory deduplication?

Wed Nov 29, 2023 10:51 pm

Since containers consist of layers, multiple containers based on the same image will share the same layer.

I see that /disk (at least with ROSE installed) supports the btrfs format which, under the hood, supports copy-on-write making deduplication possible on the file system level. Thus the kernel can minimize RAM allocation by reading blocks shared among multiple containers just once.

But that's theory, have anyone tried / benchmarked that in practice?
 
User avatar
Kentzo
Long time Member
Long time Member
Topic Author
Posts: 510
Joined: Mon Jan 27, 2014 3:35 pm
Location: California

Re: How to achieve memory deduplication?

Wed Nov 29, 2023 11:04 pm

I see that there is an undocumented parameter in /container/config: layer-dir.

I wonder whether it's for the container extraction algorithm used by RouterOS to share common layers and works even on ext4. Has anyone tried it?

Who is online

Users browsing this forum: No registered users and 2 guests