AWS Bites Podcast

95. Mounting S3 as a Filesystem

Saddle up for a cloud adventure like no other in this episode of AWS Bites, where Eoin and Luciano explore the untamed world of AWS S3 Mountpoint.

Just like a trusty steed on the digital prairie, Mountpoint gallops into action to solve complex use cases, making it a valuable asset for managing massive data, achieving high throughput, and effortlessly fetching information from the AWS S3 wilderness. Dive deep into the inner workings of Mountpoint, a Rust-powered Linux-exclusive application that harnesses the Linux FUSE subsystem to provide optimal S3 performance.

While exploring alternatives like s3fs-fuse and goofys, discover the benefits of sticking to native AWS tools for certain scenarios.

Uncover Mountpoint's performance prowess, thanks to its integration with AWS Common Runtime libraries, and learn when to hop on this cloud cowboy or opt for a more native approach.

Wrapping up, don't forget to check out AWS Storage's blog post for an even deeper dive into Mountpoint's capabilities. Whether you're a seasoned cloud wrangler or a newcomer to the digital rodeo, this video will equip you with the knowledge to navigate the AWS S3 Mountpoint frontier confidently.

fourTheorem is the company that makes AWS Bites possible. If you are looking for a partner to accompany you on your cloud journey, check them out at fourtheorem.com!

In this episode, we mentioned the following resources:

Let's talk!

Do you agree with our opinions? Do you have interesting AWS questions you'd like us to chat about? Leave a comment on YouTube or connect with us on:

Luciano
00:00:52

Yeah, that's a good question. So we were reading through the announcement, and there are some use cases that are detailed there. And the first one is big data application, specifically when big data application like data lakes, they don't directly support S3. So you can effectively use Mountpoint to mount S3 as a file system, like a FUSE file system, and then just give it to the application you're using. But this is a bit of an interesting use case because for the kind of big data application that we have been using, like Dremio, Snowflake, and others, like all of them have already S3 integration, so it wasn't really convincing. But it seems that there are other advantages. For instance, it's very optimized for performance. So if you're dealing with large objects, or if you need to have very high read throughput, or if you need to read without downloading an object entirely, you just need a subset of the data. In all those use cases, I think Mountpoint can give you ideal performance. So maybe this is already good enough to justify using Mountpoint. We were also trying to figure out some potentially additional use cases where Mountpoint can be useful. And we were thinking, okay, what if you have created a script, maybe you were doing something quick and dirty locally, and now you need to do it using data that is available in S3. You're probably going to be fast enough just using Mountpoint rather than changing all your code to actually use an SDK or the CLI. So that could be another use case. And a common use case is like you have a Unix pipeline, you read from S3, you do some kind of manipulation, you save to S3. And if you were doing that on a local file system, you can immediately support S3 that way. And similarly, we have seen people doing a lot of work analyzing CSV files or Parquet files using notebooks or logarithms, so all sorts of kind of analytics. And often enough, people are just working off of logarithm files, and then they need to use real data in S3. And they have all the code written for using generic file system operations. They don't want to change their code to use maybe Porto3 or maybe some other kind of direct integration with S3. So in that case, you have another valid use case for Mountpoint. And finally, this is always our... something we like to remark that if you need to explore what you have in an S3 bucket and you are not very familiar with AWS CLI, because maybe you haven't used AWS that much, you can just mount the S3 Mountpoint and then you can explore the files using familiar bash commands like ls, for instance. So that could be another use case, and it might be much more convenient than just browsing through the AWS web console, especially when you have lots and lots of files in the bucket. So should we talk a little bit more about how it is really implemented and some of the modulated characteristics of this implementation?

00:09:51

And they've also built an S3 client. And it's designed for low overhead, high throughput, automatically uses byte range requests, parallelization, multi-part uploads. And I think ultimately the goal with this CRT is to provide a common code base that all of the SDKs can use so they don't have to implement all of this optimization in every language separately. Now, right now, CRT can integrate fairly easily with the Java SDK. And it's possible with the Python Boto3 one as well. But it seems to be very vague how to do it with other languages, even though they provide kind of bindings for all languages. One of the interesting claims here is that the team says that they prove algorithmic correctness using this fancy automated reasoning that they're really into at AWS. So there's a link to that in the show notes. Now, going back to mount point, mount point is built on top of CRT. So performance should be pretty optimal. But as of yet, we don't see any published benchmarks. I don't see any benchmarks, even from the S3FS FUSE teams showing what the difference is. So it would be really interesting. Setting up benchmarks and running them on S3, there's a lot of effort to put into it. So we haven't had a chance to do that yet. But if anyone out there feels like it, I'd be really interested to see what it would be like. Are you optimistic Luciano, or do you see any potential problems with mount point? Yeah, I think on one side, it's fair to say that it's a relatively new project.

00:11:46

Eventually, we figured out that there is a CLI flag that you can enable to get advanced logs, like you get more verbose logs. And these logs will give you a fair number of details about the S3 operations that are happening. For instance, if you do a put, or if you do a get, and you get details like how many parts are being used, for instance, when you do a put. And that could be very useful to understand exactly what kind of operations are happening, how fast they are, and can give you an indication of cost. The only annoying gotcha there is that you don't see the parts being used in S3. So if you just look at the logs, it's a little bit out of context. If you try to correlate the different operations with what you were trying to do, you need to stick together your, I guess, common line history with the logs that you see there to make sense of everything. But this is probably just something that's missing. It could be easily added by the team. Or maybe if somebody is willing to do a PR, that's probably an easy feature to try to add to the project, which after all is an open source project. And the other problem, and we have been saying that over and over during this episode, but I think it's worth reiterating that, is that we are using a POSIX model, which is not really POSIX. So lots of footcans there. It could be dangerous. It's probably wrong in the first place. So if you use it, use it with moderation and be aware of exactly the kind of trade-offs you are buying into. Because if you try to use it as a general file system, you are going to have problems for sure. What do you think is that? Should we say that the final verdict is to use it or not to use it?

Eoin
00:13:22

Generally not, I would say right now! Then again, if people have found it interesting and want to try it out for their own use cases, they'll probably already have a good feeling from what we've said so far. I think it's better to stick with the object paradigm when you're talking about an object store rather than trying to shoehorn it into a file system model. But look, you could use it for a period of time during a migration while you work on the changes in order to use an object storage paradigm. I think you gave a good example of that back in the episode where we talked about migrating like a CMS or for a legal firm to AWS and using something like S3FS views at the time. It's better, I think, to try and use more native S3 integrations. I'm curious to hear if there's cases where you really need something like this. But look, if you need to use it, you can use it as a last resource, understand the risks and put your logging and metrics in place. If you wanted to use it for web serving, ultimately, you're really better off using a CTN in front of S3. So I think in general, the jury is still out. If there are very compelling use cases that we haven't spotted, let us know because we're really curious. And if you've done any benchmarking, please share them with everybody because I think the whole area of S3 performance, when it gets into really optimizing it, it can take a lot of time. But if you've got any data on that, I'd love to see it because we can all benefit from it. So thanks very much for listening. Please like and subscribe and share with your friends and we'll see you in the next episode.

Help us to make this transcription better! If you find an error, please submit a PR with your corrections.