140 points · by LittleCat38 · 2y ago · 66 comments
At that scale, I care about integrity. Can someone working in this space please have a real integrity story as part of the offering? Give each object (object, version pair, perhaps) a cryptographic hash of the contents, and make that hash be part of the inventory. Allow the entire bucket to opt in to mandatory hashing. Let me ask the system to do a scrub in which it verifies those cryptographic hashes.
If this blows up metadata to 164 bytes per object, so be it. But the hash can probably get away with being stored with data, not metadata, as long as there is a mechanism to inventory those hashes. Keeping them in memory doesn’t seem necessary.
Even S3 has only desultory support for this. A lot of competitors have nothing of the sort.
Inside the metadata service, it uses merkle tree (hash of hash) to verify the integrity of whole namespace (including id of data blocks) between RAFT replicas. Once we store the hash (4 bytes) of each objects into metadata, it should provide the integrity of the whole namespace.
Otherwise there’s no end-to-end integrity check.
With POSIX API or HDFS, there is no such API to do that, unfortunately.
FileCoin is used to pay for storage, but for now it seems storage is mostly free because of block rewards.
Presumably filesystems built over rocksdb also support this.
> Its metadata engine uses an all-in-memory approach and achieves remarkable memory optimization
Sounds like a fun thing to recover after a crash.
https://juicefs.com/en/blog/engineering/increase-performance...
For the compression part, have you thought about OS-managed memory compression [3][4]?
[1] https://google.github.io/tcmalloc/temeraire.html
[2] https://people.freebsd.org/~jasone/jemalloc/bsdcan2006/jemal...
It looks as though you need to set up the underlying storage engine that has its own recordkeeping (one point of failure), then layer JuiceFS on top — another point of failure, and I don't know what it gives you.
It's good that it's fast, but if it's pointing to another blob store you'd... expect it to be fast? Is this only needed if you want properly faked file system primitives over blob stores, if you can't use blob stores directly? Definitely need to spend some time reading.
S3 is not designed for intensive metadata operations, like listing, renaming etc. For these operations, you will need a somewhat POSIX-complaint system. For example, if you want to train on ImageNet dataset, the “canonical” way [1] is to extract the images and organize them into folders, class by class. The whole dataset is discovered by directory listing. This where JuiceFS shines.
Of course, if the dataset is really massive, you will mostly end-up with in-house solutions.
[1]: https://github.com/pytorch/examples/blob/main/imagenet/extra...
Now if you think about how many files are in a git repo, and how many are touched when you commit, you can see the problem.
I'm not sure JuiceFS is the answer, given that the metadata is stored in memory. but it is an answer.
personally you're better off with their managed lustre offering
Having a metadata cache is sensible option, especially if you have complete control of a bucket and are able to be canonical. (ie everything talks to your DB to get keynames)
But! what you can't do write to the middle of a file, you need to upload the whole thing again. This is not a problem for a lot of workflows, but for POSIX filesystems thats going to cause problems. You can seek to the middle of a file, write to it, the client will upload it to S3. What happens if another system modifies that file when you are uploading? Sounds like a locking nightmare.
The underlying blob store systems is similar to DataNode or OSD in other distributed file system, could be slower than them a little bit because of the middle layers, the overall performance is determined by the disks.
So we can expect similar performance comparing to HDFS/CephFS, the benchmark results also confirm that.
Semiconductor EDA comes to mind, where users are at the mercy of their tool vendors and they expect something that really hasn't evolved much past an office network of Unix workstations from 1999. Object storage is almost completely alien to the tooling, and despite significant file & block storage costs there is little interest from EDA tool vendors to adapt their tools to object storage. This is a challenge for semiconductor firms operating in or moving to a cloud environment.
S3FS/rclone can of course act as a shim, but are very slow when it comes to metadata operations in a typical shell. But if you were to move your metadata away from the distant object store and closer to to your compute environment things actually start becoming usable - this is the case with JuiceFS. Of course there are also tiered storage systems like Weka would have better overall performance, but is more complicated to set up and more expensive to operate than JuiceFS.
It's quite simple in front, simple to explain that split object and metadata storage.
but it's too hard to select and tune each storage.
So I (or We)'ve decided to move to Ceph.
1) never cluster unless you have to.
2) never use distributed Filesystems unless you need a global namespace
3) distributed filesystems mean that you have a single point of failure, its just more complex and subtle form of failure.
4) You have to think about how partition works, and how you want to recover.
Sharding standard NFS fileservers is by far the easiest way to scale, have redundancy, and partition your failure zones. using autofs on a custom directory you can mount servers ondemand. /mnt/0 /mnt/1 /mnt/2 etc etc etc.
You then have the ability to chose your sharding scheme for speed, redundancy or some other constraint.
Nowadays the performance that distributed systems allowed are commodity. A single 4u storage server can saturate a 100gig network link with random disk IO.
I agree with you at ALL the things you've listed. When we've started to used Ceph for the first time - (At that time I was an user, not a Manager) all the thing was a total mess. All the things are set to default and Use all JBODs on Node. (And I've started to face Corrupted WALs and OSDs came from nowhere.)
The handful of documentations was very helpful to cleans up and make it to run correctly.
Maybe, when I go back to the starting point, I'd like to say "move to cloud" or "do nothing" or following your guidance.
if you do start again _and_ move to the cloud, AWS's lustre interface (FSx) is good enough (if expensive) or EFS, although that has slower metadata performance. Its good enough at RW iops though, assuming you monitor it correctly.
I feel your pain, and sympathise deeply. Best of luck!
If you already have the infra (databases and object stores), then JuiceFS is the easiest solution to have a distributed file system.
Uncaught TypeError: headline.append is not a functionI consistently find my code runs 20-80x faster than the equivalent in Python and I'm not about to cram C++ or Rust into my head along with all the biology I've memorized for ~2x performance improvement and >5x learning curve. On HN, I shouldn't need to explain why I don't use Java despite a similar set of tradeoffs to Go (other than memory use, historically).
That doesn’t sound all that impressive—is it impressive?
100 bytes per file is less than you would expect to support all that data if you coded it "naturally" without an eye toward space efficiency. You'll need 16-32 bytes or so just to handle a tree structure with internal string indices to be able to support finding any given file's location quickly. Toss in created times, modified times, permissions, attributes, the fact that they have a chunking structure to support both random seek and efficient/easy allocation, .... It adds up to more than 100B if you're not pretty careful. They hit that 100B mark.
Is that impressive? I dunno. Their competitors didn't do it, and they did, so that's something.
Unless you plan to charge less than what a single developer makes in a quarter or two, any of your potential customers could at any point patch in the feature and open source the changes for everyone.
(Traefik and Riak are the two biggest offenders I've ran into)
https://techcrunch.com/2014/02/13/please-dont-tell-me-you-wa...
(Also, a lot of SaaS is in fact cheaper than what a dev makes in half a year).
It is interesting that high performance systems in Go end up needing these kind of performance optimizations.
If most of your overhead is due to the low performance of the language/runtime you're using, these kinds of optimisations won't make as much of a difference. That is, if you can even implement them at all. I mean, good luck trying to use memory pools and manual memory management in Python or Javascript.