frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

14 Killed in protests in Nepal over social media ban

https://www.tribuneindia.com/news/world/massive-protests-in-nepal-over-social-media-ban/
221•whatsupdog•2h ago•123 comments

ICEBlock handled my vulnerability report in the worst possible way

https://micahflee.com/iceblock-handled-my-vulnerability-report-in-the-worst-possible-way/
87•FergusArgyll•1h ago•38 comments

RSS Beat Microsoft

https://buttondown.com/blog/rss-vs-ice
73•vidyesh•2h ago•39 comments

Package Managers Are Evil

https://www.gingerbill.org/article/2025/09/08/package-managers-are-evil/
34•gingerBill•1h ago•35 comments

Indiana Jones and the Last Crusade Adventure Prototype Recovered for the C64

https://www.gamesthatwerent.com/2025/09/indiana-jones-and-the-last-crusade-adventure-prototype-re...
22•ibobev•1h ago•1 comments

Using Claude Code to modernize a 25-year-old kernel driver

https://dmitrybrant.com/2025/09/07/using-claude-code-to-modernize-a-25-year-old-kernel-driver
696•dmitrybrant•13h ago•225 comments

VMware's in court again. Customer relationships rarely go this wrong

https://www.theregister.com/2025/09/08/vmware_in_court_opinion/
81•rntn•1h ago•25 comments

The MacBook has a sensor that knows the exact angle of the screen hinge

https://twitter.com/samhenrigold/status/1964428927159382261
871•leephillips•22h ago•423 comments

Why Is Japan Still Investing in Custom Floating Point Accelerators?

https://www.nextplatform.com/2025/09/04/why-is-japan-still-investing-in-custom-floating-point-acc...
130•rbanffy•2d ago•33 comments

Formatting code should be unnecessary

https://maxleiter.com/blog/formatting
240•MaxLeiter•14h ago•325 comments

GPT-5 Thinking in ChatGPT (a.k.a. Research Goblin) is good at search

https://simonwillison.net/2025/Sep/6/research-goblin/
286•simonw•1d ago•222 comments

How inaccurate are Nintendo's official emulators? [video]

https://www.youtube.com/watch?v=oYjYmSniQyM
60•viraptor•2h ago•11 comments

Intel Arc Pro B50 GPU Launched at $349 for Compact Workstations

https://www.guru3d.com/story/intel-arc-pro-b50-gpu-launched-at-for-compact-workstations/
154•qwytw•15h ago•177 comments

Meta suppressed research on child safety, employees say

https://www.washingtonpost.com/investigations/2025/09/08/meta-research-child-safety-virtual-reality/
11•mdhb•43m ago•0 comments

Look Out for Bugs

https://matklad.github.io/2025/09/04/look-for-bugs.html
31•todsacerdoti•3d ago•19 comments

Creative Technology: The Sound Blaster

https://www.abortretry.fail/p/the-story-of-creative-technology
121•BirAdam•15h ago•73 comments

How many SPARCs is too many SPARCs?

https://thejpster.org.uk/blog/blog-2025-08-20/
36•naves•2d ago•11 comments

Immich – High performance self-hosted photo and video management solution

https://github.com/immich-app/immich
24•rzk•5h ago•5 comments

Writing by manipulating visual representations of stories

https://github.com/m-damien/VisualStoryWriting
5•walterbell•3d ago•3 comments

Analog optical computer for AI inference and combinatorial optimization

https://www.nature.com/articles/s41586-025-09430-z
84•officerk•3d ago•15 comments

How many dimensions is this?

https://lcamtuf.substack.com/p/how-many-dimensions-is-this
92•robin_reala•4d ago•22 comments

No more data centers: Ohio township pushes back against influx of Amazon, others

https://www.usatoday.com
11•ericmay•40m ago•4 comments

Show HN: Veena Chromatic Tuner

https://play.google.com/store/apps/details?id=in.magima.digitaltuner&hl=en_US
41•v15w•7h ago•23 comments

I am giving up on Intel and have bought an AMD Ryzen 9950X3D

