View Issue Details

IDProjectCategoryView StatusLast Update
0007798ardourfeaturespublic2019-08-26 20:14
Reporterunfa Assigned To 
PrioritynormalSeverityminorReproducibilityhave not tried
Status newResolutionopen 
Summary0007798: Use clone/CoW copies whenever possible
DescriptionI'm using Btrfs as the base of my Linux systems, a cool thing is that one can create "shallow" file copies there, by simply telling the filesystem "I want to copy this file here" instead of reading and writing the file example: `cp --reflink`. This saves disk space, as actual data is going to only be written when differences between the two files are starting to appear.

I use a lot of snapshots in my Ardour sessions to have backup of my old versions and a way to check how the project evolved over time. This has saved me a couple of times.
However creating the snapshots fro big projects can take around 20- seconds or even longer, while Ardour is completely unresponsive (but the audio still plays).

I've learned that all MIDI regions are being copied for each snapshot - since creating CoW file copies is much faster than regular ones - this process would benefit a lot from using CoW duplication on filesystems like Btrfs and ZFS that support it
TagsNo tags attached.



2019-08-26 20:03

administrator   ~0020757

Ardour load/saves MIDI files (not copies them). e.g. the file could be changed before saving the snapshot. Adding logic to detect when a file can be referenced as CoW is likely complex.

We try to avoid non-portable system specifics. There is very little OS specific code in Ardour, and we try to further reduce it.
Ardour does not directly interact that low level with the system. Besides, copy means reading and writing content. There is no system call (which is why it's slow).

Detecting file-systems and changing behavior depending on FS would have to bring significant benefits before we'd consider special casing it.

I also doubt that there is a significant benefit for the case at hand. MIDI files are perhaps 4kB on average. How large is a ZFS inode? minimum block-size?


2019-08-26 20:14

reporter   ~0020758

I understand, yes that's clearly out of the question then - solely based on the OS-specific code that'd be required and internal "which file was touched" logic.

Issue History

Date Modified Username Field Change
2019-08-26 19:43 unfa New Issue
2019-08-26 20:03 x42 Note Added: 0020757
2019-08-26 20:14 unfa Note Added: 0020758