Live data from Hacker News

Show HN: VectorVFS, your filesystem as a vector database

vectorvfs.readthedocs.io

141–150 of 150 posts

Re: Show HN: VectorVFS, your filesystem as a vector database

#141

Earlier quoted context omitted.

> You can reason about block offsets. If your writes are 512B-aligned, you can be ensured minimal write amplification. Not all devices use 512 byte sectors, an that is mostly a relic from low-density spinning rust; > If your writes are append-only, log-structured, that makes SSD compaction a lot more straightforward Hum, no. Your volume may be a sparse file on SAN system; in fact that is often the case in cloud envir…

I'm not sure how any of these negate the broader point: filesystems provide a lower-level interface to the underlying block device than a database. To say that that's not true would require more than cherry-picking examples of where some fileystem assumption may be tenuous, it would require demonstrating how a DBMS can do better. > Not all devices use 512 byte sectors 4K then :). Files are block-aligned, and the pred…

> I'm not sure how any of these negate the broader point: filesystems provide a lower-level interface to the underlying block device than a database.

On the contrary, filesystems are a specialized database; hardware interface optimizations are done at volume or block device level, not at filesystem level; every direct hardware IO optimization you may have on a kernel-supported filesystem is a leaky VFS implementation and an implementation detail, not a mandatory filesystem requirement.

> 4K then :). Files are block-aligned, and the predominant block size changed once in 40 years from 512B to 4K.

They are, but when the IO is pipelined through a network or serial link, intermediary buffer sizes are different; also, any enterprise-grade controller will have enough buffer space for the difference between a 4k block or a 16k one is negligible;

> Regardless, sequential writes will always provide better write performance than random writes. With POSIX, you control this behavior directly. With a DBMS, you control it by swapping out InnoDB for RocksDB or something.

Disk offsets are linear offsets, not physical; the current system still works as a bastardization of the notion of logical blocks, not physical ones; there is no guarantee that what you see as a sequential write will actually be one locally, let alone in a cloud environment. In fact, you have zero guarantee that your EBS volume is not actually heavily fragmented on the storage system;

>But this is for when you want to outperform a DBMS by 200X, aligned I/O is sufficient for 10-50X. :)

When you want to outperform some generic dbms; because a filesystem is a very specific dbms.

Re: Show HN: VectorVFS, your filesystem as a vector database

#142
post #139

Earlier quoted context omitted.

> If you really want it to be in multiple locations, you could make a fuse interface that shows directories full of files matching specific tags Yeah, that's the kind of thing that I've wanted, but not really had the programming skill/experience/patience to make. There have been a couple of similar projects, but nothing that seems popular enough to be worthwhile spending time using.

ChatGPT can write such a thing for you relatively easily if you specify it in enough detail.

I'm not a fan of LLMs (not that I've actually got any experience with them myself), and I definitely wouldn't want to trust one to generate filesystem code even if it is just a FUSE layer.

Re: Show HN: VectorVFS, your filesystem as a vector database

#143
post #26
post #13

Earlier quoted context omitted.

I can't agree with this. I like it that I can have all these tools which work with files and are tools which are not db-oriented, and the fact that there are different filesystems for different scenarios, that I can sandwich LVM between a FS and the block device. That /proc/ can pretend to be a FS because else we'd possibly end up with something like the Windows Registry for these operations, only managed through a d…

