Enterprise SSD "small deals"

Notice: Page may contain affiliate links for which we may earn a small commission through services like Amazon Affiliates or Skimlinks.

luckylinux

Well-Known Member
Mar 18, 2012
1,418
436
83
Smartctl for extracting the data to a json file, then my own code for the rest. Also needs to work across OS (ubuntu, windows, synology).
I would have preferred an off the shelf Solution, but I guess I gained quite a Bit of Experience in Python nowadays so I could probably "Hack" something :D .

Then do you just sample at regular Interval (1 Minute ?) e.g. for Temperatures and store in a PostgreSQL Database ? Or rather MongoDB / TimescaleDB / InfluxDB ?
 

ca3y6

Well-Known Member
Apr 3, 2021
633
621
93
I store smarts daily in a database. I separately log to file lots of other metrics: drives usage, temperature, same for CPU, ram usage, network card usage, etc, every 5 minutes. Useful to see how long a problem occured, or if a disk is filling up, or a server is out of RAM, etc.

Also for drive pools (zfs, storage space, md), I keep track of aggregated writes, disk topography (which disk connected to which port of which HBA), etc
 

luckylinux

Well-Known Member
Mar 18, 2012
1,418
436
83
I am actually writing a tool in Rust to export metrics from Linux systems to Prometheus. This will also include latency metrics from the disks. It is still work in progress, and will be open-sourced. The metrics are stored in 1 second interval, so you get high data resolution.
It will be great if you could open source it. My knowledge of RUST is essentially Zero (minus some playing around with PyO3 i.e. integrate Modules written and compiled in RUST into Python) but it would still be something great to run :).

Ah yes, Prometheus and Grafana are on the Todo list as well. Way too many Projects compared to the Time available o_O.
 

PnoT

Active Member
Mar 1, 2015
661
162
43
Texas
I picked up a few PM863a, listed here, for a TrueNAS project, and they're all roughly 89-90% of their life left.

These are showing up as 512 but is there a way to format them to 4k?
 

BackupProphet

Well-Known Member
Jul 2, 2014
1,382
1,022
113
Stavanger, Norway
intellistream.ai
There is no point reformatting them to 4k. IO sizes are dynamically aligned. If you write small files you will save space. If you write large files, you will have same performance. If you use PostgreSQL you never write smaller blocks than 8kb, if you use MySQL you never write smaller blocks than 16kb.
 
  • Like
Reactions: abq

Mithril

Active Member
Sep 13, 2019
468
160
43
Write amplification. It's been a hot minute since I really dived into specifics, but as I recall few (if any modern) SSDs are actually 512b under the hood, and writing 512b still requires a larger free area (and erase pages are even larger, but thats a whole other discussion). IIRC even many "4k native" drives need 8k or 16k free blocks to write. If you tell the OS/file system the drive is 512b, it will sometimes issue multiple 512b writes that should have been contiguous as part of (or all of) a 4k block. This will not always be automatically fixed, its an "it depends". When it isn't a 4k write can turn into 8 4k writes. In order to "save space" the file system would ALSO need to use 512b sectors/clusters/blocks. A 1TB drive with 4k sectors (drive and file system) can store close to 250 million files. If you have even close to 100 million files in most file systems on a single drive you are having what is known as "a bad time". NTFS minimum is 4K, while EXT3/4 is "clever" and you can store more than one inode per physical disk sector already (depending on format options).


512b mode is for legacy compatibility, and generally comes with downsides to iops/performance (including increased CPU overhead).
 
  • Like
Reactions: SnJ9MX and abq

luckylinux

Well-Known Member
Mar 18, 2012
1,418
436
83
Write amplification. It's been a hot minute since I really dived into specifics, but as I recall few (if any modern) SSDs are actually 512b under the hood, and writing 512b still requires a larger free area (and erase pages are even larger, but thats a whole other discussion). IIRC even many "4k native" drives need 8k or 16k free blocks to write. If you tell the OS/file system the drive is 512b, it will sometimes issue multiple 512b writes that should have been contiguous as part of (or all of) a 4k block. This will not always be automatically fixed, its an "it depends". When it isn't a 4k write can turn into 8 4k writes. In order to "save space" the file system would ALSO need to use 512b sectors/clusters/blocks. A 1TB drive with 4k sectors (drive and file system) can store close to 250 million files. If you have even close to 100 million files in most file systems on a single drive you are having what is known as "a bad time". NTFS minimum is 4K, while EXT3/4 is "clever" and you can store more than one inode per physical disk sector already (depending on format options).


512b mode is for legacy compatibility, and generally comes with downsides to iops/performance (including increased CPU overhead).
IMHO Write Amplification is mostly an Issue with ZFS when used with a VM Disk, possibly made worse if you use LUKS encrypted Devices and feed those instead of RAW Disks / Partitions to ZFS. I do for one ...

I'm not sure how much of a real Issue it is with enterprise Drives fed directly to an Application (e.g. PostgreSQL).

Then of course it depends on how "deep" and complex your "Stack" is.

Mine could look like the following on most Proxmox VE Hosts:

RAW Disk <-> GPT Partition <-> LUKS encrypted Device <-> ZFS Pool <-> VM Disk <-> EXT4 FS

It can definitively be worse if you do ZFS in the Guest on top of a ZFS Host Pool, then you have to coordinate (do only on one Side) Snapshots otherwise due to COW you'll run out of Space very quicky. Furthermore TRIM also needs to be done in the Guest periodically (either manually or automatically).

Although to be fair, besides Write Amplification, another Issue (when using the old Default ZFS volblocksize of 8K, is that it will occupy TWICE as much space on any RAIDZ2 Backup Server, 16k (new Default) is going to be approx. 1:1 Size.

I could also see this space Overhead (but for a different Reason) directly when using a HyperV Guest on Windows 11, you need to format mkfs.ext4 -G 4096, otherwise a 32GB Virtual Disk might become 100GB on the Windows Host. Not sure about write amplification.

I was trying to play a bit around with Write Amplification Benchmarks half a Year ago with this:

Don't ask me for exact Values, I cannot remember :confused: .

But I think the main Takeaway were:
- if you got consumer SSDs there's not much you can do to reduce Write Amplification significantly to the Point it won't be an Issue
- if you got enterprise SSDs there's not much Point to reduce Write Amplification because you have so much Endurance anyways

Sure, you can gain quite a bit by reducing Logging (that is A LOT of TBW saved each Year), use the default cached Writes (although slightly risky) in Proxmox VE (I believe sync is going to be MUCH worse), but apart from that not really sure.

I tried mkfs.ext4 -G 4096 but I don't think it made such a big difference on KVM Virtual Machines in terms of Write Amplification.
Similarly for ZFS volblocksize higher than 16k.

Possibly PostgreSQL WAL Configuration could improve something (I'm not a PostgreSQL Expert), but not sure there's much else you can do.

If the Disk Partition is aligned to 1MiB (what I typically do), ZFS volblocksize is set to 16k, Proxmox VE Write Cache is enabled (otherwise I think your Write Amplification will go through the Roof), EXT4 default should be 4KiB, LUKS2 Default should be 4KiB (blkid reports 4096 for my LUKS Devices), I don't think there's much you can do, unless you can tune Caching & your specific Application.
 
Last edited:
  • Like
Reactions: PnoT

PnoT

Active Member
Mar 1, 2015
661
162
43
Texas
My concerns were the write amplification, and after looking around quite a bit, I couldn't find anything stating that you can format these drives differently, unless I've missed it.

I'm going to check out some of the resources you've mentioned, but I don't plan on running any large databases or VMs on these drives, so in the end, it might not matter if there is a bit of amplification.
 

J--

Active Member
Aug 13, 2016
213
57
28
42
Has anyone purchased from the white label listings from Serverpartsdeals?

I'd like to pick up 4 or so 3.84TB SAS drives and I'm pretty drive agnostic, other than trying to avoid the whole rigmarole of guessing if I'll need embark on an easter egg hunt to find firmware updates to avoid failure.
 
Last edited:

zzz111

New Member
Apr 3, 2025
26
8
3
More Lenovo OEM 2.5in 3.84 TB SATA 6Gb QLC ION $150 (or maybe it’s the same relisted, am on a plane can’t check)
At least the exact same as his previous listing in this thread and a few on his profile. All the same pics. Different lot sizes tho. Sets in 3, 3, 5, 6 from what I saw

the ebay listings says they take offers who know how low they go...
Some of the listings I saw paid the list price. With those specs they're quite slow and have low endurance for enterprise drives. No mention of health