# Custom NAS Specifications
## Parts
Quick look:
- Asrock B550M Pro4 Motherboard
- AMD Ryzen 7 3700x 8-Core, 16-Thread CPU
- 2 x Kingston KSM32ED8/32HC (64GB ECC)
- KSM - Kingston Server Premier
- 32 – 3200 MT/s
- E – Unbuffered DIMM (ECC) Module Type
- D – Dual Rank
- 8 – x8 DRAM Type
- 32 – 32GB Total capacity
- H – SK Hynix RAM Manufacturer
- C – C Die DRAM Die Revision
- Team T-Force Cardea Zero Z340 1 TB M.2-2280 NVME PCIe Gen3 x4 boot drive
- 6 x Seagate Exos X20 ST18000NM003D
- Manufacturer Recertified
- Seagate Technology
- 18000 GB = 18 TB
- Exos series
- Standard Model FastFormat™ (512e/4Kn)
- 7200 RPM
- SATA 6 Gb/s
- 256 MB cache
- EVGA GeForce RTX 3070 XC3 Gaming 8GB GDDR6 Graphics Card 08G-P5-3751-KL
- Super Flower Leadex VII XG 850W 80+ Gold, Cybenetics Platinum PSU
- 5x 120mm, 1x 140mm Super Flower MEGACOOL fans
- Fan controller (EnLabs PWMHUB10S)
- Intel X540-T2 10Gb 10GBaseT RJ-45 PCIe 3.0 x8 NIC Full Profile (IBM 49Y7972)
- Fractal Design Node 804 Computer Case
See [[Custom NAS Components]] for a more detailed list of parts (and how I pivoted along the way) or [[Synology DS1522+ vs Custom NAS]] for a comparison to the Synology I originally purchased and ended up returning.
## Terms:
- Gigabits (Gb) / Gigabits per second (Gbps)
- Gigabytes (GB) / Gigabytes per second (GB/s)
- Megabits (Mb) / Megabits per second (Mbps)
- Megabytes (MB) / Megabytes per second (MB/s)
## Facts:
- **Motherboard Chipset SATA Bandwidth:** Without a SATA HBA opening up a dedicated PCIe lane, the AMD B550 chipset offers only one uplink to the CPU via a single PCIe 2.0 x8. The raw data rate of that connection is 5.0 Gigabits per second (Gbps) per lane, while the effective data rate (after encoding) is 4 Gigabits per second (Gbps) per lane (there are 8 lanes), due to 8b/10b encoding overhead. The total throughput is 32.0 Gigabits per second (Gbps).
- 4.0 Gigabytes per second (GB/s)
- 4000 Megabytes per second (MB/s)
- 32000 Megabits per second (Mbps)
- **Drive Speed:** Each Seagate EXOS X20 18TB is rated for a sustained data transfer rate of 285 Megabytes per second (Mbps).
- 0.285 Gigabytes per second (GB/s)
- 2.28 Gigabits per second (Gbps)
- **Array Data Transfer Speeds:**
- **About RAIDZ2 (ZFS):** RAIDZ2 offers dual parity, meaning 2 drives are used for parity, leaving 3 drives for data storage in your 5-drive array.
- Storage efficiency of approximately 60%, with a 6% bump by adding a drive
- **Read:** The RAIDZ2 array supports 3x read speeds for a sustained data transfer rate of roughly 1425 Megabytes per second (Mbps)
- 0.855 Gigabytes per second (GB/s)
- 6.84 Gigabits per second (Gbps)
- **Write:** RAIDZ2 write speeds are typically limited to the speed of the slowest single drive due to parity calculations.
- **LAN and Network Speed:**
- **1Gb LAN:** A 1 Gigabit per second (Gbps) LAN provides a maximum of 125 Megabytes per second (Mbps) for data transfer across the network.
- Also called "1 Gigabit Ethernet" or "1GbE"
- 0.125 Gigabytes per second (GB/s)
- **10Gb LAN:** A 10 Gigabits per second (Gbps) LAN provides a maximum of 1,280 Megabytes per second (Mbps) for data transfer across the network.
- 1.25 Gigabytes per second (GB/s)
- **Ethernet Wiring:** Cat6 Ethernet cables, with which my home is wired, can support data transfer speeds of up to 10 gigabits per second (Gbps) at 250 MHz. However, the 10 Gbps speed is only effective up to 164 feet (55 meters).
- **Internet Plan:** I'm currently paying $60/mo for AT&T's Internet 500 plan, offering closer to 550 Megabits per second (Mbps) upload/download rates.
- **Effective Sustained Data Transfer Rates:**
- **Local:** Effective sustained data transfer rate of the array over the local network will be limited by the speed of the array and will depend on the client device's support.
- For example, my PC motherboard has a 2.5 Gigabit per second (Gbps) LAN (**Intel® I225-V 2.5Gb Ethernet**), making use of 37% of the array's maximum read speed during local transfers. However, the PC's LAN speed is not a bottleneck in cases of writing, since the drive's write speed of 2.28 Gigabits per second (Gbps) is below the LAN's rate of 2.5 Gigabits per second (Gbps).
- The Apple TV, however, only supports 1 Gigabit per second (Gbps) LAN, but that is perfectly acceptable for streaming even the highest bitrate 4K movies.
- For example, the average 4K movie is 60 Mbps, while the Apple TV can support speeds of up to 1000Mbps.
- **Internet:** Effective sustained data transfer rate of the array over the internet will be limited by my 550 Megabytes per second (Mbps) internet plan, the end user's internet plan, and will depend on the client device's support.
- **Streaming Video:**
- **Direct Play:** The current network speed allows my machine to serve 9 simultaneous 4K movies (at 60 Mbps each) or 36 simultaneous 1080p movies (at 15 Mbps each). This is well within my CPUs capabilities since direct play is not CPU-bound.
- **Transcoding:** If transcoding is necessary, my 3070 is capable of 23 simultaneous 4K to 1080p streams ([source](https://www.elpamsoft.com/?p=Plex-Hardware-Transcoding)), while my CPU is only capable of 8–12. The transcoding capability of the system (GPU alone or GPU + CPU) fits within the network limit of 36 simultaneous 1080p streams, although reaching that many users is extremely unlikely.
- the Golden Rule when transcoding 4k content is: _don’t transcode 4k content_
## Upgrades
This system can be extended, but only with one more HDD before either the mobo should be replaced with the AMD X570 chipset big brother for +2 SATA slots, or the GPU dropped for a 8x SATA HBA in the only available PCIe x16, which would require the CPU to be replaced with an APU, probably the AMD Ryzen 5 PRO 5650G.
### Wifi ⭐
An obvious one is wifi:
| AT&T Plan | Speed (Gbps) | Price ($/mo) | Use of Array's Read Speed (%) |
| ------------- | ------------ | ------------ | ----------------------------- |
| Internet 500 | 0.5 | 60 | 7 |
| Internet 1000 | 1 | 85 | 15 |
| Internet 2000 | 2 | 150 | 29 |
| Internet 5000 | 5 | 250 | 73 |
The Internet 1000 plan would strike the best balance between using more of the array's top read speed and cover most end-user's internet speed and device support, all while serving more users.
### 10GbE NIC for PC ⭐
Since your array’s maximum read speed (~1.425 GB/s) exceeds your LAN’s 2.5 Gbps (~0.31 GB/s) capability, upgrading to a 10 Gbps LAN adapter on your PC could unlock the full potential of your RAIDZ2 array for local reads. While Cat6 cabling supports this, ensure your switches are also 10GbE-capable. This is not as important for local writes due to the array's write speed bottleneck (limited to the slowest single drive due to parity calculations).
### Dual SSD
Adding a high-speed SSD as a dedicated ZIL device (SLOG) can significantly boost write performance for sync writes, which are common in workloads requiring high data integrity (e.g., database or virtual machine hosting).
If you’re accessing frequently used files or directories, adding another SSD as an L2ARC (secondary Adaptive Replacement Cache) can help cache metadata and small reads, improving overall responsiveness for file access.
While you mentioned adding an SSD as an L2ARC (secondary cache) to improve read performance, you could also consider setting up a **dedicated Metadata Special Device** in ZFS. This device is specifically optimized for storing file system metadata, which can significantly improve performance for operations involving a large number of small files or directories
### ARC is Preferred
- **ARC**: The primary caching layer in ZFS, which resides in system RAM. It is extremely fast because RAM is the quickest storage medium in a computer.
- **L2ARC**: A secondary caching layer stored on SSDs or other fast storage devices. It's slower than RAM but faster than traditional spinning disks.
- L2ARC needs some ARC space in RAM to manage its metadata (pointers to cached data stored in the L2ARC)
- If you have limited RAM (e.g., less than 64GB), dedicating a portion of ARC to L2ARC metadata can reduce ARC's effectiveness. This can lead to performance degradation because less RAM is available for the primary cache.
- If you have 64GB or more RAM, the trade-off becomes acceptable. You can afford to allocate some RAM for L2ARC metadata without significantly impacting ARC's performance.
- L2ARC is beneficial when your working dataset (frequently accessed data) exceeds what can fit in RAM alone.
If you're configuring a ZFS system, prioritize adding RAM and fine-tuning ARC settings before considering L2ARC.
### RAM
Leaving an upgrade path is always good. So 1 x 32GB DIMM when you have 4 slots, (2 channels, 2 slots per channel), is a perfectly acceptable compromise over 2 x 16GB DIMMs.
### Cloud Backups
If you ever decide to extend your array’s capabilities beyond local use, integrating a ZFS send/receive setup with a cloud service (e.g., Backblaze B2 or Wasabi) can provide seamless incremental offsite backups, mitigating the risk of data loss even in catastrophic hardware failure.
Some of these upgrades may also require an AMD X550 chipset mobo to take advantage use the NVMe.
### MOBO
[[Gigabyte MC12-LE0]]
ASRock Rack X570D4U
### Mirror Boot Drive
### UPS (Uninterruptible Power Supply)
See [[Custom NAS Potential Parts (sketch)]]