Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[optimization]optimize TarStream for overlay2 #38436

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

firjest
Copy link

@firjest firjest commented Dec 26, 2018

Signed-off-by: yifang.jy yifang.jy@alibaba-inc.com

- What I did
The tarstream actually only needs the data of the current layer, and if the driver's get function is called, it is too heavy. Especially in the business customization process, if use remote disk as lowerdir(in some company like us), the get function needs to prepare the remote disk first and then mount it into overlay2. This process is very long and the remote disk will eventually not be used.

This is a hack way, is there a simpler or more general way to optimize?

This is just an example, for demonstration purposes.
- How I did it

- How to verify it

- Description for the changelog

- A picture of a cute animal (not mandatory but encouraged)

Signed-off-by: yifang.jy <yifang.jy@alibaba-inc.com>
Signed-off-by: yifang.jy <yifang.jy@alibaba-inc.com>
@firjest firjest changed the title optimization [optimization]optimize TarStream for overlay2 Dec 27, 2018
@thaJeztah
Copy link
Member

@codecov
Copy link

codecov bot commented Dec 31, 2018

Codecov Report

❗ No coverage uploaded for pull request base (master@5ddb1d4). Click here to learn what that means.
The diff coverage is 38.88%.

@@            Coverage Diff            @@
##             master   #38436   +/-   ##
=========================================
  Coverage          ?   36.54%           
=========================================
  Files             ?      608           
  Lines             ?    45054           
  Branches          ?        0           
=========================================
  Hits              ?    16466           
  Misses            ?    26303           
  Partials          ?     2285

@tonistiigi
Copy link
Member

Just define DiffGetter() on the driver and layerstore will pick it up automatically. Eg. look at aufs implementation.

Not 100% sure if this is safe for overlay though, in case of the special xattrs on files.

@thaJeztah
Copy link
Member

Not 100% sure if this is safe for overlay though, in case of the special xattrs on files.

ping @dmcgowan ptal

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants