-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FUSE mount is very slow #2166
Comments
What version of ipfs? On Wed, Jan 6, 2016, 11:15 Jakub Sztandera [email protected] wrote:
|
0.3.11-dev, I will check 0.4 if anything changed in that matter. |
It is faster but still 60 times slower than
|
I encountered the issue today. It seems file contents are calculated in each read action. Cat is faster because there is no need to recalculate the file content. Add a read cache will increase the read speed . I achieved 50MB/S by adding a 40MB cache. |
What do you mean by read cache? |
Rewrite the read function in fuse. When read function was called, check file cache first. If target content was in file cache, just return the content from cache. If content was not in cache, start a new thread to read content from ipfs(this is the key point, read more data than read function needed. Read data is fast, but find the data to read is slow.). And write the data to file cache. Main thread will check file cache constantly until target data was found in cache. Here's part of my code written in python. I use ipfs web api to read data from ipfs.
|
Hi, I wrote simple mounting utility that works in a way @randoms described (or at least similar). It's witten in python and uses fusepy for mounting. Repo is at https://github.com/SupraSummus/ipfs-api-mount There are many things to improve in this utility. I plan to work on it. (I need "fast" IPFS mountpoints for my other project.) |
Nice! Actually, I wonder if it's useful to consider moving away from a built-in fuse interface? We'd probably want a faster API (unix domain sockets and a real RPC protocol) first but, from a security standpoint, it would be really nice (much easier to sandbox IPFS). Also, reducing the number of features built into IPFS directly would be kind of nice... Thoughts @whyrusleeping? |
I published another utility ipfs-mount in an attempt to bring these features together in nodejs land. It supports |
and uses a lot of CPU resources. This 600KiB/s was lucky, most of the time it was around 200 to 300KiB/s.
In comparison
ipfs cat
reached 250MiB/s.The text was updated successfully, but these errors were encountered: