accelerated-container-image icon indicating copy to clipboard operation
accelerated-container-image copied to clipboard

How to configure p2p and cache

Open dbfancier opened this issue 2 years ago • 10 comments

    > @bengbeng-pp Currently in Alibaba Cloud, only the Function Compute uses trace prefetching, because it's relatively easier for them to record trace. Some business are reluctant to do such a thing.

I think what you need is Cache + P2P distribution. For each of them DADI has an open-source implementation. By setting up a large scale of SSD cluster, you basically distribute / cache every hot piece of data in the network and thus a mighty network filesystem is formed :-)

Hello,Is there any documentation on how to configure cache and p2p? When I pulled obd format image from registry, I can not see anything from /opt/overlaybd/registry_cache

Originally posted by @dbfancier in https://github.com/containerd/accelerated-container-image/issues/120#issuecomment-1291546382

dbfancier avatar Oct 26 '22 06:10 dbfancier

We have provided an implementation of p2p image distribution (https://github.com/data-accelerator/dadi-p2proxy).

You are welcome to join slack or wechat group to chat with us, if you have any deployment questions.

beef9999 avatar Oct 26 '22 08:10 beef9999

@dbfancier if p2p is used, cache is managed by p2p, so nothing could see in /opt/overlaybd/registry_cache. You can refer to this config file to configure p2p. And @Coldwings is going to write a detailed document.

liulanzheng avatar Oct 26 '22 09:10 liulanzheng

@beef9999 thanks a lot, I will try this and reply you. and how can I join wechat ?

dbfancier avatar Oct 26 '22 13:10 dbfancier

@dbfancier if p2p is used, cache is managed by p2p, so nothing could see in /opt/overlaybd/registry_cache. You can refer to this config file to configure p2p. And @Coldwings is going to write a detailed document.

but I still haven't configured p2p, and saw error like this:

/root/overlaybd/src/overlaybd/cache/frontend/cached_fs.cpp:47|open:Open source file failed errno=1(Operation not permitted)

dbfancier avatar Oct 26 '22 13:10 dbfancier

@dbfancier I guess the reason is about authentication config. you may refer to this https://github.com/containerd/overlaybd#credential-config to config auth file for overlaybd-tcmu.

If this is not solved, please show me the whole logs.

liulanzheng avatar Oct 27 '22 05:10 liulanzheng

@dbfancier I guess the reason is about authentication config. you may refer to this https://github.com/containerd/overlaybd#credential-config to config auth file for overlaybd-tcmu.

If this is not solved, please show me the whole logs.

@liulanzheng It's useful to correct the content of this file to solve the error, but I still got nothing in cache directory

I built the image in following way:

buildctl build --frontend=dockerfile.v0 --local context=. --local dockerfile=. --output type=image,name=my-image,push=true --export-cache type=inline --import-cache type=registry,ref=my-image

did I do somthing wrong?

By the way, could you please provide me the way to join the wechat group, I am looking forward to further exchanges with you. thank u

dbfancier avatar Oct 27 '22 06:10 dbfancier

@dbfancier You can find my email on my homepage.

beef9999 avatar Oct 27 '22 07:10 beef9999

@dbfancier First, images have to be converted to overlaybd format. Then this overlaybd image can be run as remote image, on-demand load data can be found in cache directory.

Base on the converted overlaybd image, you can build images use our customized buildkit. and for now this customized buildkit need some special configuration, like use containerd-worker-snapshotter to run buildkitd, and need 'oci-mediatypes=true,compression=uncompressed' for output for buildctl.

For more details about image conversion and building, please refer to my just written quickstart. you may help to improve this document for the problems you encountered.

You can connect to @beef9999 or me through email with your wechat id.

liulanzheng avatar Oct 27 '22 08:10 liulanzheng

@dbfancier First, images have to be converted to overlaybd format. Then this overlaybd image can be run as remote image, on-demand load data can be found in cache directory.

Base on the converted overlaybd image, you can build images use our customized buildkit. and for now this customized buildkit need some special configuration, like use containerd-worker-snapshotter to run buildkitd, and need 'oci-mediatypes=true,compression=uncompressed' for output for buildctl.

For more details about image conversion and building, please refer to my just written quickstart. you may help to improve this document for the problems you encountered.

You can connect to @beef9999 or me through email with your wechat id.

thanks, your reply helped me a lot!

dbfancier avatar Oct 27 '22 08:10 dbfancier

@dbfancier if p2p is used, cache is managed by p2p, so nothing could see in /opt/overlaybd/registry_cache. You can refer to this config file to configure p2p. And @Coldwings is going to write a detailed document.

Excuse me, has the detailed document been completed?

qi0523 avatar Apr 01 '23 04:04 qi0523