创建

登录 ReadmeX

或

了解我们如何处理你的信息: 隐私政策

ReadmeX

陪你读懂 AI 动态

今天,想先了解什么?

选一份动态总结,或直接聊聊你的问题。

社区和关注动态总结只属于你自己。

资讯

Modem将嵌入搜索迁移至turbopuffer

AI 总结

Modem称,其共享的pgvector表导致小型客户的搜索最慢,同时数据库计算成本不断上升。到2026年8月,搜索中位耗时约为0.8秒,最慢的1%耗时长达28秒。公司尝试使用HNSW索引,但称这反而令性能明显恶化;二值量化虽然改善了搜索,却未能避免嵌入数据与其他数据争夺Postgres内存。Modem随后将嵌入存储和搜索迁移至turbopuffer,并称p90搜索时间缩短76%。在上线后的首24小时内,公司还称生产数据库CPU下降62%、缓存未命中减少82%、嵌入表上的慢查询减少95%,并得以缩减Neon Postgres实例。尽管同时增加了turbopuffer费用,公司称整体存储成本仍下降约10%。这些性能及成本数据均由Modem自行披露,尚未获得独立验证。

深度见解

Modem的案例表明,嵌入搜索即使返回正确结果,也可能占用Postgres内存、拖慢其他工作负载并推高数据库资源需求。将嵌入数据迁移至独立服务后,资源争用减少,公司也能缩减数据库资源,但这一方案需要维护两个数据库。

All posts

Learn how our shared pgvector table made our smallest customers the slowest, why an HNSW index made it worse, and how moving to turbopuffer made our whole database faster and cheaper.

Like many other AI products, Modem uses embeddings. When new customer messages come in, we want to know whether any customers have said something similar before, in any channel and in any wording. Embeddings are part of how we answer that.

When we started off, we wanted to manage as few moving pieces as possible. So those embeddings lived in Postgres with the pgvector extension. And for a long time it was fine.

Then our searches started getting slow in a way that made no sense. Some of our smallest customers waited up to ten seconds for results while our biggest customers (with the most data to scan) got answers immediately. And the whole time our database compute costs soared.

In this post, I'll explain what was slowing us down, why the standard fix didn't work for a product like ours, and how we eventually capitulated and switched to turbopuffer, which cut our p90 search time by 76% and took most of the load off our database.

#Modem#turbopuffer#pgvector#Postgres#Neon#HNSW

原文约 14 分钟读完阅读原文
群聊

还没有评论,来说说你的看法。