https://michael.stapelberg.ch/posts/2025-09-07-bye-intel-hi-amd-9950x3d/
282•secure•1d ago•292 comments

Forty-Four Esolangs: The Art of Esoteric Code

https://spectrum.ieee.org/esoteric-programming-languages-daniel-temkin
62•eso_eso•3d ago•35 comments

Taking Buildkite from a side project to a global company

https://www.valleyofdoubt.com/p/taking-buildkite-from-a-side-project
74•shandsaker_au•15h ago•9 comments

Garmin beats Apple to market with satellite-connected smartwatch

https://www.macrumors.com/2025/09/03/garmin-satellite-smartwatch/
210•mgh2•4d ago•194 comments

How to make metals from Martian dirt

https://www.csiro.au/en/news/All/Articles/2025/August/Metals-out-of-martian-dirt
73•PaulHoule•18h ago•81 comments

No Silver Bullet: Essence and Accidents of Software Engineering (1986) [pdf]

https://www.cs.unc.edu/techreports/86-020.pdf
101•benterix•17h ago•24 comments

What is the origin of the private network address 192.168.*.*? (2009)

https://lists.ding.net/othersite/isoc-internet-history/2009/oct/msg00000.html
212•kreyenborgi•1d ago•83 comments
Open in hackernews

Hitting Peak File IO Performance with Zig

https://steelcake.com/blog/nvme-zig/
127•ozgrakkurt•3d ago

Comments

laserbeam•1d ago
Zig is currently undergoing lots of breaking changes in the IO API and implementation. Any post about IO in zig should also mention the zig version used.

I see it’s 0.15.1 in the zon file, but that should also be part of the post somewhere.

ozgrakkurt•14h ago
This doesn't use std except the IoUring API so it doesn't depend on the new changes
database64128•1d ago
I see you use a hard-coded constant ALIGN = 512. Many NVMe drives actually allow you to raise the logical block size to 4096 by re-formatting (nvme-format(1)) the drive.
HippoBaro•1d ago
It’s really the hardware block size that matters in this case (direct I/O). That value is a property of the hardware and can’t be changed.

In some situations, the “logical” block size can differ. For example, buffered writes use the page cache, which operates in PAGE_SIZE blocks (usually 4K). Or your RAID stripe size might be misconfigured, stuff like that. Otherwise they should be equal for best outcomes.

In general, we want it to be as small as possible!

wtallis•1d ago
> It’s really the hardware block size that matters in this case (direct I/O). That value is a property of the hardware and can’t be changed.

NVMe drives have at least three "hardware block sizes". There's the LBA size that determines what size IO transfers the OS must exchange with the drive, and that can be re-configured on some drives, usually 512B and 4kB are the options. There's the underlying page size of the NAND flash, which is more or less the granularity of individual read and write operations, and is usually something like 16kB or more. There's the underlying erase block size of the NAND flash that comes into play when overwriting data or doing wear leveling, and is usually several MB. There's the granularity of the SSD controller's Flash Translation Layer, which determines the smallest size write the SSD can handle without doing a read-modify-write cycle, usually 4kB regardless of the LBA format selected, but on some special-purpose drives can be 32kB or more.

And then there's an assortment of hints the drive can provide to the OS about preferred granularity and alignment for best performance, or requirements for atomic operations. These values will generally be a consequence of the the above values, and possibly also influenced by the stripe and parity choices the SSD vendor made.

loeg•23h ago
I've run into (specialized) flash hardware with 512 kB for that 3rd size.
imtringued•22h ago
Why would you want the block size to be as small as possible? You will only benefit from that for very small files, hence the sweet spot is somewhere between "as small as possible" and "small multiple of the hardware block size".

If you have bigger files, then having bigger blocks means less fixed overhead from syscalls and NVMe/SATA requests.

If your native device block size is 4KiB, and you fetch 512 byte blocks, you need storage side RAM to hold smaller blocks and you have to address each block independently. Meanwhile if you are bigger than the device block size you end up with fewer requests and syscalls. If it turns out that the requested block size is too large for the device, then the OS can split your large request into smaller device appropriate requests to the storage device, since the OS knows the hardware characteristics.

