We are currently estimating the amount of ssd storage we need to acquire to support a dataset of size x in gigabytes. In the docs and this forum we found multiple statements:
defrag-lwm-pct should not be set above ~50% to avoid write amplification
and
You should not exceed 50-60% capacity on your SSDs.
Our question: Do we make any mistake when estimating that we need around 4x hardware capacity (usage of 50% with worst case usage of 51% per block) with no replication and 8x with 1 replication or should these 2 statements been seen as a 2x ?
What will happen below that ratio, will only latency and write-amplification increase or also throughput decrease? If so, how badly?
It should be 2x for write amplification and 2x for replication factor 2. So, typically, 4x total for replication factor 2.
If write amplification increases, the overall performance would be affected, but it is not possible to quantify this at all… it depends on the workload (avg. record size and throughput) and the SSD devices used… so it could anywhere from not noticeable at all to very impacting depending on those factors…
Defragmentation will only reclaim space for deleted records. The disk usage statistic does not account for deleted records, so the defragmentation will not change the disk usage. It will just recombine blocks to provide blocks that would be available to have new records written into them.
It sounds like you are actually either concerned by low avail_pct (free blocks) or by deleted data coming back after a cold start…