Matlab Online S3 speed: copyfile vs. websave
조회 수: 59 (최근 30일)
이전 댓글 표시
I benchmarked some reads from an s3 bucket via the URL and https (with websave) and via the S3 URI (via copyfile) in Matlab Online.
I performed two benchmarks. I downloaded the same 750 MB file 10 times by websave or copyfile and calculated the average time, and then I downloaded a 119.9 MB file a single time via both methods.
The stats:
750MB file read 10 times:
copyfile via s3: 38.4165 MB/sec
websave via https: 71.8340 MB/sec
119.9MB file read once:
copyfile via s3: 9.0168 MB/sec
web save via https: 27.7525 MB/sec
I was surprised to see that accessing the URL via https was faster than reading directly from the S3 bucket on Matlab Online. I thought Matlab Online ran on AWS and I had expected direct S3 access to be faster.
Can anyone comment on whether this is the expected behavior?
Thanks
Steve
댓글 수: 1
Umar
2024년 8월 13일 3:59
Hi @ Steve Van Hooser,
First, I would like to commend you for conducting this benchmarking experiment. Now, let me share my knowledge with you, the observed behavior of faster download speeds using HTTPS with `websave` compared to direct S3 access via `copyfile` is not entirely unexpected given the various factors influencing network performance and protocol efficiency. However, your findings highlight an important aspect of cloud computing: assumptions about infrastructure capabilities do not always translate into expected performance outcomes. This insight can guide future usage and optimization strategies in similar contexts.
답변 (1개)
Divyam
2024년 8월 20일 7:16
Hi @Steve Van Hooser, although it does seem counter-intuitive that accessing and downloading files via the cloud infrastructure is slower than using the HTTPS request, but it is expected behavior, network drives are slower.
MATLAB Online is not entirely hosted on AWS and uses in-house infrastructre which makes accessing/downloading files via the S3 bucket slower than a RESTful service or a product which uses AWS entirely. The combination of increased security protocols, high cloud cost and optimization efforts which are needed to be spent at improving the AWS functionality also add to the slower performance of the "copyfile" function.
The "websave" function uses RESTful web service to download data from the URL which are indeed faster than their network drive counterparts as RESTful web services are lighter, and they utilize direct HTTP downloads with simpler network paths.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Environment and Settings에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!