mehrant
Show HN: Open-source, 3D mockup designer for apps
Show HN: Building a full agentic harness around a 4B model is hard
Around 3 months ago, we were thinking why none of the iPhone apps running an LLM are built as a full harness (as in inference + agentic loop + context management + tools + MCP servers and etc.). It became more interesting when we noticed even the new Siri is not fully on device (and not available in EU for that matter).Having built a few agentic products around a custom harness in the past, we...
Show HN: Simulator for a custom 8-bit discreet logic computer
5 years ago, I made a derivative of SAP-1 (mainly inspired by Ben Eater) on breadboard with few improvement and called it MSAP-1 (https://github.com/mehrantsi/MSAP-1) I made my own very primitive Assembly language and a simple Arduino programmer (https://github.com/mehrantsi/8-bit_CPU_Programmer) where I could load my programs onto MSAP-1 and even Debug them...
Test was done using Redis benchmark for 1M random keys, 50 clients, Pipeline depth, 64.
I did this locally on my MBP M3-Max. This gives a little over 2M for Redis and 5.4M for Feox.
redis-benchmark -n 1000000 -r 1000000 -c 50 -P 64 -t SET,GET -q
https://x.com/mltoosi/status/1963599382592590069?s=46
Feox DB itself (the embedded KV behind the server) is quite fast as well. You can also test for yourself or see the criterion benchmark report.
https://feoxdb.com/benchmarks.html
<700ns INSERT and <200ns GET on Feox DB itself.
Show HN: Drop-in Redis replacement in Rust with 5M+ GET/s
Show HN: Feox Server, a Rust based, drop-in replacement for Redis
https://github.com/mehrantsi/feox-server
After the release of Feox DB (https://github.com/mehrantsi/feoxdb), I received a number of questions/requests about a potential service layer on top. I spent the last week and created this Redis compatible server for it which required 2 version releases on Feox itself as well.Benchmark:Feox:redis-benchmark -h 127.0.0.1 -p 6379 -t set,get -n 1000000 -r 1000000 -c 50 -P 64 -qSET: 4016064.25...
When your KV operations take 200ns instead of 20μs, you're using 100x less CPU time per operation. This translates to:
- Running the same workload on smaller/cheaper instances
- Serving 100x more users on the same hardware
- Lower cloud bills and better multi-tenancy
For desktop apps, this means your KV store barely touches the CPU, leaving resources for the actual application. For servers, it means one instance can handle what previously required a fleet.The durability tradeoff makes sense when you realize most KV workloads are derived data that can be rebuilt. Why pay 100x the CPU cost for fsync-level durability on data that doesn't need it?
The target use cases include:
1- Session stores (can be reconstructed from auth service) 2- leaderboards/counters (recent scores/counters can be recalculated) 3- Real-time analytics/metrics (losing ~100ms of metrics is acceptable) 4- Caching layers with upstream persistence 5- High-frequency systems where latency > everything
I generally think that for KV stores, there are more use cases that can accept this _slightly_ relaxed durability model than not. of course this isn't the case for a main DB. KV stores often handle derived data, caches, or state that can be rebuilt.
That said, for cases needing stronger durability, you can call flush_all() after critical operations - gives you fsync-level guarantees. Also considering adding a "sync" or "Full ACID" mode that auto-flushes on every write for users who want strong durability.
The philosophy is: make the fast path really fast for those who need it, but provide escape hatches for stronger guarantees when needed.
Show HN: Ultra-fast, embedded KV store in pure Rust
Single Operation Performance
Redis Single Operations
SET: 273,672.69 requests per second (p50=0.095 ms)
GET: 278,164.12 requests per second (p50=0.095 ms)
HPKV Single Operations
INSERT: 1,082,578.12 operations per second
GET: 1,728,939.43 operations per second
DELETE: 935,846.09 operations per second
Batch Operation Performance
Redis Batch Operations
SET: 2,439,024.50 requests per second (p50=0.263 ms)
GET: 2,932,551.50 requests per second (p50=0.223 ms)
HPKV Batch Operations
INSERT: 6,125,538.03 operations per second
GET: 8,273,300.27 operations per second
DELETE: 5,705,816.00 operations per second
The latency of 600ns as I mentioned is a local vectored interface call and not over the network. the is not how we compared the system with Redis. the above numbers are using our RIOC API over the network, in which HPKV behaves like a server similar to a Redis server.
The numbers above are compared with Redis in-memory and HPKV is still 2-6x faster. even if you assume HPKV as just an in-memory KV store with no persistence.
Is it something that you think it's useful and you might have use case for or you can't see any value in it? In other words, is it something that you might consider using HPKV because of it?
To clarify what our numbers actually mean and address your main question of "what does that number actually mean":
1- The 600ns figure represents precisely what you described - an in-memory "write done" where memory structures are updated and the data becomes globally readable to all processes. This is indeed comparable to what Redis without persistence or memcached provides. Even at this comparable measurement basis (which isn't our marketing gimmick, but the same standard used by in-memory stores), we're still 2-6x faster than Redis depending on access patterns.
For full persistence guarantees, our mean latency increases to 2582ns per record (600ns in-memory operation + 1982ns disk commit) for our benchmark scenario with 1M records and 100-byte values. This represents the complete durability cycle. This needs to be compared with for example Redis with AOF enabled.
2- I agree that the meaning of "write done" requires clear context. We've been focusing on the in-memory performance advantages in our communications without adequately distinguishing between in-memory and persistence guarantees.
We weren't trying to hide the disk persistence number, we simply used "write done" because in our comparison we compared with Redis without persistence. but mentioning the persistence made an understandable confusion. that was bad on our part.
Based on your feedback, we'll update our documentation to provide more precise metrics that clearly separate these operational phases and their respective guarantees.
UPDATE:
clarification on mean disk write measurement:
the mean value is calculated from the total time of flushing the whole write buffer (parallel processing depending on the number of available cpu cores) divided by the number of records. so the total time for processing and writing 1M records as described above was 1982ms which makes the mean write time for each record 1982ns.
this is 1M records, 3M operations on a single node, single thread, recorded in real time (1x).
I understand that without access to the source of test program it's hard to trust, but we can arrange that if you decided to take on that call :)
this can be a good learning opportunity for both of us (potentially more for us) :)
if you're interested, please send us an email to [email protected] and we can arrange that
our main target for "performance" value proposition are companies and businesses which will setup HPKV either locally (Enterprise plan) for nanosecond performance or in the cloud provider of their choosing, and working via RIOC API (Business Plan), getting ~15 microsecond range over network. however you're totally right, that doesn't really matter much if you're using it REST or WebSocket. for Pro tier, our value proposition is still the fastest managed KV store (you still get <80 ms for writes with a ~30ms ping to our servers) and features such as bi-directional WS, Atomic operations and Range Scans on top basic operations.
but given your comment, I think we should perhaps rethink how we're presenting the product. thanks for the feedback again :)
Atomicity: Yes, for individual operations. Each key-value operation is atomic (it either completes fully or not at all).
Consistency: Partial. We ensure data validity through our conflict resolution strategies, but we don't support multi-key constraints or referential integrity.
Isolation: Limited. Operations on individual keys are isolated, but we don't provide transaction isolation levels across multiple keys.
Durability: Yes. Our persistence model allows for tunable durability guarantees with corresponding performance trade-offs.
So while we provide strong guarantees for individual operations, HPKV is not a full ACID-compliant database system. We've optimized for high-performance key-value operations with practical durability assurances rather than complete ACID semantics.
this is fair because we provide transactional guarantee and immediate consistency, regardless of the state of the append-only write buffer entry. during that speed, for a given key, the value might change and a new write buffer entry might be added for the said key before the write buffer had the chance to complete (as you mentioned the actual write on disk is slower) but the conflict resolution still ensures the write of the last valid entry and skips the rest. before this operation HPKV is acting like an in-memory KV store.
1- as mentioned, we are not using any traditional filesystem and we're bypassing several VFS layers.
2- free space management is a combination of two RB trees, providing O(log n) for slice and O(log n + k) - k being the number of adjacent free spaces for merge.
3- majority of the write path employs a lock free design and where needed we're using per cpu write buffers
the transactional guarantees we provide is via:
1- atomic individual operations with retries
2- various conflict resolution strategies (timestamp, etc.)
3- durability through controlled persistence cycles with configurable commit intervals
depending on the plan, we provide persistence guarantee between 30 sec to 5 minutes
1- as mentioned, we are not using any traditional filesystem and we're bypassing several VFS layers.
2- free space management is a combination of two RB trees, providing O(log n) for slice and O(log n + k) - k being the number of adjacent free spaces for merge.
3- majority of the write path employs a lock free design and where needed we're using per cpu write buffers
the transactional guarantees we provide is via:
1- atomic individual operations with retries
2- various conflict resolution strategies (timestamp, etc.)
3- durability through controlled persistence cycles with configurable commit intervals
depending on the plan, we provide persistence guarantee between 30 sec to 5 minutes