logoalt Hacker News

Twirrim10/12/20241 replyview on HN

I was experimenting about 18 months ago with FUSE in front of an HTTPS URL, essentially a large file I wanted to be able to random read as if it was local, without downloading it first.

One of the things I ran in to that made it painful, was that the block sizes for FUSE were really small, it made for a lot of latency and churn of HTTP calls to the back end that ended up needing some fairly complicated caching/pre-reading logic to handle. Kernel read-ahead logic never seemed to kick in (and I didn't do any investigation in to that at the time, other than not finding any particular way to induce it)


Replies

yencabulator10/15/2024

1) FUSE block sizes are somewhat adjustable (kernel forces min/max)

2) You can rechunk it in your HTTP client to make fatter HTTP requests: https://go.dev/talks/2013/oscon-dl.slide#51 -- there is even a way in FUSE of pushing the fatter results into the kernel page cache to minimize overhead of coming reads: https://pkg.go.dev/bazil.org/fuse#Conn.NotifyStore