I did some more tests. Finally I see similar results (with the exception of one "portsnap extract" test). Also with 13.0 I can't trigger a bug that I describe here: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=250576 ---------------------------------------------------------------------------------------------------------------------------------------------------------- Command: /usr/bin/time -l rm -fr /usr/ports /usr/src (these tests done with exactly the same hardware - I upgrade 12.2p4 to 13.0-RC1 for the 2nd test) FreeBSD 12.2p4 12.67 real 0.36 user 1.94 sys 5652 maximum resident set size 8 average shared memory size 4 average unshared data size 139 average unshared stack size 950 page reclaims 0 page faults 0 swaps 49120 block input operations 136 block output operations 0 messages sent 0 messages received 0 signals received 49258 voluntary context switches 0 involuntary context switches 13.18 real 0.41 user 1.81 sys 5896 maximum resident set size 8 average shared memory size 4 average unshared data size 132 average unshared stack size 1074 page reclaims 0 page faults 0 swaps 19463 block input operations 136 block output operations 0 messages sent 0 messages received 0 signals received 19617 voluntary context switches 7 involuntary context switches 12.16 real 0.36 user 1.85 sys 5884 maximum resident set size 7 average shared memory size 3 average unshared data size 125 average unshared stack size 1046 page reclaims 0 page faults 0 swaps 18942 block input operations 136 block output operations 0 messages sent 0 messages received 0 signals received 19096 voluntary context switches 8 involuntary context switches FreeBSD 13.0-RC1 16.71 real 0.63 user 3.02 sys 5580 maximum resident set size 7 average shared memory size 3 average unshared data size 124 average unshared stack size 956 page reclaims 0 page faults 0 swaps 24420 block input operations 136 block output operations 0 messages sent 0 messages received 0 signals received 24596 voluntary context switches 8 involuntary context switche 14.53 real 0.48 user 2.98 sys 5572 maximum resident set size 7 average shared memory size 3 average unshared data size 123 average unshared stack size 954 page reclaims 0 page faults 0 swaps 19426 block input operations 136 block output operations 0 messages sent 0 messages received 0 signals received 19599 voluntary context switches 13 involuntary context switches 13.97 real 0.70 user 2.85 sys 5580 maximum resident set size 8 average shared memory size 4 average unshared data size 130 average unshared stack size 956 page reclaims 0 page faults 0 swaps 18310 block input operations 136 block output operations 0 messages sent 0 messages received 0 signals received 18477 voluntary context switches 25 involuntary context switches ---------------------------------------------------------------------------------------------------------------------------------------------------------- Command: /usr/bin/time -l tar xf src.tar (these tests done with 2 different idle servers but with same 4TB HDDs models) FreeBSD 12.2p4 37.35 real 1.03 user 3.34 sys 8644 maximum resident set size 36 average shared memory size 4 average unshared data size 129 average unshared stack size 773 page reclaims 16 page faults 0 swaps 60 block input operations 4042 block output operations 0 messages sent 0 messages received 0 signals received 874 voluntary context switches 18 involuntary context switches FreeBSD 13.0-RC1 44.97 real 1.15 user 3.34 sys 8840 maximum resident set size 35 average shared memory size 3 average unshared data size 127 average unshared stack size 768 page reclaims 0 page faults 0 swaps 2 block input operations 422 block output operations 0 messages sent 0 messages received 0 signals received 304 voluntary context switches 43 involuntary context switches ---------------------------------------------------------------------------------------------------------------------------------------------------------- Command: /usr/bin/time -l tar xf ports.tar (these tests done with 2 different idle servers but with same 4TB HDDs models) FreeBSD 12.2p4 50.80 real 1.55 user 4.62 sys 15512 maximum resident set size 36 average shared memory size 4 average unshared data size 128 average unshared stack size 2476 page reclaims 0 page faults 0 swaps 120 block input operations 2776 block output operations 0 messages sent 0 messages received 0 signals received 557 voluntary context switches 108 involuntary context switches FreeBSD 13.0-RC1 59.93 real 1.69 user 4.73 sys 15680 maximum resident set size 35 average shared memory size 3 average unshared data size 127 average unshared stack size 2475 page reclaims 0 page faults 0 swaps 28 block input operations 231 block output operations 0 messages sent 0 messages received 0 signals received 2179 voluntary context switches 54 involuntary context switches ---------------------------------------------------------------------------------------------------------------------------------------------------------- Command: /usr/bin/time -l portsnap extract (these tests done with 2 different idle servers but with same 4TB HDDs models) FreeBSD 12.2p4 99.45 real 34.90 user 59.63 sys 49280 maximum resident set size 21 average shared memory size 3 average unshared data size 87 average unshared stack size 11822292 page reclaims 0 page faults 0 swaps 1031 block input operations 1774 block output operations 0 messages sent 0 messages received 0 signals received 355648 voluntary context switches 568 involuntary context switches 100.00 real 34.91 user 59.97 sys 49280 maximum resident set size 20 average shared memory size 3 average unshared data size 87 average unshared stack size 11822292 page reclaims 0 page faults 0 swaps 133 block input operations 2674 block output operations 0 messages sent 0 messages received 0 signals received 354821 voluntary context switches 259 involuntary context switches 82.95 real 35.98 user 60.68 sys 49280 maximum resident set size 20 average shared memory size 2 average unshared data size 86 average unshared stack size 11822292 page reclaims 0 page faults 0 swaps 6 block input operations 1773 block output operations 0 messages sent 0 messages received 0 signals received 354474 voluntary context switches 387 involuntary context switches FreeBSD 13.0-RC1 217.43 real 75.67 user 110.97 sys 49176 maximum resident set size 22 average shared memory size 3 average unshared data size 90 average unshared stack size 12289905 page reclaims 5 page faults 0 swaps 29660 block input operations 508 block output operations 4413 messages sent 2536723 messages received 0 signals received 384200 voluntary context switches 549 involuntary context switches 125.50 real 63.00 user 96.47 sys 49176 maximum resident set size 21 average shared memory size 3 average unshared data size 89 average unshared stack size 12289905 page reclaims 0 page faults 0 swaps 118 block input operations 171 block output operations 4413 messages sent 2536723 messages received 0 signals received 354513 voluntary context switches 444 involuntary context switches 118.93 real 62.91 user 96.28 sys 49176 maximum resident set size 21 average shared memory size 3 average unshared data size 89 average unshared stack size 12289905 page reclaims 0 page faults 0 swaps 0 block input operations 171 block output operations 4413 messages sent 2536723 messages received 0 signals received 354404 voluntary context switches 409 involuntary context switches
On Sat, Mar 06, 2021 at 12:27:55AM +0200, Christos Chatzaras wrote:> I did some more tests. Finally I see similar results (with the exception of one "portsnap extract" test). Also with 13.0 I can't trigger a bug that I describe here: > > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=250576 > > ---------------------------------------------------------------------------------------------------------------------------------------------------------- > > Command: /usr/bin/time -l rm -fr /usr/ports /usr/src (these tests done with exactly the same hardware - I upgrade 12.2p4 to 13.0-RC1 for the 2nd test) > > FreeBSD 12.2p4 > > 12.67 real 0.36 user 1.94 sys > 13.18 real 0.41 user 1.81 sys > 12.16 real 0.36 user 1.85 sys> FreeBSD 13.0-RC1 > > 16.71 real 0.63 user 3.02 sys > 14.53 real 0.48 user 2.98 sys > 13.97 real 0.70 user 2.85 sys > > Command: /usr/bin/time -l tar xf src.tar (these tests done with 2 different idle servers but with same 4TB HDDs models) > > FreeBSD 12.2p4 > > 37.35 real 1.03 user 3.34 sys > > FreeBSD 13.0-RC1 > > 44.97 real 1.15 user 3.34 sys > > ---------------------------------------------------------------------------------------------------------------------------------------------------------- > > Command: /usr/bin/time -l tar xf ports.tar (these tests done with 2 different idle servers but with same 4TB HDDs models) > > FreeBSD 12.2p4 > > 50.80 real 1.55 user 4.62 sys > > FreeBSD 13.0-RC1 > > 59.93 real 1.69 user 4.73 sys > > ---------------------------------------------------------------------------------------------------------------------------------------------------------- > > > Command: /usr/bin/time -l portsnap extract (these tests done with 2 different idle servers but with same 4TB HDDs models) > > FreeBSD 12.2p4 > > 99.45 real 34.90 user 59.63 sys > 100.00 real 34.91 user 59.97 sys > 82.95 real 35.98 user 60.68 sys > > FreeBSD 13.0-RC1 > > 217.43 real 75.67 user 110.97 sys > 125.50 real 63.00 user 96.47 sys > 118.93 real 62.91 user 96.28 sysI trimmed the data above to show the interesting numbers more compact. In the portsnap results for 13RC1, the variance is too high to conclude anything, I think. There was (is) bugs in FreeBSD UFS SU < 13 - some LoR existed in SU code, where it needed to lock a containing directory to provide posix guarantees for fsync(), while owning the vnode lock. I do not believe it is observable in a real-world uses - in some situations UFS SU in < 13 did not performed necessary fsync() of the directory, related to the previous item The end result was that after sucessfull fsync() followed by a system failure e.g. power or panic, the parent directory for the synced vnode would not be synced and the vnode dirent' is not written to the permanent store. This volatiles posix requirement that after fsync, the data can be read, since you plain cannot open the file. During the development of the patch to fix both LoR and related ommission of fsync, a mistake was made resulting in much more aggessive syncing of directories. It was not exactly that, but approximately, on most of metadata operations that created or removed directory entry, the directory was fully synced. This resulted in the significant slow down, which was eliminated around BETA4..RC1. I.e. most of fixes come to BETA4, but minor parts were only discovered later and ready for RC1. There are still more fsync(dir) in 13RC1 than it is in any 12, by the nature of the bug and its fix, but the current belief is that all fsync calls left in the flow are required for correctness.