Bucket GC works per-bucket-per-space. It means if there are thousands of buckets and each has a few tuples in a few spaces, then GC is going to be quite expensive due to the number of small transactions which delete the space data. For example, with 4k buckets and 1 tuple per bucket their deletion takes > 1 second even in release build. Grouping more than one space into same transaction should help. Need to group them by engine so as multiple spaces could live in the same txn.
Bucket GC works per-bucket-per-space. It means if there are thousands of buckets and each has a few tuples in a few spaces, then GC is going to be quite expensive due to the number of small transactions which delete the space data. For example, with 4k buckets and 1 tuple per bucket their deletion takes > 1 second even in release build. Grouping more than one space into same transaction should help. Need to group them by engine so as multiple spaces could live in the same txn.