> Would you store all your ~/ in something like SQLite database? Actually yeah that sounds pretty good. For Desktop/Finder/Explorer you'd just need a nice UI. Searching Documents/projects/etc would be the same just maybe faster? All the arbitrary stuff like ~/.npm/**/* would stop cluttering up my ls -la in ~ and could be stored in their own tables whose names I genuinely don't care about. (This was the dream of ~/Lib…

> This doesn't solve namespacing or traversal.

That's "just" API. FS is "just" a KV store with a weird crufty API and a few extra tricks (bind mounts or whatever).

I think the primary issue is the difference in performance between different strategies. It would be interesting to have a FS with different types of folders similar to how (for example) btrfs is generally CoW but you can turn that off via an attribute.

Re: Show HN: VectorVFS, your filesystem as a vector database

#144
> Zero-overhead indexing Embeddings are stored as extended attributes (xattrs) on each file, eliminating the need for external index files or services.

Ain't no such thing as zero-overhead indexing. Just because you can't articulate where the overhead is doesn't make it disappear.

Re: Show HN: VectorVFS, your filesystem as a vector database

#145
post #36

Fun idea storing embeddings in inodes! Very clever! I want to point out that this isn’t suitable for any kind of actual things you’d use a vector database for. There’s no notion of a search index. It’s always a O(N) linear search through all of your files: https://github.com/perone/vectorvfs/blob/main/vectorvfs/cli.... Still, fun idea :)

An index could be built on top of this though if desired. No need to have it in the FS itself.

But then there's no point in storing anything in xattrs.

Re: Show HN: VectorVFS, your filesystem as a vector database

#146

Earlier quoted context omitted.

Did Microsoft tell the WinFS team why they decided to cancel the product? If so, can you reveal what the real reason was?

I mean, it’s not like whenever a project is cancelled at Microsoft they bring team members into a room and say, “We’re totally going to lie to the public (and therefore the shareholders) but here’s the real reason ...” Maybe all the nuances aren't fully communicated publicly when a project is cancelled, but I don’t recall having a sense that what was said publicly was any different than our understanding internally.…

I don't remember Microsoft ever really giving the public a reason for canceling it. It just seemed to disappear with everyone just speculating what the reason was. Was there a press release that I missed?

Re: Show HN: VectorVFS, your filesystem as a vector database

#147

Earlier quoted context omitted.

> "Userspace vs not" is a different argument from "consistency vs not" or "atomicity vs not" or "POSIX vs not". Someone still needs to solve that problem. Sure instead of SQLite over POSIX you could implement POSIX over SQLite over raw blocks. But you haven't gained anything meaningful. This was an attempt to possibly explain the microkernel point GP made, which only really matters below the FS. > I think this is red…

I was confused for a while about where this discussion was going, and what was the broader point. Will try to consolidate thoughts in the interest of making it clearer. You seem unhappy with POSIX because its guarantees feel incomplete and ad hoc (they are). You like databases because their guarantees are more robust (also true). DBMS over POSIX enables all the guarantees that you like. I'd want to invoke the end-to-…

Is there a DBMS or storage engine intended for a DBMS that does bypass the filesystem altogether? I'm not aware of any, but at the same time I don't have a full grasp of all the storage engines offered.

It almost seems like a ridiculous idea to me for a database component author to want to write there own filesystem instead of improving their DB feature set. I hear the gripes in this thread about filesystems, but they almost sound service level user issues, not deeper technical issues. What I mean by that, is the I/O strategies I've seen from the few open source storage engines i've looked at don't at all seem hindered by the filesystem abstractions that are currently offered. I don't know what a DBMS has to gain from different filesystem abstractions.

Re: Show HN: VectorVFS, your filesystem as a vector database

#148
post #36

Earlier quoted context omitted.

An index could be built on top of this though if desired. No need to have it in the FS itself.

But then there's no point in storing anything in xattrs.

The reason would be that it's there as the source of truth, and when files e.g. get copied around, so does the metadata. The indexer doesn't need to be synchronous wrt such operations though, it can just watch the FS for changes and spin up reindexing as needed asynchronously.

Re: Show HN: VectorVFS, your filesystem as a vector database

#149

Earlier quoted context omitted.

I mean, it’s not like whenever a project is cancelled at Microsoft they bring team members into a room and say, “We’re totally going to lie to the public (and therefore the shareholders) but here’s the real reason ...” Maybe all the nuances aren't fully communicated publicly when a project is cancelled, but I don’t recall having a sense that what was said publicly was any different than our understanding internally.…

I don't remember Microsoft ever really giving the public a reason for canceling it. It just seemed to disappear with everyone just speculating what the reason was. Was there a press release that I missed?

I vaguely recall something being posted to the blog. I doubt the blog is still up. I could google around and check the Wayback Machine and so forth, but it would probably be faster if you did it yourself. I don’t have any inside info, I’m afraid.

Re: Show HN: VectorVFS, your filesystem as a vector database

#150

Earlier quoted context omitted.

I was confused for a while about where this discussion was going, and what was the broader point. Will try to consolidate thoughts in the interest of making it clearer. You seem unhappy with POSIX because its guarantees feel incomplete and ad hoc (they are). You like databases because their guarantees are more robust (also true). DBMS over POSIX enables all the guarantees that you like. I'd want to invoke the end-to-…

Is there a DBMS or storage engine intended for a DBMS that does bypass the filesystem altogether? I'm not aware of any, but at the same time I don't have a full grasp of all the storage engines offered. It almost seems like a ridiculous idea to me for a database component author to want to write there own filesystem instead of improving their DB feature set. I hear the gripes in this thread about filesystems, but the…

There are DBMSes that do their own thing -- superficial chatgpt queries seem to result in a few, but I'll not mention them because I don't know much about their internals. I can think of a few reasons, mostly related to wanting to have more control over how physical media is used. I don't see those arguments made here though.

This paper may be a good read: https://dl.acm.org/doi/10.1145/3341301.3359656 -- it lays down arguments for why not to build a distributed filesystem on top of a regular local filesystem, and some of those arguments could apply to DBMS'es.

Post reply on HN