Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reinstate scaledPriceAuthority upgrade; measure impact #9595

Closed
Chris-Hibbert opened this issue Jun 26, 2024 · 2 comments
Closed

Reinstate scaledPriceAuthority upgrade; measure impact #9595

Chris-Hibbert opened this issue Jun 26, 2024 · 2 comments
Assignees
Labels
auction deployment Chain deployment mechanism (e.g. testnet) enhancement New feature or request oracle Related to on-chain oracles. performance Performance related issues resource-exhaustion Threats to availability from resource exhaustion attacks Vaults VaultFactor (née Treasury)

Comments

@Chris-Hibbert
Copy link
Contributor

What is the Problem Being Solved?

#9382 upgraded the scaledPriceAuthorities, but seems to have broken the vaultFactory update. This casts doubt on the performance measurements in #9371. (If the price updates weren't getting through at all, that would be sufficient to explain the complete lack of memory growth.)

The current hypothesis is that the way the scaledPriceAuthority upgrade interfered with the upgrade was that it broke the priceFeedPromises being awaited in the upgrade-vaults proposal. This meant the vault upgrade was not triggered, so it didn't switch to new priceFeeds or the new Auction.

The way price updates were sent during performance measurement should have led to the priceFeed vats creating quote payments, which is where the memory leak happens, so maybe the measurement was okay.

Description of the Design

Redo the measurements and verify that the vaultFactory upgrade took place and prices propagated to auctions and vaults.

Security Considerations

None

Scaling Considerations

This is about measuring scaling impact.

Test Plan

See above.

Upgrade Considerations

See above.

@Chris-Hibbert Chris-Hibbert added enhancement New feature or request deployment Chain deployment mechanism (e.g. testnet) performance Performance related issues resource-exhaustion Threats to availability from resource exhaustion attacks oracle Related to on-chain oracles. Vaults VaultFactor (née Treasury) auction labels Jun 26, 2024
@Chris-Hibbert Chris-Hibbert self-assigned this Jun 26, 2024
@Chris-Hibbert
Copy link
Contributor Author

The graph in #9371 purported to show that the ATOM priceFeed and scaledPriceAuthority were fixed by an upgrade, but what it was showing was a lack of activity because the new priceFeeds didn't get hooked up to the vaultFactory.

#9748 repairs the vaultFactory upgrade. Here are some new graphs showing GC behavior after that fix. The activity behind the graph is 200 iterations of sending a price update to the priceFeed, which gets processed by the scaledPriceAuthority and passed on to Auctions and Vaults. The walletFactory is used by the oracles to pass the info to the price feeds.

image

The important vats are the new ATOM priceFeed (yellow), and the ATOM scaledPriceAuthority (red). The detailed stats show that there are no allocations in the old priceFeed and scaledPriceAuthority. The Auction, WalletFactory, Vaults, and Board have activity, but allocations and GC are clearly in balance.

This graph shows a few more vats, and includes total Kernel allocations, which dwarf the other values, but it's clear that allocations are not growing.

image


To provide a baseline, here are similar measurements before the upgrade. We provide 200 price updates to the current priceFeeds and other vats. The first chart shows the total allocations growing without restraint.

image

The first chart doesn't make it possible to distinguish the other vats, so here's an expansion without the kernel numbers. This graph makes it clear that Zoe is growing without bound.

image

And finally, dropping Zoe as well, we can see that the WalletFactory, Vaults and the Auction get collected, and remain within bounds. The board (blue), priceFeed (green), and scaledPriceAuthority (red) show no signs of slowing their growth.

image

@Chris-Hibbert
Copy link
Contributor Author

#10074 is the new PR that does the whole upgrade. Here's a measurement after that upgrade. This chart shows that overall SwingSet and Zoe behavior are stable. SwingSet is the blue line on top, and Zoe is the Gray line above the mess at the bottom.

image

This graph focuses in on the mess at the bottom, which shows all the other vats with any allocation behavior. It shows very nice GC-driven sawtooths.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auction deployment Chain deployment mechanism (e.g. testnet) enhancement New feature or request oracle Related to on-chain oracles. performance Performance related issues resource-exhaustion Threats to availability from resource exhaustion attacks Vaults VaultFactor (née Treasury)
Projects
None yet
Development

No branches or pull requests

1 participant