Directory backend for long-term containers?

I understand that filesystems like ZFS/Btrfs are ideal when frequently creating/cloning new containers etc. due to features like CoW.

From what I can tell, they however perform worse for general desktop use (reading & writing data of average size and quantity).

I have some containers that hold large applications (and their environment) for many months without any cloning, snapshots or the likes. What do you think about using a directory-based storage backend on ext4 for those (leaving Btrfs for transient / microservice containers)? I know this isn’t the typical container use case, but it might give sufficient performance benefits (less overhead) to justify it.

I’d love to hear your input!

Yeah, that’s fine to do, so long as you’re fine with all the restrictions of directory based containers.

Another approach would be to create custom storage volumes on a dir backed pool and attach those to the containers that need it.

1 Like

We are now running dir backed for a year on lxd all good.

1 Like

Could you elaborate a bit on “all the restrictions”

I am a new LXD user and I have a similar doubt. I am intending to use LXD to setup a development environment on top of my main Ubuntu installation. As I would not like to mess up my main system, I would like to setup a sort of VM. I do not have space for any additional partition. Therefore, I am limited to loop device or dir.

Please, could someone advise on the recommended LXD setup for a development environment (mainly for developing and compiling of applications)?

Thanks in advance.