Lurker News

Comments (47) 14 threads

aidanhs1 reply#
I really like the idea of a deterministic VM (I like Antithesis for a similar reason!), though I saw on another post that your VM is single threaded which I feel like must compromise a lot of performance analyses? E.g. when you have very high throughput multithreaded pipelines.

Personally I've really cooled on flamegraphs for the purpose of doing multithreaded performance analysis - it's so hard to infer cross-thread dependencies. I'd encourage people interested in performance analysis to read https://thume.ca/2023/12/02/tracing-methods/ (and I'd love to hear if there's something more recent than end of 2023 that has an updated census of tools) which makes a decent case for perfetto, though in my own use-cases I've just ended up creating low latency language-specific trace output library that I can aggregate and load into jaeger-ui, as you can actually add metadata indicating spans you follow from etc.
For the author: your product looks very cool, but I encourage you (or someone you pay!) to do an extensive proof reading pass to remove LLM-isms, reading stuff like "process, with what it started" as a column header of ps-like output is like nails on a chalkboard.

xyzzy_plugh1 reply#
> I really like the idea of a deterministic VM (I like Antithesis for a similar reason!)

I agree, and I also like Antithesis, but I am a bit dismayed that deterministic high-performance VMs haven't become commodity yet.
I know, I know, I am impatient, and it will happen eventually, but it's frustrating to see Antithesis corner the market so hard with a closed solution.
Maybe this is a sign I should start yet another side project?

cmrx64#
been feeling similarly
hungryhobbit1 reply#
A co-worker (formally of Nvidia) recently explained to us (his new company) Nvidia's cultural "speed of light" idea.

The core idea is you don't ask "is our GPU (or whatever is being built) as fast as the last one?" You don't even ask "is it as good as any GPU ever made?"
You instead ask "is it as fast as the speed of light?"
In other words, if you just waved away everything slowing you down, what's the absolute fastest you could complete your task? ONLY once you know that can you start putting back the other factors that slow you down: first you must start by comparing to the fastest possible way things could be ("speed of light").
Similar idea here.

rootlocus#
Curiously enough I reached the same mentality while doing performance optimizations in university. At some point you realize performance optimization is just trimming away fat you didn't actually need. This means there's a lean muscle mass somewhere that's absolutely necessary and you can't do [the thing] without it. That's essentially the only computation required to implement the feature. Everything else is fat.

Sure, sometimes fat is good. Fat is compromise. Fat might be orthogonal concerns. But you'll never get leaner than that essential muscle mass.
I guess in their case "speed of light" is the leanest muscle mass required.

disperso2 replies#
Seems very interesting. Is there some parallel to make with RR (record and replay) in terms of features, limitations, etc.?

https://github.com/rr-debugger/rr

Veserv#
Everything they described about their runtime is just a time travel debugger using a single-threaded record and replay model. So yes.

Their visualizations are techniques based around leveraging the extra data available in a full instruction trace. As such, they can be applied to any time travel debugger datastream, which trivially has a full instruction trace, or just raw instruction trace if that is all you have.

roca#
[rr maintainer here]. Similar principles but there are important differences. rr records and replays user-space processes and has to understand the user/kernel interface really well, which is a problem because that interface is super complicated. RewindVM replays the whole VM, simplifying the interface because the hypervisor interface is (or at least, can be configured to be) somewhat simpler than the user/kernel interface. The overhead of replaying at the VM level will be different ... possibly lower, possibly higher, depending on the workload; you might expect there to be fewer VM exits than system call traps, but OTOH you have to record and replay the entire guest OS instead of specific processes.

In terms of functionality, they're different. rr supports arbitrary timeslicing, e.g. thread switches at any program instruction, which ReplayVM does not. RewindVM depends on Nix, rr doesn't. RewindVM supports a kind of "mutable replay" where you can resume a VM from a checkpoint and cause it to do something different from what was previously recorded; rr's version of that is much more limited.

uvdn71 reply#
Does this type of analysis and deterministic VM help async workloads (e.g. c++ coroutine, fiber, future, etc.)? My understanding is that they don't. I would love to know how to find the critical path for async code. It feels very hard (maybe impossible) to do without changing the framework code (e.g. embedding something like a request context so we know a later task on thread A is actually a continuation for request R).
setheron1 reply#
Yes it does. Everything is deterministic even the thread orderings and all randomness that would decide asyc scheduling in user space.
uvdn71 reply#
I see. I am not familiar with deterministic VMs. I can see how it can intercept all system calls. I guess randomness is deterministic as well because all the inputs to the RNG are deterministic. So everything is a deterministic state machine.

Continue this thread — 2 replies

Load more comments