containers / fuse-overlayfs

FUSE implementation for overlayfs
GNU General Public License v2.0
502 stars 83 forks source link

Mount with fuse-overlayfs is about 7x slower than mount with /usr/bin/mount #390

Closed graysky2 closed 7 months ago

graysky2 commented 1 year ago

After using fuse-overlayfs to mount my browser profile, I noticed some significant slow down in response time. I can confirm about a 7x slow down just using a simple dd file write.

When mounted using /usr/bin/mount:

 dd if=/dev/zero of=/home/me/.config/chromium/test bs=1M count=4024 status=progress oflag=sync
4024+0 records in
4024+0 records out
4219469824 bytes (4.2 GB, 3.9 GiB) copied, 0.660562 s, 6.4 GB/s

% mount | grep over
overlaid on /run/user/1000/psd/me-chromium type overlay (rw,nosuid,nodev,relatime,lowerdir=/home/me/.config/chromium-backup,upperdir=/run/user/1000/psd/me-chromium-rw,workdir=/run/user/1000/psd/.me-chromium)

When mounted using fuse-overlayfs:

% dd if=/dev/zero of=/home/me/.config/chromium/test bs=1M count=4024 status=progress oflag=sync
3556769792 bytes (3.6 GB, 3.3 GiB) copied, 4 s, 889 MB/s
4024+0 records in
4024+0 records out
4219469824 bytes (4.2 GB, 3.9 GiB) copied, 4.46488 s, 945 MB/s

% mount | grep over
fuse-overlayfs on /run/user/1000/psd/me-chromium type fuse.fuse-overlayfs (rw,nosuid,nodev,noatime,user_id=1000,group_id=100,default_permissions)

I am calling fuse-overlayfs to mount using this set of options... is there another I can add in order to increase the read/write speed?

graysky2 commented 7 months ago

@giuseppe - any thoughts or tips to speed up?

giuseppe commented 7 months ago

unfortunately FUSE is slow. I've tried different things in the past but I never got it to a decent speed when writing files. Have you considered using native overlay?

graysky2 commented 7 months ago

Yes, the native overlay is what I have been using. Just wanted to confirm that I did not omit an option for FUSE which might explain the slow down.