Sysop: | Amessyroom |
---|---|
Location: | Fayetteville, NC |
Users: | 43 |
Nodes: | 6 (0 / 6) |
Uptime: | 107:28:26 |
Calls: | 290 |
Files: | 905 |
Messages: | 76,677 |
The no-unsafe-io workaround in dpkg was needed for 2005-era ext2fs
issues,
where a power-cut in the middle of filesystem metadata
operation (which dpkg does a lot) might result in in unconsistent
filesystem state. This workaround slowed down dpkg operations
quite significantly (and has been criticised due to that a lot,
the difference is really significant).
The workaround is to issue fsync() after almost every filesystem
operation, instead of after each transaction as dpkg did before.
Once again: dpkg has always been doing "safe io", the workaround
was needed for ext2fs only, - it was the filesystem which was
broken, not dpkg.
Today, doing an fsync() really hurts, - with SSDs/flash it reduces
the lifetime of the storage, for many modern filesystems it is a
costly operation which bloats the metadata tree significantly,
resulting in all further operations becomes inefficient.
How about turning this option - force-unsafe-io - to on by default
in 2025? That would be a great present for 2025 New Year! :)
On Sat, 28 Dec 2024 00:13:02 +0100, Aurélien COUDERCthen… great news and super cool !
<coucouf@debian.org> wrote:
Totally agreed : yes it would be extremely useful to have some snapshotting feature for apt operations, and no we're never going to get there if we wait for every single filesystem on every kernel to implement it. So if this has to start with btrfs
Do we have data about how many of our installation would be eligible
to profit from this new invention? I might think it would be better to
spend time on features that all users benefit from (in the case of
Today, doing an fsync() really hurts, - with SSDs/flash it reduces
the lifetime of the storage, for many modern filesystems it is a
costly operation which bloats the metadata tree significantly,
resulting in all further operations becomes inefficient.
How about turning this option - force-unsafe-io - to on by default
in 2025? That would be a great present for 2025 New Year! :)
There is a possible related, but independent, optimization that has the chance to significantly reduce dpkg install's time up to 90%.
There is PoC patch [1,2] to teach dpkg to reflink files from data.tar
instead of copying them. With no changes in semantics or FS operations, the time to install big packages like linux-firmware goes down from 39 seconds
to 6 seconds. The use of reflink would have no adverse consequences for
users of ext4, but it would greatly speed up package installation on XFS, btrfs and (in some cases) ZFS.
Further reading: look at the auto_da_alloc option in ext4. Note that it says that doing the rename without the sync is wrong, but there's now a heuristic in ext4 that tries to insert an implicit sync when that anti-pattern is used (because so much data got eaten when people did the wrong thing). By leaning on that band-aid dpkg might get away with skipping the sync, but doing so would require assuming a filesystem for which that implicit guarantee is available. If you're on a different filesystem or a different kernel all
bets would be off. I don't know how much difference skipping the fsync's makes these days if they get done implicitly.
On Thu, Dec 26, 2024 at 01:19:34PM -0500, Michael Stone wrote:
Further reading: look at the auto_da_alloc option in ext4. Note that it says >> that doing the rename without the sync is wrong, but there's now a heuristic >> in ext4 that tries to insert an implicit sync when that anti-pattern is used >> (because so much data got eaten when people did the wrong thing). By leaning >> on that band-aid dpkg might get away with skipping the sync, but doing so
would require assuming a filesystem for which that implicit guarantee is
available. If you're on a different filesystem or a different kernel all
bets would be off. I don't know how much difference skipping the fsync's
makes these days if they get done implicitly.
Note that it's not a sync, but rather, under certain circumstances, we initiate writeback --- but we don't wait for it to complete before
allowing the close(2) or rename(2) to complete. For close(2), we will initiate a writeback on a close if the file descriptor was opened
using O_TRUNC and truncate took place to throw away the previous
contents of the file. For rename(2), if you rename on top of a
previously existing file, we will initiate the writeback right away.
This was a tradeoff between safety and performance, and this was done
because there was an awful lot of buggy applications out there which
didn't use fsync, and the number of application programmers greatly outnumbered the file system programmer. This was a compromise that
was discussed at a Linux Storage, File Systems, and Memory Management (LSF/MM) conference many years ago, and I think other file systems
like btrfs and xfs had agreed in principle that this was a good thing
to do --- but I can't speak to whether they actually implemented it.
So what what dpkg could do is whenever there is a file that dpkg
would need to overwrite, to write it out to "filename.dpkg-new-$pid"
and keep a list of all the files. After all of the files are
written out, call syncfs(2) --- on Linux, syncfs(2) is synchronous,
although POSIX does not guarantee that the writes will be written
and stable at the time that syncfs(2) returns. But that should be
OK, since Debian GNU/kFreeBSD is no longer a thing. Only after
syncfs(2) returns, do you rename all of the dpkg-new files to the
final location on disk.
Note that it's not a sync, but rather, under certain circumstances, we >initiate writeback --- but we don't wait for it to complete before
allowing the close(2) or rename(2) to complete. For close(2), we will >initiate a writeback on a close if the file descriptor was opened
using O_TRUNC and truncate took place to throw away the previous
contents of the file. For rename(2), if you rename on top of a
previously existing file, we will initiate the writeback right away.
This was a tradeoff between safety and performance, and this was done
because there was an awful lot of buggy applications out there which
didn't use fsync, and the number of application programmers greatly >outnumbered the file system programmer. This was a compromise that
was discussed at a Linux Storage, File Systems, and Memory Management >(LSF/MM) conference many years ago, and I think other file systems
like btrfs and xfs had agreed in principle that this was a good thing
to do --- but I can't speak to whether they actually implemented it.
1. create .dpkg-new file
2. write data to .dpkg-new file
3. link existing file to .dpkg-old
4. rename .dpkg-new file over final file name
5. clean up .dpkg-old file
When we reach step 4, the data needs to be written to disk and the metadata in
the inode referenced by the .dpkg-new file updated, otherwise we atomically replace the existing file with one that is not yet guaranteed to be written out.
If a system crashed while dpkg was installing a package, then my
assumption has always been that it's possible that at least this
package
is corrupted.
How about turning this option - force-unsafe-io - to on by default
in 2025? That would be a great present for 2025 New Year! :)
On 24 Dec 2024, at 12:54, Michael Tokarev <mjt@tls.msk.ru> wrote:
Hi!
The no-unsafe-io workaround in dpkg was needed for 2005-era ext2fs
issues, where a power-cut in the middle of filesystem metadata
operation (which dpkg does a lot) might result in in unconsistent
filesystem state. This workaround slowed down dpkg operations
quite significantly (and has been criticised due to that a lot,
the difference is really significant).
The workaround is to issue fsync() after almost every filesystem
operation, instead of after each transaction as dpkg did before.
Once again: dpkg has always been doing "safe io", the workaround
was needed for ext2fs only, - it was the filesystem which was
broken, not dpkg.
Today, doing an fsync() really hurts, - with SSDs/flash it reduces
the lifetime of the storage, for many modern filesystems it is a
costly operation which bloats the metadata tree significantly,
resulting in all further operations becomes inefficient.
How about turning this option - force-unsafe-io - to on by default
in 2025? That would be a great present for 2025 New Year! :)
Thanks,
/mjt
The no-unsafe-io workaround in dpkg was needed for 2005-era ext2fs
issues, where a power-cut in the middle of filesystem metadata
operation (which dpkg does a lot) might result in in unconsistent
filesystem state.
Today, doing an fsync() really hurts, - with SSDs/flash it reduces
the lifetime of the storage, for many modern filesystems it is a
costly operation which bloats the metadata tree significantly,
resulting in all further operations becomes inefficient.
If a system crashed while dpkg was installing a package, then my
assumption has always been that it's possible that at least this package
is corrupted.
You seem to be saying that dpkg needs to make sure that the package is >installed correctly even when this happens. Is that right?
On Tue, Dec 31, 2024 at 05:31:36PM +0100, Sven Mueller wrote:if
It feels wrong to me to justify such a heavy performance penalty this way
Well, I guess we'd have to agree on the definition of "heavy performance penalty". I have not one debian system where dpkg install time is a bottleneck.
On Tue, Dec 31, 2024 at 10:32:09AM -0700, Soren Stoutner wrote:
On my system, which has a Western Digital Black SN850X NVMe (PCIe 4) formatted ext4, dpkg runs really fast (and feels like it runs faster than it did a few years ago on similar hardware). There has been much talk on this list about performance penalties with dpkg’s current configuration, and some requests for actual benchmark data showing those performance penalties.
Doing fsyncs to often after tiny writes will also cause write
amplification on the SSD.
I should use eatmydata more often.
On my system, which has a Western Digital Black SN850X NVMe (PCIe 4) formatted
ext4, dpkg runs really fast (and feels like it runs faster than it did a few years ago on similar hardware). There has been much talk on this list about performance penalties with dpkg’s current configuration, and some requests for
actual benchmark data showing those performance penalties.
It feels wrong to me to justify such a heavy performance penalty this way if
On Tue, Dec 31, 2024 at 10:32:09AM -0700, Soren Stoutner wrote:
On my system, which has a Western Digital Black SN850X NVMe (PCIe 4) formatted
ext4, dpkg runs really fast (and feels like it runs faster than it did a few >> years ago on similar hardware). There has been much talk on this list about >> performance penalties with dpkg’s current configuration, and some requests for
actual benchmark data showing those performance penalties.
Doing fsyncs to often after tiny writes will also cause write
amplification on the SSD.
Hi,
On 12/24/24 18:54, Michael Tokarev wrote:
The no-unsafe-io workaround in dpkg was needed for 2005-era ext2fs
issues, where a power-cut in the middle of filesystem metadata
operation (which dpkg does a lot) might result in in unconsistent
filesystem state.
The thing it protects against is a missing ordering of write() to the contents of an inode, and a rename() updating the name referring to it.
These are unrelated operations even in other file systems, unless you use data journaling ("data=journaled") to force all operations to the journal,
in order. Normally ("data=ordered") you only get the metadata update marking the data valid after the data has been written, but with no ordering
relative to the file name change.
The order of operation needs to be
1. create .dpkg-new file
2. write data to .dpkg-new file
3. link existing file to .dpkg-old
4. rename .dpkg-new file over final file name
5. clean up .dpkg-old file
When we reach step 4, the data needs to be written to disk and the metadata in the inode referenced by the .dpkg-new file updated, otherwise we
atomically replace the existing file with one that is not yet guaranteed to be written out.
This should not make any difference in the number of write operations necessary, and only affect ordering. The data, metadata journal and
metadata update still have to be written.
The only way this could be improved is with a filesystem level
transaction, where we can ask the file system to perform the entire
update atomically -- then all the metadata updates can be queued in
RAM, held back until the data has been synchronized by the kernel in
the background, and then added to the journal in one go. I would expect
that with such a file system, fsync() becomes cheap, because it would
just be added to the transaction, and if the kernel gets around to
writing the data before the entire transaction is synchronized at the
end, it becomes a no-op.
but e.g. puppet might become confused
So no, we cannot drop the fsync(). :\
drop fsync) or by asking the user in other cases or in expert installmode, defaulting to the safer --no-force-unsafe-io.
Hi,
Le 2024-12-30 21:38, Nikolaus Rath a écrit :
If a system crashed while dpkg was installing a package, then my
assumption has always been that it's possible that at least this package
is corrupted.
The issue here is that without the fsync there is a risk that such corruption occurs even if the system crashes _after_ dpkg has finished (or finished installing a package).
Julien Plissonneau DuquΦne <sre4ever@free.fr> writes:
Le 2024-12-30 21:38, Nikolaus Rath a Θcritá:
If a system crashed while dpkg was installing a package, then my
assumption has always been that it's possible that at least this package >>> is corrupted.
The issue here is that without the fsync there is a risk that such corruption
occurs even if the system crashes _after_ dpkg has finished (or finished
installing a package).
That is not my understanding of the issue. The proposal was to disable
fsync after individual files have been unpacked, i.e. multiple times per >package. Not about one final fsync just before dpkg exits.
Le mardi 31 décembre 2024, 18:32:09 UTC+1 Soren Stoutner a écrit :way
On Tuesday, December 31, 2024 10:16:32 AM MST Michael Stone wrote:
On Tue, Dec 31, 2024 at 05:31:36PM +0100, Sven Mueller wrote:
It feels wrong to me to justify such a heavy performance penalty this
performanceif
Well, I guess we'd have to agree on the definition of "heavy performance penalty". I have not one debian system where dpkg install time is a bottleneck.
So far, nobody has
produced any numbers showing that those penalties exist or how significant they are. As I don’t experience anything I could describe as a
plainproblem on any of my systems, I think the burden of proof is on those who are experiencing those problems to demonstrate them concretely before we need to spend effort trying to figure out what changes should be made to address them.Here’s a quick « benchmark » in a sid Plasma desktop qemu VM where I had a
snapshot of up-to-date sid from Nov 24th, upgrading to today’s sid :
Summary:
Upgrading: 658, Installing: 304, Removing: 58, Not Upgrading: 2
Download size: 0 B / 1 032 MB
Space needed: 573 MB / 9 051 MB available
# time apt -y full-upgrade
real 9m49,143s
user 2m16,581s
sys 1m17,361s
# time eatmydata apt -y full-upgrade
real 3m25,268s
user 2m26,820s
sys 1m16,784s
That’s close to a *3 times faster* wall clock time when run with eatmydata.
The measurements are done after first running apt --download-only and taking the VM snapshot to avoid network impact. The VM installation is running
ext4 with 4 vCPU / 4 GiB RAM.
The host was otherwise idle. It runs sid on btrfs with default mount options on top of LUKS with the discard flag set. The VM’s qcow2 file is flagged with
the C / No_COW xattr. It’s a recent Ryzen system with plenty of free RAM / disk space.
While I don’t have a setup to quickly reproduce an upgrade on the bare metal
host in my experience I see comparable impacts. And I’ve experienced similar
behaviours on other machines.
I won’t pretend I know what I’m doing, so I’m probably doing it wrong and myso
installs are probably broken in some obvious way. You were asking for data
here you go with a shiny data point. :)
On Tuesday, December 31, 2024 10:16:32 AM MST Michael Stone wrote:
On Tue, Dec 31, 2024 at 05:31:36PM +0100, Sven Mueller wrote:if
It feels wrong to me to justify such a heavy performance penalty this way
Well, I guess we'd have to agree on the definition of "heavy performance penalty". I have not one debian system where dpkg install time is a bottleneck.
So far, nobody has
produced any numbers showing that those penalties exist or how significant they
are. As I don’t experience anything I could describe as a performance problem
on any of my systems, I think the burden of proof is on those who are experiencing those problems to demonstrate them concretely before we need to spend effort trying to figure out what changes should be made to address them.
Here’s a quick « benchmark » in a sid Plasma desktop qemu VM where I had a snapshot of up-to-date sid from Nov 24th, upgrading to today’s sid :
Summary:
Upgrading: 658, Installing: 304, Removing: 58, Not Upgrading: 2
Download size: 0 B / 1 032 MB
Space needed: 573 MB / 9 051 MB available
# time apt -y full-upgrade
real 9m49,143s
user 2m16,581s
sys 1m17,361s
# time eatmydata apt -y full-upgrade
real 3m25,268s
user 2m26,820s
sys 1m16,784s
That’s close to a *3 times faster* wall clock time when run with eatmydata.
-rw-r--r-- 1 root root 138K Jan 1 18:29 fdisk_2.38.1-5+deb12u2_amd64.deb -rw-r--r-- 1 root root 12M Jan 1 18:29 firmware-amd-graphics_20230210-5_all.deb
Warmup... Timing dpkg with fdisk
.05 .04 .04
Warmup... Timing eatmydata dpkg with fdisk
.03 .02 .02
Warmup... Timing dpkg with firmware-amd-graphics
.46 .47 .45
Warmup... Timing eatmydata dpkg with firmware-amd-graphics
.63 .63 .67
Warmup... Timing dpkg with fdisk
.09 .08 .11
Warmup... Timing eatmydata dpkg with fdisk
.05 .05 .05
Warmup... Timing dpkg with firmware-amd-graphics
3.46 3.58 3.46
Warmup... Timing eatmydata dpkg with firmware-amd-graphics
2.95 2.99 3.06
On Tue, Dec 31, 2024 at 10:32:09AM -0700, Soren Stoutner wrote:
On my system, which has a Western Digital Black SN850X NVMe (PCIe 4) formatted
ext4, dpkg runs really fast (and feels like it runs faster than it did a few
years ago on similar hardware). There has been much talk on this list about
performance penalties with dpkg’s current configuration, and some requests for
actual benchmark data showing those performance penalties.
Doing fsyncs to often after tiny writes will also cause write
amplification on the SSD.
I should use eatmydata more often.
That is an interesting data point. Could you also run with --force-unsafe-io
instead of eatmydata? I don’t know if there would be much of a difference (hence the reason for the need of a good benchmark), but as the proposal here
is to enable --force-unsafe-io by default instead of eatmydata it would be interesting to see what the results of that option would be.
Le mercredi 1 janvier 2025, 19:33:34 UTC+1 Soren Stoutner a écrit :
That is an interesting data point. Could you also run with --force-unsafe-io
instead of eatmydata? I don’t know if there would be much of a difference
(hence the reason for the need of a good benchmark), but as the proposal here
is to enable --force-unsafe-io by default instead of eatmydata it would be interesting to see what the results of that option would be.
Sure but I wouldn’t know how to do that since I’m calling apt and force-unsafe-io seems to be a dpkg option ?
That is an interesting data point. Could you also run with
--force-unsafe-io
Sure but I wouldn’t know how to do that since I’m calling apt and force-unsafe-io seems to be a dpkg option ?
That is not my understanding of the issue. The proposal was to disable
fsync after individual files have been unpacked, i.e. multiple times
per
package. Not about one final fsync just before dpkg exits.
* Then we reworked the code to defer and batch all the fsync()s for
a specific package after all the file writes, and before the
renames,
which was a bit better but not great.
So making any assumptions like we did with spinning drives is mostly
moot at this point, and the industry is very opaque about that layer.
Let's not forget that any server running with a RAID controller will
already have a battery backed or non-volatile cache on the card, plus
new SSDs (esp. higher end consumer (i.e. Samsung 6xx, 8xx, 9xx and
similar) and enterprise drives have unexpected power loss mitigations
in hardware. Let it be supercapacitors or non-volatile caches.
This should not make any difference in the number of write operations
necessary, and only affect ordering. The data, metadata journal and
metadata update still have to be written.
I would expect that some reordering makes it possible for fewer actual physical write operations to happen, i.e. writes to same/neighbouring
blocks get merged/grouped (eventually by the hardware if not the kernel) which would make a difference on both spinning devices performance (less seeks) and solid state devices longevity (as these have larger physical blocks), but I don't know if that's actually how it works in that case.
It would be surprising though that the dpkg man pages (among other
places) talks about performance degradations if these were not real.
That sounds interesting. But — do we have filesystems on Linux that can
do that already, or is this still a wishlist item? Also worth noting, at least one well-known implementation in another OS was deprecated [1]
citing complexity and lack of popularity as the reasons for that
decision, and the feature is missing in their next-gen FS. So maybe it's
not that great after all?
Anyway in the current toolbox besides --force-unsafe-io we also have:
- volume or FS snapshots, for similar or better safety but not the
automatic performance gains; probably not (yet?) available on most systems
- the auto_da_alloc ext4 mount option that AIUI should do The Right
Thing in dpkg's use case even without the fsync, actual reliability and performance impact unknown; appears to be set by default on trixie
- eatmydata
- io_uring that allows asynchronous file operations; implementation
would require important changes in dpkg; potential performance gains in dpkg's use case are not yet evaluated AFAIK but it looks like the right solution for that use case.
Nowadays, most machines are unlikely to be subject to power failures at
the worst time:
On SSDs, it does not matter, both because modern media lasts longer
than the rest of the computer now, and because the load balancer will
largely ignore the logical block addresses when deciding where to put
data into the physical medium anyway.
It would be easier to do in Linux than in Windows
Snapshots only work if there is a way to merge them back afterwards.
What the systemd people are doing with immutable images basically goes
in the direction of snapshots -- you'd unpack the files using "unsafe"
I/O, then finally create an image, fsync() that, and then update the OS metadata which image to load at boot.
- io_uring
That would be Linux specific, though.
My feeling is that this is becoming less and less relevant though,
because it does not matter with SSDs.
My feeling is that this is becoming less and less relevant though, because
it does not matter with SSDs.
My feeling is that this is becoming less and less relevant though,
because it does not matter with SSDs.
Hi,
On 12/24/24 18:54, Michael Tokarev wrote:
The no-unsafe-io workaround in dpkg was needed for 2005-era ext2fs
issues, where a power-cut in the middle of filesystem metadata
operation (which dpkg does a lot) might result in in unconsistent filesystem state.
The thing it protects against is a missing ordering of write() to the contents of an inode, and a rename() updating the name referring to it.
These are unrelated operations even in other file systems, unless you use data journaling ("data=journaled") to force all operations to the journal,
in order. Normally ("data=ordered") you only get the metadata update marking the data valid after the data has been written, but with no ordering
relative to the file name change.
The order of operation needs to be
1. create .dpkg-new file
2. write data to .dpkg-new file
3. link existing file to .dpkg-old
4. rename .dpkg-new file over final file name
5. clean up .dpkg-old file
When we reach step 4, the data needs to be written to disk and the metadata in the inode referenced by the .dpkg-new file updated, otherwise we atomically replace the existing file with one that is not yet guaranteed to be written out.
We get two assurances from the file system here:
1. the file will not contain garbage data -- the number of bytes marked
valid will be less than or equal to the number of bytes actually written.
The number of valid bytes will be zero initially, and only after data has been written out, the metadata update to change it to the final value is added to the journal.
2. creation of the inode itself will be written into the journal before the rename operation, so the file never vanishes.
What this does not protect against is the file pointing to a zero-size
inode. The only way to avoid that is either data journaling, which is horribly slow and creates extra writes, or fsync().
Today, doing an fsync() really hurts, - with SSDs/flash it reduces
the lifetime of the storage, for many modern filesystems it is a
costly operation which bloats the metadata tree significantly,
resulting in all further operations becomes inefficient.
This should not make any difference in the number of write operations necessary, and only affect ordering. The data, metadata journal and metadata update still have to be written.
The only way this could be improved is with a filesystem level transaction, where we can ask the file system to perform the entire update atomically -- then all the metadata updates can be queued in RAM, held back until the data has been synchronized by the kernel in the background, and then added to the journal in one go. I would expect that with such a file system, fsync() becomes cheap, because it would just be added to the transaction, and if the kernel gets around to writing the data before the entire transaction is synchronized at the end, it becomes a no-op.
This assumes that maintainer scripts can be included in the transaction (otherwise we need to flush the transaction before invoking a maintainer script), and that no external process records the successful execution and expects it to be persisted (apt makes no such assumption, because it reads the dpkg status, so this is safe, but e.g. puppet might become confused if
an operation it marked as successful is rolled back by a power loss).
What could make sense is more aggressively promoting this option for containers and similar throwaway installations where there is a guarantee that a power loss will have the entire workspace thrown away, such as when working in a CI environment.
However, even that is not guaranteed: if I create a Docker image for reuse, Docker will mark the image creation as successful when the command returns. Again, there is no ordering guarantee between the container contents and the database recording the success of the operation outside.
So no, we cannot drop the fsync(). :\
Sure but I wouldn’t know how to do that since I’m calling apt and force-unsafe-io seems to be a dpkg option ?
02.01.2025 03:00, Aurélien COUDERC wrote:
Sure but I wouldn’t know how to do that since I’m calling apt and force-unsafe-io seems to be a dpkg option ?
echo force-unsafe-io > /etc/dpkg/dpkg.conf.d/unsafeio
before upgrade.
/mjt
On 12/27/24 11:18 AM, Julian Andres Klode wrote:
On Tue, Dec 24, 2024 at 11:10:27PM +0900, Simon Richter wrote:
....
So no, we cannot drop the fsync(). :\
I do have a plan, namely merge the btrfs snapshot integration into apt,
if we took a snapshot, we run dpkg with --force-unsafe-io.
The cool solution would be to take the snapshot, run dpkg inside it,
and then switch it but one step after the other, that's still very
much WIP.
Hi Julian,
How would that work for non-BTRFS systems, and if not, will that make Debian a BTRFS-only system?
I'm personally fine with "This works faster in BTRFS, because we implemented X", but not with "Debian only works on BTRFS".
Cheers,
Hakan
On 27 Dec 2024, at 20:46, Jonathan Kamens <jik@kamens.us> wrote:implement the optimization within dpkg as seems to be the case here (indeed, it may only be possible to implement the optimization within dpkg), then it is perfectly reasonable to implement the optimization in dpkg. Dpkg is a low-level OS-level utility,
On 12/27/24 7:34 AM, Geert Stappers wrote:
Yeah, it feels wrong that dpkg gets file system code, gets code for oneI disagree. If there is a significant optimization that dpkg can implement that is only available for btrfs, and if enough people use btrfs that there would be significant communal benefit in that optimization being implemented, and if it is easiest to
particular file system.
jik
On 12/27/24 7:34 AM, Geert Stappers wrote:
Yeah, it feels wrong that dpkg gets file system code, gets code for one
particular file system.
I disagree. If there is a significant optimization that dpkg can implement that is only available for btrfs,
Totally agreed : yes it would be extremely useful to have some snapshotting feature for apt operations, and no we're never going to get there if we wait for every single filesystem on every kernel to implement it. So if this has to start with btrfs then… great news and super cool !
Shared infrastructure of course. Note that this includes an update of
the initramfs, which is CPU bound and takes a bit on this system. You
can take around 45s off the clock for the initramfs regeneration in
each run. I did a couple of runs and the results were pretty
consistent.
On Fri, Jan 03, 2025 at 11:49:05AM +0100, Bernhard Schmidt wrote:
Shared infrastructure of course. Note that this includes an update of
the initramfs, which is CPU bound and takes a bit on this system. You
can take around 45s off the clock for the initramfs regeneration in
each run. I did a couple of runs and the results were pretty
consistent.
This tracks with my experience: optimizing initramfs creation would
produce *far* more bang for the buck than fiddling with dpkg fsyncs... especially since we tend to do that repeatedly on any major upgrade. :(