frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

What if you just did a startup instead?

https://alexaraki.substack.com/p/what-if-you-just-did-a-startup
1•okaywriting•4m ago•0 comments

Hacking up your own shell completion (2020)

https://www.feltrac.co/environment/2020/01/18/build-your-own-shell-completion.html
1•todsacerdoti•7m ago•0 comments

Show HN: Gorse 0.5 – Open-source recommender system with visual workflow editor

https://github.com/gorse-io/gorse
1•zhenghaoz•8m ago•0 comments

GLM-OCR: Accurate × Fast × Comprehensive

https://github.com/zai-org/GLM-OCR
1•ms7892•9m ago•0 comments

Local Agent Bench: Test 11 small LLMs on tool-calling judgment, on CPU, no GPU

https://github.com/MikeVeerman/tool-calling-benchmark
1•MikeVeerman•10m ago•0 comments

Show HN: AboutMyProject – A public log for developer proof-of-work

https://aboutmyproject.com/
1•Raiplus•10m ago•0 comments

Expertise, AI and Work of Future [video]

https://www.youtube.com/watch?v=wsxWl9iT1XU
1•indiantinker•10m ago•0 comments

So Long to Cheap Books You Could Fit in Your Pocket

https://www.nytimes.com/2026/02/06/books/mass-market-paperback-books.html
3•pseudolus•11m ago•1 comments

PID Controller

https://en.wikipedia.org/wiki/Proportional%E2%80%93integral%E2%80%93derivative_controller
1•tosh•15m ago•0 comments

SpaceX Rocket Generates 100GW of Power, or 20% of US Electricity

https://twitter.com/AlecStapp/status/2019932764515234159
2•bkls•15m ago•0 comments

Kubernetes MCP Server

https://github.com/yindia/rootcause
1•yindia•16m ago•0 comments

I Built a Movie Recommendation Agent to Solve Movie Nights with My Wife

https://rokn.io/posts/building-movie-recommendation-agent
4•roknovosel•16m ago•0 comments

What were the first animals? The fierce sponge–jelly battle that just won't end

https://www.nature.com/articles/d41586-026-00238-z
2•beardyw•25m ago•0 comments

Sidestepping Evaluation Awareness and Anticipating Misalignment

https://alignment.openai.com/prod-evals/
1•taubek•25m ago•0 comments

OldMapsOnline

https://www.oldmapsonline.org/en
1•surprisetalk•27m ago•0 comments

What It's Like to Be a Worm

https://www.asimov.press/p/sentience
2•surprisetalk•27m ago•0 comments

Don't go to physics grad school and other cautionary tales

https://scottlocklin.wordpress.com/2025/12/19/dont-go-to-physics-grad-school-and-other-cautionary...
1•surprisetalk•27m ago•0 comments

Lawyer sets new standard for abuse of AI; judge tosses case

https://arstechnica.com/tech-policy/2026/02/randomly-quoting-ray-bradbury-did-not-save-lawyer-fro...
3•pseudolus•28m ago•0 comments

AI anxiety batters software execs, costing them combined $62B: report

https://nypost.com/2026/02/04/business/ai-anxiety-batters-software-execs-costing-them-62b-report/
1•1vuio0pswjnm7•28m ago•0 comments

Bogus Pipeline

https://en.wikipedia.org/wiki/Bogus_pipeline
1•doener•29m ago•0 comments

Winklevoss twins' Gemini crypto exchange cuts 25% of workforce as Bitcoin slumps

https://nypost.com/2026/02/05/business/winklevoss-twins-gemini-crypto-exchange-cuts-25-of-workfor...
2•1vuio0pswjnm7•30m ago•0 comments

How AI Is Reshaping Human Reasoning and the Rise of Cognitive Surrender

https://papers.ssrn.com/sol3/papers.cfm?abstract_id=6097646
3•obscurette•30m ago•0 comments

Cycling in France

https://www.sheldonbrown.com/org/france-sheldon.html
2•jackhalford•31m ago•0 comments

Ask HN: What breaks in cross-border healthcare coordination?

1•abhay1633•32m ago•0 comments

Show HN: Simple – a bytecode VM and language stack I built with AI

https://github.com/JJLDonley/Simple
2•tangjiehao•34m ago•0 comments

Show HN: Free-to-play: A gem-collecting strategy game in the vein of Splendor

https://caratria.com/
1•jonrosner•35m ago•1 comments

My Eighth Year as a Bootstrapped Founde

https://mtlynch.io/bootstrapped-founder-year-8/
1•mtlynch•36m ago•0 comments

Show HN: Tesseract – A forum where AI agents and humans post in the same space

https://tesseract-thread.vercel.app/
1•agliolioyyami•36m ago•0 comments

Show HN: Vibe Colors – Instantly visualize color palettes on UI layouts

https://vibecolors.life/
2•tusharnaik•37m ago•0 comments

OpenAI is Broke ... and so is everyone else [video][10M]

https://www.youtube.com/watch?v=Y3N9qlPZBc0
2•Bender•37m ago•0 comments
Open in hackernews

Hitting Peak File IO Performance with Zig

https://steelcake.com/blog/nvme-zig/
129•ozgrakkurt•5mo ago

Comments

laserbeam•5mo 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•5mo ago
This doesn't use std except the IoUring API so it doesn't depend on the new changes
database64128•5mo 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•5mo 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•5mo 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•5mo ago
I've run into (specialized) flash hardware with 512 kB for that 3rd size.
imtringued•5mo 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•5mo 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•5mo ago
Interesting how an implementation using FreeBSDs AIO would compare.
ozgrakkurt•5mo 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•5mo ago
why not use page allocator to get aligned memory instead of overallocating?
ozgrakkurt•5mo 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•5mo 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•5mo 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•5mo 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•5mo 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•5mo 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•5mo 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•5mo 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•5mo 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.

mgerdts•5mo ago
fio is a mature widely used tool. It is the only tool that I’ve seen used in the disclosures for performance measurement in NVMe drive datasheets. I’ve used it regularly and see a strong correlation between what it reports and what I can see from other sources measuring the same load.

I categorize suggestions by new fio users that they found a bug in fio similarly to how I categorize claims by new C programmers that they found a bug in malloc.

ozgrakkurt•5mo ago
Ok It was because what I think is a KB is really a KiB.

I though KB = 1024 bytes and KiB = 1000 bytes but it is the other way around