News for hackers. Stuff that matters.
Re:Benchmarking Cheap SSDs for Fun, No Profit (Be Warned) by Joel_Mckay on Monday March 27, 2023 @10:37AM (#35327219)
Practically speaking, some are more concerned with reliability over ludicrous file write-speed. For example, the Intel m.2 consumer drive are considered relatively slow, but run relatively cool without a heat-sink. Notably thermal issues are still very common for laptops/tablets, and Flash premature aging tends to be temperature dependent as well. Very surprised Intel transferred the ssd line to Solidigm.

Also, some Linux users bloat their io buffer size to several GiB, set the eviction priority to 1 (rarely flushes dirty cache back to storage), and use F2FS for /home . This limits ssd wear, trim is auto run once a week, and hardware storage drivers can still regularly flush the drives internal high-speed SLC area as needed. Even the cheapest Sandisk and Samsung SATA drives from 6 years ago are still working just fine on the old hosts with this setup, and we expected them to EOL 4 years ago.

Tip: always sort by lowest negative ssd product reviews first. =)

Re:Benchmarking Cheap SSDs for Fun, No Profit (Be Warned) by jimis on Monday March 27, 2023 @10:41AM (#35327273)
> bloat their io buffer size to several GiB, set the eviction priority to 1

How do you tweak these? I'm aware of dirty_writeback_centisecs and the likes, but you are most likely referring to something different.

Re:Benchmarking Cheap SSDs for Fun, No Profit (Be Warned) by mattpallissard on Monday March 27, 2023 @10:51AM (#35327437)
No, you're thinking along the right lines. These things are kernel tune ables. If you thumb through the sysfs kernel docs you can find loads of options on this sort of thing.
Re:Benchmarking Cheap SSDs for Fun, No Profit (Be Warned) by the8472 on Monday March 27, 2023 @11:21AM (#35327868)
YOLO mountflags for ext4 that minimize synchronous writes:

    data=writeback,journal_async_commit,lazytime,nobarrier,commit=99999
Good for caches, scratch space, build dirs and anything that can be rebuilt from other data but it'll get corrupted during any non-graceful shutdown.

overlayfs offers an even more aggressive mount option "volatile" which ignores all O_SYNC or fsyncs, but no other filesystem exposes that tradeoff.

Re:Benchmarking Cheap SSDs for Fun, No Profit (Be Warned) by Joel_Mckay on Monday March 27, 2023 @11:32AM (#35328001)
Have a look at dedicated external journal disk performance for ext4. It actually is pretty fast, and relatively safe.

I find performance wise, a logging fs like f2fs is actually not as terrible as one would expect for most use-cases:

UUID=abc /home f2fs defaults,noatime,nodiratime,noquota,discard,nobarrier,inline_xattr,inline_data 0 2

Re:Benchmarking Cheap SSDs for Fun, No Profit (Be Warned) by Joel_Mckay on Monday March 27, 2023 @11:53AM (#35328261)
These settings heavily depends on your OS, hardware, and use-case.

This profile is what I prefer for AORUS 5/RTX3070/i7-12700H/16GB laptops, and despite how terrible the OEM hardware is... this setup will run acceptably well with dual Intel 670p M.2 drives.

The following should work with most Debian variants, but is hardly optimal for every platform. But if your laptop is similar, than it should be a good place to start. One caveat, when ejecting media it may take some time to flush your buffers.

sudo nano /etc/sysctl.conf

net.ipv4.conf.all.rp_filter = 1

net.ipv4.conf.default.rp_filter = 1

# Ignore ICMP broadcast requests

net.ipv4.icmp_echo_ignore_broadcasts = 1

# Disable source packet routing

net.ipv4.conf.all.accept_source_route = 0

net.ipv6.conf.all.accept_source_route = 0

net.ipv4.conf.default.accept_source_route = 0

net.ipv6.conf.default.accept_source_route = 0

# Ignore send redirects

net.ipv4.conf.all.send_redirects = 0

net.ipv4.conf.default.send_redirects = 0

net.ipv4.tcp_syncookies = 1

net.ipv4.tcp_max_syn_backlog = 2048

net.ipv4.tcp_synack_retries = 2

net.ipv4.tcp_syn_retries = 5

net.ipv4.conf.all.log_martians = 1

net.ipv4.icmp_ignore_bogus_error_responses = 1

net.ipv4.conf.all.accept_redirects = 0

net.ipv6.conf.all.accept_redirects = 0

net.ipv4.conf.default.accept_redirects = 0

net.ipv6.conf.default.accept_redirects = 0

net.ipv4.icmp_echo_ignore_all = 1

#ban list mem

net.core.rmem_default=8388608

net.core.wmem_default=8388608

#prevent TCP hijack in older kernels

net.ipv4.tcp_challenge_ack_limit = 999999999

#may be needed to reduce failed TCP links

net.ipv4.tcp_timestamps=0

net.ipv4.tcp_rfc1337=1

net.ipv4.tcp_workaround_signed_windows=1

net.ipv4.tcp_fack=1

net.ipv4.tcp_low_latency=1

net.ipv4.ip_no_pmtu_disc = 0

net.ipv4.tcp_sack = 1

net.ipv4.tcp_mtu_probing = 1

net.ipv4.tcp_frto=2

net.ipv4.tcp_frto_response=2

net.ipv4.tcp_congestion_control = cubic

net.ipv4.tcp_window_scaling = 1

kernel.exec-shield=1

kernel.randomize_va_space=1

#reboot on kernel panic after 20 sec

kernel.panic=20

vm.swappiness=1

vm.vfs_cache_pressure=50

#percentage of system memory that can be filled with dirty pages

# run to check io performance with: sudo vmstat 1 20

vm.dirty_background_ratio=60

#maximum amount of system memory filled with dirty pages before committed

vm.dirty_ratio=80

vm.dirty_background_bytes=2684354560

vm.dirty_bytes=5368709120

#how often the flush processes wake up and check

vm.dirty_writeback_centisecs=10000

#how long something can be in cache before it needs to be written

vm.dirty_expire_centisecs=60000

vm.min_free_kbytes = 16384

# increase system file descriptor limit

fs.file-max=120000

#CONNTRACK_MAX = RAMSIZE (in bytes) / 16384 / (number_of_bits_in_a_pointer / 32)

#low power CPU should halve mem usage limits

net.ipv4.netfilter.ip_conntrack_max = 16384

net.netfilter.nf_conntrack_max = 16384

net.nf_conntrack_max = 16384

net.ipv4.netfilter.ip_conntrack_tcp_timeout_established = 86400

kernel.pid_max = 32767

net.ipv4.ip_local_port_range = 2000 65000

Re:Benchmarking Cheap SSDs for Fun, No Profit (Be Warned) by kkielhofner on Monday March 27, 2023 @10:50AM (#35327416)
If you want cheap-ish, EXTREMELY reliable, and "pretty fast" there's always the Intel P "datacenter" series. You can find a lot of PCIe variants on eBay[0] and elsewhere. Yes used typically != reliable but listings will include drive life/use percentages and many of them are > 90%. You can and should verify this upon receipt.

As one example the Intel P3700 can do 17 full drive writes per day[1] over five years! With a MTBF of 2 million hours (230 years).

Over the years I've used these as my boot/OS drives and I've never seen one fail. Yes, 5-10x the price of the extremely cheap drives in this post but all in all not bad if you just don't want a drive to fail.

[0] - https://www.ebay.com/itm/295520377095?hash=item44ce631907:g:...

[1] - https://www.intel.com/content/dam/www/public/us/en/documents...

Re:Benchmarking Cheap SSDs for Fun, No Profit (Be Warned) by leonidasv on Monday March 27, 2023 @11:20AM (#35327850)
Genuine question: how those Datacenter-class SSDs manage that insane TBW? Samsung's 970 Pro, which was the last (consumer) MLC "Pro" drive by Samsung, got only about 800 TBW for a 1TB drive. Do they overprovision memory cells on those SSDs? Or are the cells just larger in order to sustain more wear over time?
Re:Benchmarking Cheap SSDs for Fun, No Profit (Be Warned) by wtallis on Monday March 27, 2023 @11:27AM (#35327942)
Datacenter drives tend to have a bit more overprovisioning (ie. 960GB usable capacity rather than 1000GB). They also don't usually do SLC caching. They also grade write endurance based on different criteria: consumer SSDs are supposed to be able to retain their data for a full year after reaching the end of their write endurance, but enterprise SSDs only need to have 3 months data retention at end of life (albeit at a higher temperature).

But mostly, it's a matter of the consumer drives having low-balled ratings so that they don't cannibalize sales of the enterprise drives. Because the write endurance ratings are more about when the warranty expires than about when the memory itself is actually worn out.