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

Cache is slow if tar file is stored #174

Open
koleksiuk opened this issue Aug 18, 2020 · 0 comments
Open

Cache is slow if tar file is stored #174

koleksiuk opened this issue Aug 18, 2020 · 0 comments

Comments

@koleksiuk
Copy link

In our test case one of the steps involves caching a docker image into the file and restoring it later.

Problem is, if we cache a tar file, the script will compress it which is a time-consuming operation which doesn't really bring a big value.

Default cache command, provided by semaphore:

semaphore@semaphore-vm:~/app_cache_dir$ time tar czPf /tmp/app_image_cache-cac3c3500fc4aa1a4f8dece0edb86e57ad36510e.tar app-image.tar 
real	0m34.813s
user	0m33.855s
sys	0m1.230s

without compression:

semaphore@semaphore-vm:~/app_cache_dir$ time tar cPf /tmp/app_image_cache-cac3c3500fc4aa1a4f8dece0edb86e57ad36510e.2.tar app-image.tar 
real	0m0.708s
user	0m0.049s
sys	0m0.655s

The possible solution would be to provide a flag option to cache, like: cache store --compress=false my_file_or_directory which would add or remove z option from tar command.

@koleksiuk koleksiuk changed the title Cache slow if packing tar files Cache is slow if tar file is stored Aug 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant