Thanks Ferdinand, this helped a lot. Quick PoC with installing/purging a samba4 (13.5MB):
# grep btrfs /proc/mounts && uname -r /dev/sda2 / btrfs rw,nodev,noatime 0 0 2.6.35-27-generic
# sysctl -w vm.drop_caches=3 # time (LD_PRELOAD=/usr/local/lib/libnosync.so apt-get -y install samba4 && sync) real 0m31.115s user 0m1.620s sys 0m3.150s
# time (LD_PRELOAD=/usr/local/lib/libnosync.so apt-get -y purge samba4 && sync) real 0m30.940s user 0m1.370s sys 0m2.690s
# sysctl -w vm.drop_caches=3 # time (apt-get install samba4 && sync) real 0m41.611s user 0m1.530s sys 0m3.250s
# time (apt-get purge -y samba4 && sync) real 0m40.015s user 0m1.390s sys 0m2.850s
And this is reproducible: so it's always 30 or 31 seconds with libnosync and always ~10sec more w/o libnosync.
Thanks Ferdinand, this helped a lot. Quick PoC with installing/purging a samba4 (13.5MB):
# grep btrfs /proc/mounts && uname -r
/dev/sda2 / btrfs rw,nodev,noatime 0 0
2.6.35-27-generic
# sysctl -w vm.drop_caches=3 /usr/local/ lib/libnosync. so apt-get -y install samba4 && sync)
# time (LD_PRELOAD=
real 0m31.115s user 0m1.620s sys 0m3.150s
# time (LD_PRELOAD= /usr/local/ lib/libnosync. so apt-get -y purge samba4 && sync)
real 0m30.940s user 0m1.370s sys 0m2.690s
# sysctl -w vm.drop_caches=3
# time (apt-get install samba4 && sync)
real 0m41.611s user 0m1.530s sys 0m3.250s
# time (apt-get purge -y samba4 && sync)
real 0m40.015s user 0m1.390s sys 0m2.850s
And this is reproducible: so it's always 30 or 31 seconds with libnosync and always ~10sec more w/o libnosync.