NEXFS performance and features
Designed and developed by Roberto Arato of aratoingegneria.it
The features, in brief
| NEXFS | |
|---|---|
| What it is | the distributed filesystem of nex-cluster: a folder seen the same by every machine, and the consistent store on which NEX coordinates services, queues and leaders |
| What it offers to programs | a real POSIX filesystem: ACLs, extended attributes, locks across the nodes, mmap, O_APPEND from several nodes; pjdfstest and xfstests quick all passed |
| Copies | 1, 2 or 3, chosen per folder with one command: speed where it matters, redundancy where it matters |
| Growth | from a single machine to many, while running: more data nodes and disks, draining and maintenance without stopping anything |
| Durability | fsync returns only when the data is on the disk of every copy |
| Security | mutual TLS 1.3 with certificates and roles, encryption at rest, periodic scrub, offline check |
| What is not needed | kernel modules, synchronized clocks, manual eviction of clients |
| Weight | written in C, a .deb package of less than 400 KB; the first node starts with one command |
Metadata: create, find, delete
Creating, finding and deleting files is one of the strong points of NEXFS, and where it stands out most among distributed filesystems. A node working in a folder holds it under a lease and answers from its own memory, without asking the network each time; the changes go to the meta nodes in groups, not one by one. Programs that handle many files, such as builds, source trees, mail folders and caches, feel the difference.
Small files
With small files the content travels together with the metadata, in a single exchange: opening, writing and closing a small file costs one round trip instead of several. Configuration files, sources, logs and the many small files of everyday work are a natural fit for NEXFS.
Copies per folder: speed or redundancy
The number of copies is chosen per folder, with one command, in the same filesystem:
- one copy where speed matters more than redundancy: a build cache, a folder of temporary files, data that can be regenerated. The disks of the nodes work in parallel instead of repeating the same data, and writing is at its fastest;
- three copies where the data matters: home folders, projects, real data. Every block lives on three different nodes.
Reading does not depend on the number of copies.
Data really in safety
fsync returns only when the data is on the disk of every copy. A
program that asks for its data to be safe gets exactly that: when the call
returns, losing a node does not lose what was written. This is a deliberate
choice: NEXFS puts the safety of the data first.
Sequential reads and builds
Sequential reads of large files and builds are where the crossing between kernel and user space, the cost of FUSE, matters most. For those who need it, an optional kernel module is planned after version 1.0, with the same protocol and the same daemons: nothing changes in the cluster, only the client on the machine that uses it.
The features, compared with Ceph
| NEXFS | Ceph | |
|---|---|---|
| To install | a .deb package of less than 400 KB |
a container image of about 1.5 GB |
| Programs | one daemon, one client, one tool, one library | monitors, managers, OSDs, MDSs and the orchestrator |
| First node | started with one command, nothing to download | the orchestrator downloads the images and starts the services |
| A client that disappears | its rights expire by themselves in 15 seconds | the others wait for its session to expire, or for its eviction |
| Machine clocks | no constraint for consistency | synchronized within 50 ms |
| Copies | 1, 2 or 3, chosen per folder with one command | per pool (a folder is bound to a pool with layouts) |