mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-29 02:13:23 +00:00
289dd22132
Summary of this change: - Simplify code. - Stop a disk image from being cached in the binary cache. - Make erofs Nix Store image build in an acceptable time outside of testing environments (like `darwin.builder`). - Do not regress on performance for tests that use many store paths in their Nix store image. - Slightly longer startup time for tests where not many store paths are included in the image (these probably shouldn't use `useNixStoreImage` anyways). - Slightly longer startup time when inputs of VM do not change because the Nix store image is not cached anymore. Remove the `storeImage` built with make-disk-image.nix. This produced a separate derivation which is then cached in the binary cache. These types of images should be avoided because they gunk up the cache as they change frequently. Now all Nix store images, whether read-only or writable are based on the erofs image previously only used for read-only images. Additionally, simplify the way the erofs image is built by copying the paths to include to a separate directory and build the erofs image from there. Before this change, the list of Nix store paths to include in the Nix store image was converted to a complex regex that *excludes* all other paths from a potentially large Nix store. This previous approach suffers from two issues: 1. The regex is complex and, as admitted in the source code of the includes-to-excludes.py script, most likely contains at least one error. This means that it's unlikely that anyone will touch this piece of software again. 2. When the Nix store image is built from a large Nix store (like when you build the VM script to run outside of any testing context) this regex becomes painfully slow. There is at least one prominent use-case where this matters: `darwin.builder`. Benchmarking impressions: - Building Nix store via make-disk-image.nix takes ~25s - Building Nix store as an erofs image takes ~4s - Running nixosTests.qemu-vm-writable-store-image takes ~10s when building the erofs image with the regex vs ~14s when building by copying to a temporary directory. - nixosTests.gitlab which had the biggest gains from the initial erofs change takes the same time as before. - On a host with ~140k paths in /nix/store, building the erofs image with the regex takes 410s as opposed to 6s when copying to a temporary directory. |
||
---|---|---|
.. | ||
podman | ||
amazon-ec2-amis.nix | ||
amazon-image.nix | ||
amazon-init.nix | ||
amazon-options.nix | ||
anbox.nix | ||
appvm.nix | ||
azure-agent.nix | ||
azure-bootstrap-blobs.nix | ||
azure-common.nix | ||
azure-config-user.nix | ||
azure-config.nix | ||
azure-image.nix | ||
azure-images.nix | ||
brightbox-config.nix | ||
brightbox-image.nix | ||
build-vm.nix | ||
cloudstack-config.nix | ||
container-config.nix | ||
containerd.nix | ||
containers.nix | ||
cri-o.nix | ||
digital-ocean-config.nix | ||
digital-ocean-image.nix | ||
digital-ocean-init.nix | ||
docker-image.nix | ||
docker-rootless.nix | ||
docker.nix | ||
ec2-amis.nix | ||
ec2-data.nix | ||
ec2-metadata-fetcher.sh | ||
ecs-agent.nix | ||
gce-images.nix | ||
google-compute-config.nix | ||
google-compute-image.nix | ||
grow-partition.nix | ||
hyperv-guest.nix | ||
hyperv-image.nix | ||
incus.nix | ||
kubevirt.nix | ||
kvmgt.nix | ||
libvirtd.nix | ||
linode-config.nix | ||
linode-image.nix | ||
lxc-container.nix | ||
lxc-image-metadata.nix | ||
lxc-instance-common.nix | ||
lxc.nix | ||
lxcfs.nix | ||
lxd-agent.nix | ||
lxd-virtual-machine.nix | ||
lxd.nix | ||
multipass.nix | ||
nixos-containers.nix | ||
oci-common.nix | ||
oci-config-user.nix | ||
oci-containers.nix | ||
oci-image.nix | ||
oci-options.nix | ||
openstack-config.nix | ||
openstack-metadata-fetcher.nix | ||
openstack-options.nix | ||
openvswitch.nix | ||
parallels-guest.nix | ||
proxmox-image.nix | ||
proxmox-lxc.nix | ||
qemu-guest-agent.nix | ||
qemu-vm.nix | ||
rosetta.nix | ||
spice-usb-redirection.nix | ||
vagrant-guest.nix | ||
vagrant-virtualbox-image.nix | ||
virtualbox-guest.nix | ||
virtualbox-host.nix | ||
virtualbox-image.nix | ||
vmware-guest.nix | ||
vmware-host.nix | ||
vmware-image.nix | ||
waydroid.nix | ||
xe-guest-utilities.nix | ||
xen-dom0.nix | ||
xen-domU.nix |