Skip to content

Instantly share code, notes, and snippets.

@dckc

dckc/0-README.md Secret

Last active October 12, 2021 04:26
Show Gist options
  • Save dckc/e29a939208172f16b79ef5f31e6e7d5d to your computer and use it in GitHub Desktop.
Save dckc/e29a939208172f16b79ef5f31e6e7d5d to your computer and use it in GitHub Desktop.
agoric start performance investigation

context: wallet slow to deploy: 22 minutes · Issue #3802 · Agoric/agoric-sdk

Findings

  • onBind look like they could go in parallel
  • E(zoe).startInstance() could take an ERef<Instance>
  • wallet API is polling timer

Methods

my agoric install comes from 3acf78d786fe from Fri Oct 8

I gathered a sim chain slog file:

date -u && SOLO_SLOGFILE=$PWD/yslow3.slog SLOGFILE=$PWD/simchain.slog agoric start -v --reset

size etc.:

connolly@jambox:~/projects/agoric/testnet-load-generator$ ls -l *.slog
-rw-rw-r-- 1 connolly connolly 93903002 Oct 11 19:25 simchain.slog
-rw-rw-r-- 1 connolly connolly 72561925 Oct 11 19:25 yslow3.slog
-rw-rw-r-- 1 connolly connolly 32152840 Oct 11 19:15 yslow-cont.slog
-rw-rw-r-- 1 connolly connolly 40155861 Oct 11 15:50 yslow.slog

then build a plantuml sequence diagram and render as SVG:

Compilation started at Mon Oct 11 19:25:57

make view
node scripts/slog-to-diagram.mjs <simchain.slog >wallet-start.txt
{ ref: 'kp40' }
...
{ ref: 'kp696' }
java -jar plantuml.jar -tsvg wallet-start.txt
firefox slog.svg
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View raw

(Sorry about that, but we can’t show files that are this big right now.)

@dckc
Copy link
Author

dckc commented Oct 12, 2021

darn it; I clobbered simchain.slog

@erights
Copy link

erights commented Oct 12, 2021

I love this! Great start!

Looking at this, can you tell where promise pipelining occurred? Where there were forced round trips? How?

@dckc
Copy link
Author

dckc commented Oct 12, 2021

Thanks, @erights
A pattern of
->
->
<-
<-

between 2 vats suggests pipelining, or at least no await.

->
<-
->
<-

... suggests an await. Looking at the method names and object identifiers can suggest more strongly that the round trip is unnecessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment