【问题标题】:Does dask.s3fs actually use the cache?dask.s3fs 是否真的使用缓存?
【发布时间】:2019-02-13 08:20:00
【问题描述】:

当您调用 S3FileSystem().open(..., fill_cache=True) 时,它看起来仍然会转到 S3,仍然会进行 ssl 握手等。这是它不缓存的预期行为吗?

【问题讨论】:

    标签: amazon-s3 dask python-s3fs


    【解决方案1】:

    fill_cache 选项有非常具体的含义

        If seeking to new a part of the file beyond the current buffer,
        with this True, the buffer will be filled between the sections to
        best support random access. When reading only a few specific chunks
        out of a file, performance may be better if False.
    

    也就是说,只有当您在文件保持打开状态时随机访问文件的某些部分时,它才会有所不同。无论如何都需要初始 SSL 连接/握手,唯一可能改变的是请求的字节的确切范围。

    另请注意,s3ss 使用 boto Session,因此 SSL 连接通常应在可能的情况下进行池化和重用。

    【讨论】:

      猜你喜欢
      • 2013-08-08
      • 2012-07-27
      • 1970-01-01
      • 2012-12-10
      • 2011-01-22
      • 1970-01-01
      • 2020-05-31
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多