Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
willothy
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
5 ms
·
1.
▲
by
willothy
2y ago
Yeah, after looking into this more I think this was a big oversight on my part. Working on a (hopefully) better way of doing this right now - I'm thinking per-shard waker queues and only falling back to spinlocking like this if the que
2.
▲
by
willothy
2y ago
This is an interesting idea. I am gonna try this out - especially with dashmap, I think that could perform very well.
3.
▲
by
willothy
2y ago
Oh this is really good to know, thank you!
4.
▲
by
willothy
2y ago
Hmm, imo it's definitely better than directly spinlocking to have many spinlocks running cooperatively, but you're right that it may not be ideal. Thanks for pointing this out. I'll see if I can find a better way to coordinat
5.
▲
by
willothy
2y ago
I don't believe that waking the waker in `poll` synchronously waits / runs poll again immediately. I think it is more likely just adding the future back to the global queue to be polled. I could be wrong though, I'll look int
6.
▲
by
willothy
2y ago
I agree with this take a lot. I think having lots of custom implementations is inevitable for systems languages - the only reason why Rust is different is because Cargo/crates.io makes things available for everyone, where in C/C++
7.
▲
by
willothy
2y ago
There are a few reasons - For one, I'm not sure BTreeMap is always faster in Rust... it may be sometimes but lookups are still O(log(n)) due to the searching where with a HashMap it's (mostly) O(1). They both have their uses - I u
8.
▲
by
willothy
2y ago
This is a great point too - I definitely want to run some more varied benchmarks to get a better idea of how this performs in different settings. We'll also be using it in prod soon, so we'll see how it does in a real use setting
9.
▲
by
willothy
2y ago
I think there's a pretty big difference between committing to semantic versioning and saying "do not use this until some unspecified point in the future." Maybe I'm just not clear enough in the note - I just mean that th
10.
▲
by
willothy
2y ago
Tokio is just used for async tests and the examples, the crate doesn’t depend on any specific async runtime :)
11.
▲
by
willothy
2y ago
Hey, I think the name is cool! Fair point though, there would definitely be some benefit to having some of these things in the stdlib.
12.
▲
by
willothy
2y ago
I use a multiple of `std::thread::available_paralellism()`. Tbh I borrowed the strategy from dashmap, but I tested others and this seemed to work quite well. Considering making that configurable in the future so that it can be specialized f
13.
▲
by
willothy
2y ago
Definitely a good point. I used dashmap's benchmark suite because it was already setup to bench many popular libraries, but I definitely want to get this tested in more varied scenarios. I'll try to add a benchmark for a single ke
14.
▲
by
willothy
2y ago
Yep, someone suggested loom on our Reddit r/rust post as well - I'm actively working on that. Somehow I'd just never heard of loom before this.
15.
▲
by
willothy
2y ago
The blocking mainly occurs due to contention - imo most of the performance gain comes from being able to poll the lock instead of blocking until it's available when acquiring locks on shards. In all honesty I was quite surprised by the
16.
▲
by
willothy
2y ago
Good point, thanks! I'll look into adding that crate to the benchmarks.
17.
▲
Show HN: Whirlwind – Async concurrent hashmap for Rust
(github.com)
140 points
by
willothy
2y ago
|
54 comments
18.
▲
by
willothy
2y ago
Those are absolutely things we're looking to support, especially in the case of monitoring / accounting. Isolated tenants don't face the noisy neighbor problem here, but tenants in shared databases still may at the moment. On
19.
▲
by
willothy
2y ago
We support scaling to near-zero because of Aurora serverless, but we definitely are looking into other solutions that could be cheaper to run or self-hosted. Some regional regulations (GDPR, etc.) require local and/or isolated hosting.
20.
▲
by
willothy
2y ago
Hey Will here, another Fortress cofounder. We're still thinking about this a lot. We're using AWS Aurora currently which auto-scales compute and storage, and are looking into other options such as distributed databases (Cockroach,