If you pick one protocol for your whole analytics platform, some stage will pay for it through fragile commits, slow planning, or a second copy nobody owns. S3 vs NFS for analytics is a per-stage decision, because each Spark or Trino stage needs object semantics, POSIX/pNFS semantics, or both. This guide shows how to define each stage’s needs from documented engine behavior. It then shows how the Hammerspace data platform serves both from one dataset.
Why Is “S3 vs NFS for Analytics” the Wrong Unit of Decision?
S3 vs NFS for analytics is the wrong unit of decision because a platform is not one workload. Each pipeline stage has its own access-path contract, which declares whether the stage needs object-native access, POSIX/pNFS file semantics, or both. In most real pipelines, a single protocol for everything forces at least one stage to work against the semantics it depends on.
Imagine a hypothetical pipeline that ingests camera frames and machine logs from several sites:
- Ingest. Edge collectors write immutable files. Object PUTs or file writes both satisfy this contract.
- Transformation. Spark parses the raw data into Parquet and writes Iceberg tables. The contract needs safe commits and efficient planning.
- Interactive SQL. Trino queries those tables through a catalog. The contract is whatever file system support that catalog declares.
- Feature extraction and training. Python data loaders read many small files and random byte ranges. The contract needs POSIX semantics and locality near the GPUs.
- Retrieval. A RAG indexer reads the same corpus the training team uses.
An access-path contract records four things for each stage:
- The interface the code actually calls.
- The semantics it depends on, such as atomic rename, listing, byte-range reads, or locking.
- Where data must sit relative to compute.
- Whether the stage can share a copy with its neighbors.
Protocol is a per-stage attribute, not a platform identity. The real architecture question is whether your data layer lets every stage honor its contract against one governed dataset.
How Do Listing, Split Planning, and Commit Semantics Affect Spark Object Store Performance?
Spark object store performance is shaped by three documented caveats: directories are emulated through prefix listing, split calculation over deep trees is expensive, and rename-based commits are slow and non-atomic. Table formats reduce the listing cost, but they do not make S3 the automatic performance default, and a file system is not the automatic default either. The right answer depends on stage, layout, table format, and locality.
The Apache Spark cloud integration documentation states plainly that object stores are not real file systems. It gives three warnings:
- Reads and writes can be significantly slower than on a normal file system.
- Some directory structures are very inefficient to scan during query split calculation.
- Spark’s rename-based commit algorithm is potentially both slow and unreliable on object stores.
The mechanics explain each warning. An object store has a flat keyspace, so a “directory” is only a shared key prefix, and discovering files takes paginated LIST requests. Spark must enumerate input files before it can compute splits, so a partitioned tree of small files turns planning into a long series of listing calls. Rename is a copy followed by a delete, done file by file, so it is neither fast nor atomic.
Hadoop’s answer is the S3A committers. The staging committers (directory and partitioned) and the magic committer complete multipart uploads at job commit, which removes rename from the critical path. Their requirements and failure behavior differ, so the choice belongs in the stage contract and in your pilot test plan.
Table formats change the equation. Iceberg tracks data files in manifests, so planning reads metadata instead of listing prefixes, and a commit is an atomic swap of the metadata pointer in the catalog.
As a result, table reads avoid most of the listing penalty. Raw logs, images, and other untabled trees do not.
AWS S3 has provided strong read-after-write consistency since December 2020. Consistency is not rename, planning, or locality, though, and those still depend on layout and where compute sits.
How Do Spark and Trino Actually Reach Storage?
Spark reaches storage through Hadoop FileSystem connectors selected by URI scheme, so it can process any file tree over S3 or a mounted POSIX path. Trino is catalog-driven and reaches object storage through table-oriented connectors.
That difference decides which stages can use a POSIX mount and which must speak S3.
Spark resolves every path through the Hadoop FileSystem API, and the URI scheme picks the connector:
s3a://uses the S3A client.hdfs://uses HDFS.file://uses a local or mounted POSIX path.
Spark on NFS uses the file:// scheme. The Spark programming guide sets one condition: a local path must be accessible at the same location on every worker node.
python
Same Spark job, two access paths
df = spark.read.parquet(“s3a://analytics-bucket/events/”)
df = spark.read.parquet(“file:///mnt/shared/analytics/events/”)
Spark reads files, not only tables, so it handles arbitrary trees. The binaryFile source even loads images or documents as rows. That flexibility is also why listing cost matters: untabled data has no manifest to plan from.
Trino works differently. Every data source is a catalog backed by a connector, and the Trino object storage documentation scopes file system support, including the Trino native S3 file system, to the Hive, Delta Lake, Hudi, and Iceberg connectors.
In practice, Trino queries the tables those connectors expose. It does not walk directories looking for files.
A Spark stage chooses its contract per path. A Trino stage inherits its catalog’s file system. Before you assign a POSIX contract to any Trino stage, check the documentation for your exact release and connector to confirm whether it supports local or mounted file systems.
Why Are Table Format, Catalog, and File System Three Separate Decisions?
They are separate decisions because each layer controls something different: the table format defines how data and metadata files are laid out, the catalog records which metadata version is current, and the file system moves the bytes. Treating “Iceberg” as a synonym for “S3” conflates these layers and produces misconfigured catalogs.
Here is what belongs to each layer:
- Table format. Iceberg, Delta Lake, Hudi, or Hive-style directory tables. This layer defines manifests, transaction logs, and snapshots.
- Catalog. Hive Metastore, AWS Glue, an Iceberg REST catalog, JDBC, and others. This layer resolves table names and arbitrates commits.
- File system. Native S3, Azure Storage, Google Cloud Storage, HDFS, or a POSIX path.
The layers interact. Iceberg’s Hadoop catalog commits through atomic rename, so it fits file systems that provide it and is a poor match for S3. Delta Lake documents specific log store configurations for safe multi-cluster writes on S3. Iceberg on object storage vs file system is really a question of which catalog and commit path you pair with each.
Trino makes the file system layer explicit. The Trino legacy file system deprecation arrived with the Trino 470 release notes, published in February 2025, and Trino’s documentation requires each catalog to declare and enable its file system explicitly. Later releases continued removing legacy code, so check the notes for the version you run.
properties
etc/catalog/lakehouse.properties
Confirm property names against docs for your Trino version
Table format:
connector.name=iceberg
Catalog:
iceberg.catalog.type=rest
iceberg.rest-catalog.uri=https://catalog.example.internal
File system (Trino 483+; releases before the rename used fs.native-s3.enabled=true):
fs.s3.enabled=true
s3.endpoint=https://s3.example.internal
s3.region=us-east-1
s3.path-style-access=true
Trino’s S3 file system documentation lists AWS S3 and MinIO as the tested S3-compatible systems. Any other endpoint, from any vendor and including Hammerspace, needs its own pilot validation.
Which Pipeline Stages Need Object Access, and Which Need POSIX/pNFS Access?
Object access fits stages that write immutable data, read tables through manifest-driven planning, or hand data to cloud-native services. POSIX/pNFS access fits stages whose code calls file APIs, depends on atomic rename, or performs random byte-range reads across many files.
Stages That Genuinely Fit the S3 Contract
- Landing zones where writers PUT complete, immutable objects.
- Trino and Spark SQL over Iceberg or Delta Lake tables, where manifests or transaction logs replace prefix listing.
- Spark writes that use a validated S3A committer or catalog commits, so rename never sits on the commit path.
- Handoffs to cloud-native services and partners that expect an S3 API and bucket policies.
- Long-retention history that is read occasionally and sequentially.
Stages Whose Contract Requires File Semantics
- Training and feature pipelines built on Python data loaders that open, seek, and read through POSIX calls.
- Workloads that need random small-file reads, byte-range reads, memory mapping, or in-place updates.
- Commit paths that rely on atomic rename, such as the classic FileOutputCommitter or Iceberg’s Hadoop catalog.
- HPC and scientific tools that expect a mounted tree, file locking, and POSIX permissions.
For these stages, the open standard is NFS:
- NFSv4.2 is defined in RFC 7862.
- Parallel NFS (pNFS) is specified as part of NFSv4.1 in RFC 8881. It separates metadata from data so clients read and write directly to storage nodes in parallel.
- The pNFS client ships in the upstream Linux kernel, so compute nodes need no proprietary agent.
That heritage runs deep at Hammerspace. Trond Myklebust, Tom Haynes, and Brian Pawlowski helped build Linux NFS itself, and they work alongside CEO David Flynn:
- Trond Myklebust, principal maintainer of the Linux NFS client.
- Tom Haynes, editor of RFC 7862, the NFSv4.2 specification.
- Brian Pawlowski, a co-author of the NFSv3 specification.
- CEO David Flynn, co-founder of Fusion-io and an early leader in PCIe flash.
When Should You Use Caching and Data Locality Instead of Picking a Protocol?
Use caching and locality when a stage repeatedly reads the same hot, read-mostly data from remote storage. Skip it for one-pass scans, write-heavy stages, and fast-changing tables, where cache fills and invalidation add work without reuse.
Locality is the third lever, next to object and file access. Trino distributed caching is documented as the file system cache: workers keep recently read object data on local storage, and scheduling routes splits for the same files to the same workers. Spark offers cache and persist for iterative jobs that reread a DataFrame within one application.
Caching and locality fit well in these cases:
- Dashboards that hit the same partitions all day.
- Iterative feature engineering.
- Repeated joins against dimension tables.
They fit poorly in these cases:
- Every query scans new data.
- Tables change faster than cache entries age out.
- The working set exceeds local capacity.
Caching is reactive: it helps on the second read. Locality can also be proactive, through policy-driven data orchestration for AI. With Hammerspace, file-granular Service-Level Objectives pre-stage data near the compute that needs it before a job starts, and the path the application sees does not change.
For GPU-bound downstream stages, Hammerspace Tier 0 turns the NVMe already inside GPU servers into a shared tier that keeps training and inference jobs fed. It belongs in those stages’ contracts, not in Trino or Spark SQL query stages.
What Is the Synchronization Tax of Keeping Separate File and Object Copies?
When each access-path contract lives on a different storage silo, you pay a synchronization tax. It shows up as copy jobs, stale data, duplicated governance, and permission drift, and it grows with every stage and site you add.
Imagine a hypothetical team whose Spark jobs write Iceberg tables to an object store while the training group needs POSIX access. The obvious fix is a nightly job that copies curated partitions to a file system. It works on day one, and then the costs surface:
- Staleness. The training copy lags the table by a sync cycle, and nobody can say which snapshot a model saw.
- Lost semantics. The copy has no catalog, so snapshots, deletes, and schema changes never reach it.
- Double governance. Access controls, retention, and deletion requests must be applied and audited twice, in two permission models. In regulated environments, that is an audit exposure.
- Sprawl. Each new consumer requests its own copy, and the sync jobs become an undocumented pipeline of their own.
None of this appears in a protocol comparison. It appears in incident reviews and audit prep.
If your pipelines already run copy jobs between file and object silos, contact Hammerspace or call +1 (650) 777-8728 to learn how one governed dataset can serve both access paths.
Can One Governed Dataset Serve Both S3 and NFS Without Migration?
Yes. A multiprotocol analytics storage layer that exposes the same governed data over S3 and NFS/pNFS lets each stage honor its contract against one copy, and it lets a stage change its contract later without migrating data.
Hammerspace delivers this through a Unified Data Plane built on native Linux and open standards: NFSv4.2/pNFS in the upstream Linux kernel, SMB, and S3. Clients use the NFS client already in the kernel or a standard S3 SDK. There is no proprietary client and no vendor lock-in.
The differentiator is flexibility over time. Global Data Services assimilates metadata from existing storage in place, so data in current file and object silos joins one namespace without a bulk copy.
Suppose a Trino-served table now also feeds a PyTorch loader. The new stage reads the same data over the protocol it needs. That is analytics on file data without copying, with no sync job to maintain.
Hammerspace sits beneath your table formats and catalogs as the data and access layer; it does not replace them. Iceberg, Delta Lake, your metastore, and your commit protocol stay as designed. Placement, protection, and governance policies apply once across every protocol, which matters for the enterprise and regulated organizations, including federal customers, that Hammerspace serves.
Validate the boundaries in a pilot before production:
- Configure a Trino catalog with native S3 settings against the Hammerspace S3 endpoint on your Trino version, and exercise reads, writes, and table maintenance.
- Test your Spark commit path, whether an S3A committer or catalog commits, with injected task and driver failures.
- Verify concurrent-writer behavior for your table format and catalog pair.
- Confirm that files written over one protocol read correctly, with correct permissions, over the other.
Treat every endpoint and committer combination as unproven until your pilot confirms it.
How Do You Write an Access-Path Contract for Each Pipeline Stage?
Answer the nine questions below for every stage, and store the answers with the pipeline definition. Revisit them when the code, engine version, or consumers change, so the contract drives protocol, catalog, commit, and locality choices instead of habit.
- Which interface does the code call? S3 SDK, Hadoop FileSystem, and POSIX calls impose different semantics. The code decides, not the platform standard.
- Does it read tables or arbitrary file trees? Tables get manifest-driven planning. Raw trees pay listing cost on object storage.
- How does it plan work? Prefix listing, directory enumeration, and manifest reads scale differently as file counts grow.
- How does it commit output? Rename-based commits need atomic rename. On S3, use S3A committers or catalog commits, and validate them in a pilot.
- Which table format and catalog pair does it use? Some catalogs depend on atomic rename, and concurrency guarantees vary by engine and catalog.
- Which file system does each Trino catalog declare? Legacy support is deprecated, per-catalog declaration is required, and Trino’s tested S3-compatible list covers only AWS S3 and MinIO.
- Is the access pattern repeated and read-mostly? If so, it is a caching candidate. If not, caching adds churn.
- Is the stage GPU-bound? GPU-bound stages need locality near the accelerators, which is where Tier 0 applies.
- Who else needs this data over another protocol? If the answer forces a second copy, the synchronization tax starts here.
A stage with every question settled is ready for production. A stage with open questions defines the scope of your next pilot.
Your pipeline stages will keep disagreeing about protocols, and that is fine. Hammerspace lets each stage honor its contract over S3 or NFS/pNFS against the same governed data, without migrations or sync jobs. Contact Hammerspace or call +1 (650) 777-8728 to see how it can help your team.
Frequently Asked Questions
Is S3 or NFS better for Spark?
Neither is better for every Spark job, because the right choice depends on what each stage does. S3 works well for Spark SQL over Iceberg or Delta Lake tables and for writes that use a validated S3A committer or catalog commits. NFS or pNFS fits better when a stage depends on atomic rename, reads many small files at random, or feeds downstream tools that call POSIX APIs. Decide per stage by looking at the stage’s interface, commit path, and data layout.
Can Spark read data directly from an NFS mount?
Yes. Spark reads a mounted POSIX path through the file:// URI scheme, the same way it reads local files. The one firm requirement is that the mount must be available at the identical path on every worker node, or tasks will fail when they cannot find their input. Once that condition is met, the same DataFrame code can switch between s3a:// and file:// paths without other changes.
Which Trino connectors support native S3 file system access?
Trino’s object storage documentation scopes its file system support, including the native S3 file system, to the Hive, Delta Lake, Hudi, and Iceberg connectors. Each catalog that uses one of these connectors must enable its file system explicitly in its properties file. Trino lists AWS S3 and MinIO as its tested S3-compatible systems, so any other S3 endpoint should go through a pilot before production use. Property names can change between releases, so confirm them against the documentation for your Trino version.
What changed when Trino deprecated legacy file system support?
Starting with the Trino 470 release in February 2025, catalogs could no longer rely on the older, implicit file system support. Each catalog now has to declare and enable the file system it uses, such as native S3, in its configuration. Later releases kept removing legacy code, so an older catalog configuration may stop working after an upgrade. Review the release notes for every version between your current and target release before you upgrade.
Do Iceberg or Delta Lake tables require object storage?
No. Iceberg and Delta Lake are table formats, and they can store data and metadata on object storage, HDFS, or a POSIX file system. What changes by storage type is the safe commit path. Iceberg’s Hadoop catalog depends on atomic rename, which suits file systems that provide it, and Delta Lake needs specific log store settings for safe multi-cluster writes on S3. Treat the format, the catalog, and the file system as three separate decisions.
Does distributed caching replace the choice between S3 and NFS?
No. Caching changes where recently read bytes live, but it does not change the semantics a stage depends on. A cache in front of S3 will not give a Python data loader POSIX calls or give a commit path atomic rename. Caching pays off for repeated, read-mostly access such as dashboards and dimension-table joins. It adds churn for one-pass scans and for tables that change quickly.
Can the same data be accessed over both S3 and NFS without copying it?
Yes, if the storage layer exposes one governed namespace over multiple protocols. Hammerspace serves the same data over S3 and NFSv4.2/pNFS, so a Trino catalog and a PyTorch loader can read one copy without a sync job between them. Governance, placement, and protection policies then apply once, instead of being maintained separately in two permission models. Before you rely on this in production, confirm in a pilot that files written over one protocol read correctly, with the right permissions, over the other.
