#Telemetry: cache miss reasons

1 messages ยท Page 1 of 1 (latest)

dreamy cloak
#

Trying to understand the reason for cache misses in graphviz. Is the output of CachedReason() always accurate, or only in certain cases?

left void
#

nowadays span links are mostly used for this instead of cause/effect attrs but the code is still there for UI backwards compat. with older engines

dreamy cloak
#

So for a newer engine, you'd look into span links for cache miss reasons?

left void
#

eh no effect IDs are probably better for that - since they say "here are all the possible effects you should see for me in the future"

#

span links only appear when the effect's span arrives - which might be a cache hit, might not, and it might never actually arrive (if it's a dependency of a cache hit for example, you won't see a span for all the transitive dependencies)

left void
dreamy cloak
left void
#

it's always something "lazy" like an LLB op. also we don't even show the effect spans, the UI just merges them with the originating/causal span instead, so e.g. withExec(sleep 30) shows a 30s duration

dreamy cloak
#

Would you be surprised if a "higher level" span (say in terms of the nodes in the graphviz output from the CLI) has cached parents, but not be itself cached?

#

Assuming all function args are pure

left void
#

it's technically possible - sometimes the effects just never run. for example, a module whose constructor applies a default like container.From("golang:1.20") that never ends up being used, will make the constructor look like it's pending forever

dreamy cloak
#

So a pending span shows up as not cached in CachedReason()?

left void
#

btw - if you press '?' in the TUI, or add ?debug to the URL in the web UI, it'll surface all that info

dreamy cloak
#

Ooh, didn't know about ?debug!

left void
#

a little buggy though, the debug icon shows up for nested spans since it's far off in the margin ๐Ÿ˜›

dreamy cloak
#

Ok, I can se the effectIDs in that debug, but how can I relate them to something?

left void
#

it also lists the effect spans and their statuses below the <pre> - they don't show up normally so can't really relate it to other spans

dreamy cloak
#

I'm looking at a span in cloud ui where the snapshot shows a bunch of effectids, but in the Effects section only one is shown. Which ones go in there?

left void
#

only ones that we've seen a span for

#

got a link?

dreamy cloak
#

Some IDs are in xxh3 and others are in sha256. Does that tell you something about what kind of "span" it is?

left void
#

part of the march towards dagger/dagql native content-addressing

#

hopefully that only shows up in the inner plumbing like this

#

hmm looks like it's used for the context dir too

#

basically anywhere that you used to see blob(...)

dreamy cloak
#

If a span HasLogs, it's not cached?

left void
#

yeah, since that implies something ran

dreamy cloak
#

Oh, I see.

left void
#

hmm it seems like the list of effects is incomplete

#

for example this span beneath codegen

dreamy cloak
#

Can't tell why it ran, though.

left void
#

same digest is listed in the effect IDs of the parent codegen call, but the uv lock span isn't listed for some reason

left void
#

are you trying to determine why codegen re-ran?

dreamy cloak
#

Yeah, this withExec

left void
#

i see

#

cc @brisk walrus - saw it mentioned in another thread