The most difficult to optimize case is the one where you issue many parallel requests to the storage device using asynchronous file IO for latency hiding. In that case, knowing the device's exact block size is important, because you are IOPs bottlenecked and a block size that is closer to what the device supports natively will mean fewer IOPs per request.

ozgrakkurt•13h ago
I realise this and also implemented it properly here before: https://github.com/steelcake/io2/blob/fd8b3d13621256a25637e3...

Just opted to use fixed 512 byte alignment in this library since all decent SSDs I have encountered so far are ok with 512 byte file alignment and 64 byte memory alignment.

This makes the code a bit simpler both in terms of the allocator and the file operations.

nesarkvechnep•1d ago
Interesting how an implementation using FreeBSDs AIO would compare.
ozgrakkurt•13h ago
You should be able to compare AIO vs io_uring using fio if it works on FreeBSD.

There are some config examples here [0] but they would be different for AIO so need to check fio documentation to find corresponding config for AIO.

[0]: https://steelcake.com/blog/comparing-io-uring/

throwawaymaths•1d ago
why not use page allocator to get aligned memory instead of overallocating?
ozgrakkurt•13h ago
I was doing heavier computations to create write buffers and this actually made a bit of a difference before. Reverting to page_allocator now since it doesn't make a difference with new code.
Veserv•1d ago
7 GB/s at 512 KB block size is only ~14,000 IO/s which is a whopping ~70 us/IO. That is a trivial rate for even synchronous IO. You should only need one inflight operation (prefetch 1) to overlap your memory copy (to avoid serializing the IO with the memory copy) to get the full IO bandwidth.

Their referenced previous post [1] demonstrates ~240,000 IO/s when using basic settings. Even that seems pretty low, but is still more than enough to completely trivialize this benchmark and saturate the hardware IO with zero tuning.

[1] https://steelcake.com/blog/comparing-io-uring/

ozgrakkurt•14h ago
IOPS depends on the size of the individual IO and also the SSD. I was just trying to see if it is possible to reach max disk READ/WRITE.

Planning to add random reads with 4K and 512 blocksize to the example so I can measure IOPS too

marginalia_nu•1d ago
I'm not very familiar with zig and was kind a struggling to follow the code and maybe that's why I couldn't find where the setting was being set up, but in case it's not, be sure to also use registered file descriptors with io_uring as they make a fairly big difference.
ozgrakkurt•13h ago
I added registering file descriptors now.

It didn't make any difference when I was benchmarking with fio but I didn't use many threads so not sure.

I added it anyway since I saw this comment and also the io_uring document says it should make a difference.

mgerdts•19h ago
> The result I get from fio is 4.083 GB/s write, … The result for the diorw example in zig is 3.802 GB/s write….

4.083 / 3.802 = 1.0739

2^30 / 10^9 = 1.0737

I think the same rate was likely achieved but there is confusion between GiB and GB.

ozgrakkurt•13h ago
Yeah, seems like fio might be mixing them up or it is just faster than the zig code.

Fio seems to interpret `16g` as 16GiB so it creates a 16GiB ~= 17.2GB file. But not sure if it is reading/writing the whole thing.

It seems like the max performance of the SSD is 7GB/s in spec so it is kind of confusing.

mgerdts•1h ago
By default fio will read or write the whole thing. There are options to control how much will be read or written, perhaps bounded by time rather than space. The default output format of fio displays the results in both SI (10^x) and IEC (2^x) units per second. Other output formats are available that give values in bytes.

NVMe drive vendors always market size in GB (or TB) and data rates in GB/s.

ozgrakkurt•44m ago
Ahh, just realised it also interprets block size as KiB instead of KB.

I have this config:

bs=512KB size=16GB

But it interprets KiB and GiB so this was causing my confusion.

The IOPS and timing is basically identical.

So output seems fine but it always interprets parameters as SI.

Edit: Actually after looking into it more. It seems like there is a good chance that fio reports GiB and KiB in output and it also does the calculation based on that but in reality it uses GB/KB so measurements are a bit wrong.