On 2026-Jun-01, Jakub Wartak wrote: > 5. Spotted that we do plenty of initdb and cached-initdb (cp), so I had idea > about XFS's cp reflinks=always in build/, but I couldn't do that without > /dev/loop, so apparently XFS (reflink=1) vs ext4(reflink=0) halves number > of writes while even still on /dev/loop device, but that somehow > does not directly contribute to duration of the test (well we are > bottlenecked on CPU anyway, so this is just smarter? way of avoiding I/O; > maybe with cold-caches and on real VMs running with XFS would be faster)
I wonder if we could somehow make several test use the same instance instead of each creating its own. Look at src/bin/scripts/t/ for instance: we have 14 Cluster->init() calls there, 12 of which have no arguments; that means we could use just one instance for those 12 and it would mostly be fine. (There is some degree of dependency: for example if two tests create the same database, that would at present work fine, but with a common instance it'd fail. Should be easy to fix though.) The only real problem is that we have no mechanism to share the same instance across several .pl files. Maybe there's a way to do this in a smarter way? Maybe have 000_create.pl that does nothing other than Cluster->new(...) and Cluster->init(), and then the other scripts simply do ->init_from_environment() to reuse that instance. Or something like that. -- Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/ "Porque Kim no hacía nada, pero, eso sí, con extraordinario éxito" ("Kim", Kipling)
