Apache Hadoop on dedicated servers
Hadoop stores petabytes across many drives with HDFS and runs batch processing next to the data with YARN. Storage servers with dozens of large drives and many cores are built for exactly this.
What does a Hadoop cluster consist of?
HDFS for storage and YARN for compute. The NameNode keeps the file system namespace and block locations in memory; DataNodes store blocks on their local drives. The ResourceManager schedules containers, and a NodeManager on each worker runs them. Workers run a DataNode and a NodeManager together so tasks read their input from local disks. Spark, Hive, Trino-style engines and classic MapReduce all run on this base.
| Service | Ports | Placement |
|---|---|---|
| NameNode | 8020 RPC, 9870 web UI | Master machine, with a standby for HA |
| DataNode | 9866 data, 9864 web UI | Every worker |
| ResourceManager | 8032 RPC, 8088 web UI | Master machine |
| NodeManager | 8042 web UI | Every worker |
Keep all of them on a WireGuard mesh between cluster machines, since servers here talk over public ports, and open only a gateway or edge node to users.
How should worker drives be configured?
As JBOD: one file system per drive, no RAID, each listed as a DataNode directory. HDFS spreads blocks across drives and machines and re-replicates from other copies when a drive fails. RAID would only add rebuild time and lower throughput. The NVMe drives hold the operating system, YARN local directories for shuffle data and logs.
for i in $(seq -w 1 24); do mkfs.xfs -f -L dn$i /dev/disk/by-id/scsi-DISK$i; mkdir -p /dn/$i; echo "LABEL=dn$i /dn/$i xfs noatime 0 0" >> /etc/fstab; done mount -a
Why does NameNode heap grow with file count?
About 1 GB of heap per million blocks, files and directories combined, as a starting rule. Every object costs memory regardless of size, which is why millions of tiny files are a problem for HDFS: combine them into larger files, sequence files or table formats like Parquet. A cluster with 100 million objects needs a NameNode heap near 100 GB, so pick a master with generous memory.
How does erasure coding save space?
Classic HDFS keeps three full replicas, so usable space is one third of raw. Erasure coding policies such as RS-6-3 store six data and three parity cells per stripe and survive the loss of any three, with usable space at two thirds of raw. It suits cold and archive directories; hot data that many tasks read is usually better replicated.
hdfs ec -enablePolicy -policy RS-6-3-1024k hdfs ec -setPolicy -path /archive -policy RS-6-3-1024k hdfs ec -getPolicy -path /archive
RS-6-3 needs at least nine DataNodes to place every cell on a different machine; smaller clusters can use RS-3-2 with five.
How are YARN resources set?
Tell each NodeManager how much memory and how many virtual cores it may hand out, leaving room for the DataNode and the system. On a worker with 128 GB and 36 cores, 96 GB and 64 vcores for containers is a reasonable start.
<property><name>yarn.nodemanager.resource.memory-mb</name><value>98304</value></property> <property><name>yarn.nodemanager.resource.cpu-vcores</name><value>64</value></property> <property><name>yarn.nodemanager.local-dirs</name><value>/nvme/yarn/local</value></property>
Which machines fit?
| Role | Machine | Why |
|---|---|---|
| NameNode and ResourceManager | ESSENTIAL-8 | 256 GB DDR4 for NameNode heap |
| Worker, compute and storage | STORAGE-3 2024 | 36 cores, 529.92 TB raw |
| Worker, storage-heavy | STORAGE-4 2026 | 578 TB raw, 256 GB DDR5 |
| Small or test cluster worker | STORAGE-1 | 2x 480 GB SSD SATA (system) + 4x 14 TB HDD SAS, Soft RAID |
STORAGE-3 2024 pairs 36 cores with 24 drives and a 10 Gbps guaranteed port for $1,037.40 a month, a balanced Hadoop worker. Place the whole cluster in one data centre. Our Apache HBase clusters page covers the database that runs on HDFS, and Big data and analytics covers wider analytics planning.
Machines for Hadoop clusters
Lowest monthly price of each model across its data centres; the model page shows the price in every location.
| Model | Processor | Cores | Memory | Drives | Port | Per month |
|---|---|---|---|---|---|---|
| ESSENTIAL-8 | AMD EPYC 7532 | 32 | 256 GB | 2x 480 GB SSD SATA | 1 Gbps unmetered | $126.60 |
| STORAGE-1 | AMD Ryzen 7 Pro 3700 | 8 | 32 GB | 2x 480 GB SSD SATA + 4x 14 TB HDD SAS | 1 Gbps unmetered | $109.80 |
| STORAGE-2 2026 | AMD EPYC 4345P | 8 | 32 GB | 2x 960 GB SSD NVMe + 2x 24 TB HDD SAS | 3 Gbps unmetered | $273.00 |
| STORAGE-3 2024 | Intel Xeon Gold 6554S | 36 | 128 GB | 2x 960 GB SSD NVMe + 24x 22 TB HDD SAS | 10 Gbps unmetered | $1,037.40 |
| STORAGE-3 2026 | AMD EPYC 9135 | 16 | 128 GB | 2x 1 TB SSD NVMe + 16x 24 TB HDD SAS | 10 Gbps unmetered | $1,468.80 |
| STORAGE-4 2026 | AMD EPYC 9355 | 32 | 256 GB | 2x 1 TB SSD NVMe + 24x 24 TB HDD SAS | 10 Gbps unmetered | $2,169.00 |
Storage models with 24 drives and 10 Gbps ports make balanced Hadoop workers.
Related pages
Apache HBase clusters
Run Apache HBase on HDFS with bare metal Storage servers: RegionServers, HMaster, ZooKeeper, heap and BucketCache, row key design and cluster sizing.
Read moreBig data and analytics
High core EPYC machines and dense disk chassis for Spark, ClickHouse and data lake clusters.
Read moreCephFS storage clusters
Build a CephFS cluster with cephadm on Storage servers: monitors, managers, OSDs and MDS daemons, NVMe for metadata, encrypted messenger and sizing.
Read moreQuestions and answers
Should Hadoop worker drives use RAID?
No. Use one file system per drive (JBOD) and list each as a DataNode directory; HDFS handles redundancy across machines.
What heap should an HDFS NameNode get?
Roughly 1 GB of heap per million files, directories and blocks, so 100 million objects need about 100 GB.
What does HDFS erasure coding save?
Policies such as RS-6-3 give two thirds of raw space as usable space, compared with one third for three replicas.
Why are small files a problem in HDFS?
Every file and block uses NameNode memory regardless of size, so millions of tiny files exhaust the heap.
How many DataNodes does RS-6-3 erasure coding need?
At least nine, so each of the nine cells of a stripe can sit on a different machine.