s3fs是否将每个文件的范围请求默认设置为10mb?我还使用s3fs的数据训练了一个模型,因此与ebs相比,时间随着时间的增加而线性增加。为什么?
答案 0 :(得分:0)
默认情况下,s3fs会发出范围请求。您可以通过运行s3fs -f -o curldbg
来观察到这一点,它发出HTTP请求和响应。 40MB文件的示例输出:
> GET /filename HTTP/1.1
Range: bytes=131072-10616831
< HTTP/1.1 206 Partial Content
< Content-Range: bytes 131072-10616831/40776154
> GET /filename HTTP/1.1
Range: bytes=10616832-21102591
> GET /filename HTTP/1.1
Range: bytes=31588352-40776153
> GET /filename HTTP/1.1
Range: bytes=21102592-31588351
< HTTP/1.1 206 Partial Content
< Content-Range: bytes 21102592-31588351/40776154
< HTTP/1.1 206 Partial Content
< Content-Range: bytes 31588352-40776153/40776154
< HTTP/1.1 206 Partial Content
< Content-Range: bytes 10616832-21102591/40776154
> GET /filename HTTP/1.1
Range: bytes=0-131071
< HTTP/1.1 206 Partial Content
< Content-Range: bytes 0-131071/40776154
请注意,请求是按乱序发出的。
在您的用例中,s3fs可能比EBS慢。 s3fs适用于批量数据传输,但不适用于随机访问。