Low performance of FastOCI
gorbak25 opened this issue · 3 comments
Hi!
I've checked out FastOCI and ran some vm's using it. Unfortunately FastOCI has a prohibitive overhead, when booting vm's using cloud hypervisor then:
On FastOCI images:
root@localhost:~# systemd-analyze
Startup finished in 3.881s (kernel) + 4.782s (userspace) = 8.664s
graphical.target reached after 4.778s in userspace
root@localhost:~#
On OverlayBD images:
root@localhost:~# systemd-analyze
Startup finished in 3.608s (kernel) + 894ms (userspace) = 4.503s
graphical.target reached after 889ms in userspace
root@localhost:~# systemd-analyze
FastOCI did not only affect the boot time but the VM was feeling way less snappy in interactive use and workloads like spawning containers on the VM took twice as long on FastOCI compared to OverlayBD.
In some cases, fastoci is slower than normal overlaybd because of one more index search and gzip decompress.
You can change the 'refillsize' of gzip cache, this may get a little help.
https://github.com/containerd/overlaybd/blob/4b19a8df68821b9ed7c94656c295dcb3cf8e6370/src/config.h#LL81C8-L81C8
FastOCI is definitely slower, simply because gzip was not designed for this purpose. Despite there is workaround to make it work, it's still slower than overlaybd, a format born for this.
Thank you for the answers, that explains everything :) Closing this issue.