hdf5 icon indicating copy to clipboard operation
hdf5 copied to clipboard

ROS3 driver seems to make an S3 request for already cached file's region

Open ajelenak opened this issue 6 months ago • 2 comments

Describe the bug

I collected ROS3 logs about S3 (HTTP range GET) requests and noticed that it makes a request for the same file region that should already be in its cache. This behavior only happens when page buffer cache is enabled.

From the log when page buffer is disabled (size = 0):

cohdf5-gedi:DEBUG:start:<Timer "open" at 0x102cfd100 not yet started>
HEAD: Bytes 0 - 18446744073709551615, Request Size: 0
 -- size: 1526726656
GET: Bytes 0 - 16777215, Request Size: 16777216
cohdf5-gedi:DEBUG:stop:<Timer "open" at 0x102cfd100: Elapsed 4.0371 seconds>
cohdf5-gedi:DEBUG:start:<Timer "metadata" at 0x103b4a390 not yet started>
cohdf5-gedi:DEBUG:stop:<Timer "metadata" at 0x103b4a390: Elapsed 0.0008 seconds>

There is only one GET request during file open for the first 16 MiB of the file. This is as expected.

From the log when page buffer is enabled (size = 64 MiB):

cohdf5-gedi:DEBUG:start:<Timer "open" at 0x103bb1d00 not yet started>
HEAD: Bytes 0 - 18446744073709551615, Request Size: 0
 -- size: 1526726656
GET: Bytes 0 - 16777215, Request Size: 16777216
cohdf5-gedi:DEBUG:stop:<Timer "open" at 0x103bb1d00: Elapsed 2.9537 seconds>
cohdf5-gedi:DEBUG:start:<Timer "metadata" at 0x10325fdd0 not yet started>
GET: Bytes 0 - 16777215, Request Size: 16777216
cohdf5-gedi:DEBUG:stop:<Timer "metadata" at 0x10325fdd0: Elapsed 2.6084 seconds>

There is now another GET request for exactly the same region of the file. This is not expected because the driver should have cached that file's region from the first GET request.

Platform (please complete the following information)

  • HDF5 version: develop branch at commit 1fafdc9da3b3ca17a019cdf237958da29788160a
  • OS and version: macOS Sonoma 14.6
  • Compiler and version: clang 15
  • Build system (e.g. CMake, Autotools): cmake 3.30
  • Any configure options you specified: build ROS3 driver
  • MPI library and version (parallel HDF5): n/a

ajelenak avatar Aug 07 '24 18:08 ajelenak