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

Lots of fiemap Operation not supported errors in overlaybd.log #217

Open
1 task
simha-db opened this issue Jul 27, 2023 · 14 comments
Open
1 task

Lots of fiemap Operation not supported errors in overlaybd.log #217

simha-db opened this issue Jul 27, 2023 · 14 comments
Labels
bug Something isn't working

Comments

@simha-db
Copy link

What happened in your environment?

Seeing a lot of errors like this

2023/07/27 01:26:09|ERROR|th=00007FDBBE6B1680|/src/src/overlaybd/cache/full_file_cache/cache_store.cpp:100|queryRefillRange:media fiemap failed : -1, offset : 0, size : 4096 errno=95(Operation not supported)

Any idea what this is about? We are side loading the registry cache files for overlaybd - does that have anything to do with these errors?

What did you expect to happen?

No response

How can we reproduce it?

NA

What is the version of your Accelerated Container Image?

0.6.12

What is your OS environment?

Ubuntu 20.04

Are you willing to submit PRs to fix it?

  • Yes, I am willing to fix it.
@simha-db simha-db added the bug Something isn't working label Jul 27, 2023
@liulanzheng
Copy link
Member

@simha-db What filesystem are you using for cache?

@simha-db
Copy link
Author

do u mean for the /opt/overlaybd/registry_cache?

So the disk IO was too slow to download the container images quickly - so i tried the following

  1. Download layers into /dev/shm which is tmpfs
  2. create a symlink from /opt/overlaybd/registry_cache into the /dev/shm/file
  3. Start container
  4. Copy the tmpfs file to /opt/overlaybd/registry_cache in the background and once finishes - remove the symlinks

is fiemap supposed to work with tmpfs?

@liulanzheng
Copy link
Member

@simha-db fiemap is not supported for tmpfs

@simha-db
Copy link
Author

Ah dang it - any other way to buffer the writes? Page cache is u predictable in how it penalizes heavy writes.

@lihuiba
Copy link

lihuiba commented Jul 27, 2023

Downloading layer blobs to tmpfs with background copying should be similar to using /opt/overlaybd/registry_cache directly.
They both download the blobs to memory, and write to disk in background. I don't see much difference.

@simha-db
Copy link
Author

Not necessarily- once the page cache dirty thresholds are hit - it starts flushing and the writes slow down significantly. Using tmpfs allowed us to let overlaybd use the files while we copy - barring a glitch when we delete the symlink which we figured will be retried - but the sparse file support makes it a no go looks like.

@simha-db
Copy link
Author

Btw what happens when the tmpfs errors out? We did not see errors in the container startup. Does it fallback to something else?

@lihuiba
Copy link

lihuiba commented Jul 27, 2023

writes slow down significantly

It slows down because there's not much free memory, so it must wait for flushing. The same happens for tmpfs, which is also backed by page cache.

We did not see errors in the container startup

I believe its a bug. It doesn't deal with the errors returned by fiemap(), and take it as cache-hit.

@simha-db
Copy link
Author

Oh what does it return to the container?

@lihuiba
Copy link

lihuiba commented Jul 27, 2023

It reads data from the blobs in the tmpfs, and returns the data to the container. It happens to go as what you wanted :-)

@simha-db
Copy link
Author

simha-db commented Jul 27, 2023

Not the happy case. I am referring to

I believe its a bug. It doesn't deal with the errors returned by fiemap(), and take it as cache-hit.

Since i did not see any errors - what happens when the fiemap failed?

@simha-db
Copy link
Author

@lihuiba @liulanzheng Does overlaybd read registry cache files with O_DIRECT? I saw it does when using libaio - we use psync -

@liulanzheng
Copy link
Member

@lihuiba @liulanzheng Does overlaybd read registry cache files with O_DIRECT? I saw it does when using libaio - we use psync -

o_direct is not used

@lihuiba
Copy link

lihuiba commented Jul 31, 2023

what happens when the fiemap failed?

The cache take it as cache-hit, and read from the file. It happens to go as what you wanted.

it does when using libaio

If the libaio ioengine is used, the O_DIRECT flag will be automatically included.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants