Giter Site home page Giter Site logo

Comments (5)

edgarrmondragon avatar edgarrmondragon commented on June 11, 2024 1

is the clone option only supported on particularly file systems? If so, which ones?

Here's a good summary1 of OS/FS support:

OS FS Copy command System call
Linux Bcachefs cp --reflink=always ficlone
Btrfs
XFS
OCFS2
Ext4 Unsupported.
OpenZFS
FreeBSD
ZFS
Solaris Oracle ZFS cp -z reflink
MacOS APFS cp -c clonefile
HFS+ Unsupported; non-CoW FS.
Windows NTFS
ReFSv2 Not included. DUPLICATE_EXTENTS_TO_FILE

And they seem to be using reflink-copy2, which has the following to say:

At the moment Linux, Android, OSX, iOS, and Windows are supported.

Note: On Windows, the integrity information features are only available on Windows Server editions starting from Windows Server 2012. Client versions of Windows do not support these features. More Information


What does it fall back to if copy-on-write is not possible, or does it just error instead?

Currently it errors. reflink-copy does have a simple copy fallback3 available and its being reviewed4 in uv.


Is there a practical risk that the hardlinks break, e.g. if the cache is cleared?

I've only done simple testing so AFAICT they should be pretty safe, i.e. each hardlink is a reference so the same file on disk, and deleting a copy only deletes a reference so deleting uv's cache doesn't affect installed wheels.

Footnotes

  1. https://www.ctrl.blog/entry/file-cloning.html

  2. https://docs.rs/reflink-copy/latest/reflink_copy

  3. https://docs.rs/reflink-copy/latest/reflink_copy/fn.reflink_or_copy.html

  4. https://github.com/astral-sh/uv/pull/1773

from meltano.

edgarrmondragon avatar edgarrmondragon commented on June 11, 2024

cc @BTheunissen

from meltano.

edgarrmondragon avatar edgarrmondragon commented on June 11, 2024

In particular uv pip install --link-mode=hardlink seems like an interesting option for boosting performance of plugin installation:

      --link-mode <LINK_MODE>
          The method to use when installing packages from the global cache
          
          [default: clone]

          Possible values:
          - clone:    Clone (i.e., copy-on-write) packages from the wheel into the site packages
          - copy:     Copy packages from the wheel into the site packages
          - hardlink: Hard link packages from the wheel into the site packages

from meltano.

WillDaSilva avatar WillDaSilva commented on June 11, 2024

@edgarrmondragon is the clone option only supported on particularly file systems? If so, which ones? What does it fall back to if copy-on-write is not possible, or does it just error instead? Is there a practical risk that the hardlinks break, e.g. if the cache is cleared?

from meltano.

edgarrmondragon avatar edgarrmondragon commented on June 11, 2024

astral-sh/uv#313 might not be a deal-breaker if we keep uv optional and instruct users to update their pip_urls if they wanna use uv

UPDATE 2024-03-22: This will be fixed in the next uv release.

from meltano.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.