TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Faster filesystem access with Directfs

169 pointsby jhalsteadalmost 2 years ago

9 comments

topspinalmost 2 years ago
Accessing local file systems from a container? What heresy is this? Containers must all be stateless webscale single-&quot;process&quot; microservices with no need of local file systems and other obsolescent concepts.<p>Next thing you know someone will run as many as two whole &quot;processes&quot; in a container!<p>Having dispensed with that bit of bitter sarcasm; solving their local filesystem performance&#x2F;security problems is great and all, but what I&#x27;d like to see for containers is to utilize an already invented wheel of remote block devices; ah la iSCSI and friends. I dream of getting there with Cloud Hypervisor or some such where every container has a kernel that can network transparently mount whatever it has the credentials to mount from whatever &#x27;worker&#x27; node it happens to be running on.
评论 #36903825 未加载
评论 #36918063 未加载
评论 #36903709 未加载
londons_explorealmost 2 years ago
These designs always seem so complex... And one overlooked feature of any API could totally break the sandbox.<p>Whereas a simple &#x27;we run everything in a VM&#x27; seems much simpler and less fragile.<p>&#x27;We run this process in a VM-like mode where Linux syscalls aren&#x27;t allowed but instead we define a new syscall-like interface which goes to privileged host code&#x27; seems like a good compromise. But in this case, that host code should have special abilities to mmap files into the address space of the &#x27;VM&#x27; to make IO fast and efficient.<p>One way to do this would be to use undefined instruction traps to enter a debugger, which could then implement a syscall-like API. That would make it portable to any OS, yet ultra fast.
Roark66almost 2 years ago
This article is not very good at explaining what is it they are actually describing. Is directfs just a way to access hosts local fs? If so than my understanding of it is that they used to use rpc to access local fs before (horrible overhead) to sandbox it. Now they&#x27;ve just replaced a part of the operating system filesystem API that resolves paths to file descriptors with their tool so once a file descriptor is obtained the container can talk directly to the fs.<p>To me this resolves a very narrow use case where you have to run untrusted containers on trusted hosts. This is a very narrow use case. I imagine main target users for this are people that want to offer a service like fargate and run multiple customers on a single host. Why would they want to do that instead of separating customers with VMs? My suspicion is this has something to do with the increasing availability of very energy efficient arm servers that have hundreds of cores per socket. My impression is traditional virtualisation on arm is rarely used (I&#x27;m not sure why as kvm supports it, arm since armv8.1 has hw support for it). So &quot;containers to the rescue&quot;.<p>Personally I&#x27;d much rather extra security to enable untrusted containers access to the hosts fs is implemented in the container runtime, not as a separate component. Or if the &quot;security issues&quot; it addresses perhaps even in the hosts operating system?
评论 #36904925 未加载
ec109685almost 2 years ago
I still don’t know why Google has gvisor and AWS has firecracker. Isn’t the firecracker approach strictly better than Google’s approach?
评论 #36903155 未加载
评论 #36903146 未加载
评论 #36904307 未加载
评论 #36904377 未加载
评论 #36906530 未加载
fefe23almost 2 years ago
This is a step back.<p>The reason to have this in a separate process is so it can be audited &quot;to death&quot; because the code base is small.<p>gvisor itself is so big that doing an exhaustive audit is out of the question. Google has mostly switched to fuzzing because the code bases have all become too bloated to audit them properly.<p>The reason you have gvisor is to contain something you consider dangerous. If that contained code managed to break out and take over gvisor, it is still contained in the kernel level namespaces and still cannot open files unless the broker process agrees. That process better be as small as possible then, so we can trust it to not be compromisable from gvisor.<p>EDIT: Hmm looks like they aren&#x27;t removing the broker process, just &quot;reducing round-trips&quot;. Never mind then. That reduces the security cost to you not being able to take write access away at run time to a file that was already opened for writing.
评论 #36907672 未加载
Patrickmialmost 2 years ago
Am new to these kernel space but isn’t writes operation more security at risk than Reads if it is why not break gofer into 2 categories one writes, one reads embed the one with reads with sentry user space, this may not show any significant performance in real world use but it gets both benefits
评论 #36902263 未加载
评论 #36902452 未加载
评论 #36903733 未加载
评论 #36903849 未加载
nextaccounticalmost 2 years ago
What is directfs? The linked webpage doesn&#x27;t say
评论 #36902231 未加载
评论 #36901950 未加载
评论 #36901959 未加载
Dalewynalmost 2 years ago
Not to be confused with DirectStorage, which is a DirectX API that lets the video card load textures from NVME SSD local storage more efficiently.
评论 #36903024 未加载
7ealmost 2 years ago
When will gVisor be able to run processes in a Secure Enclave?
评论 #36907029 未加载