-
Notifications
You must be signed in to change notification settings - Fork 383
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
chore: Add misc/stress-test #1583
base: master
Are you sure you want to change the base?
Conversation
Great stuff! |
e08801f
to
4c8bdf3
Compare
dff0ef6
to
1bcaf7b
Compare
dd4bc2f
to
813b077
Compare
813b077
to
59561b4
Compare
Interim results with gnolandHere are some results with gnoland (on-disk storage) where the max allowed gas was increased for adding 500 posts each transaction. The stress test added a million posts. On average, it took 5 seconds to add 500 posts. This remained fairly constant. (I was testing this on my working Mac. The extra time during 600 000 and 700 000 was because my browser was temporarily using a lot of memory. This wouldn't happen on a dedicated node.) Here is the gnoland memory usage: It uses a baseline 330 MB RAM for zero posts and 418 MB RAM for one million posts, with fairly linear increase. That's 88 bytes per post, which is much more reasonable than 20 000 bytes per post for in-memory storage. When gnodev supports on-disk storage, we'll repeat this experiment using it. |
59561b4
to
8bfc2f2
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1583 +/- ##
==========================================
- Coverage 60.21% 60.21% -0.01%
==========================================
Files 561 561
Lines 75071 75071
==========================================
- Hits 45205 45201 -4
- Misses 26485 26490 +5
+ Partials 3381 3380 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@jefft0 what's the status on this PR? Do you need feedback or directions of how to move forward? |
I'm still settling on the best way to run the tests. Right now it uses a clone of r/demo/boards running on a local gnoland. The clone is needed to fix this problem. Also, it's necessary to rebuild gnoland with a hack to increase the MaxGas so that more operations can be done per transaction to stuff data into the node. Otherwise it takes forever. Can MaxGas be configured on the command line to start gnoland? (It has Should this PR be merged if it needs hacks like this to get it running? |
It currently doesn't do anything, because NewApp in I'm making a PR to fix that, but I wanted to add the unused-param linter to avoid this happening again, and I'm now in a rabbit hole. In any case, thought I'd mention this here so you can at least sort it out with a patch on your side. (Or use gnodev, which shouldn't have this issue)
No, fair point. Let's wait on the outstanding issues. It may also be nice, for this PR specifically, to add instructions in a README on how to run the stress test. Let's re-consider how to add this after fixing max-vm-cycles and the GetOrigCaller issue. |
082bf29
to
1b914ff
Compare
39cb609
to
a2406df
Compare
a2406df
to
1468ff0
Compare
1468ff0
to
1d1c629
Compare
1d1c629
to
712b6f2
Compare
712b6f2
to
011f014
Compare
011f014
to
d7f1216
Compare
…() to PrevRealm().IsUser() (#2358) In r/demo/boards, `std.AssertOriginCall()` blocks calling the API from another realm. But it also prevents using MsgRun for testing as we do in PR #1583. Therefore, we change to check `std.PrevRealm().IsUser()`. This still blocks another realm from calling the code, but allows being [called by MsgRun](https://github.com/gnolang/gno/blob/d7f12167eff72cd4a12e9e8b8aaa30dc241bfb6c/misc/stress-test/stress-test-many-posts/main.go#L148-L156) where a user keypair sends the transaction. <details><summary>Contributors' checklist...</summary> - [x] Added new tests, or not needed, or not feasible - [x] Provided an example (e.g. screenshot) to aid review or the PR is self-explanatory - [x] Updated the official documentation or not needed - [x] No breaking changes were made, or a `BREAKING CHANGE: xxx` message was included in the description - [x] Added references to related issues and PRs </details> --------- Signed-off-by: Jeff Thompson <[email protected]> Co-authored-by: Leon Hudak <[email protected]>
9a32a24
to
907101f
Compare
Signed-off-by: Jeff Thompson <[email protected]>
907101f
to
d7338dd
Compare
…() to PrevRealm().IsUser() (gnolang#2358) In r/demo/boards, `std.AssertOriginCall()` blocks calling the API from another realm. But it also prevents using MsgRun for testing as we do in PR gnolang#1583. Therefore, we change to check `std.PrevRealm().IsUser()`. This still blocks another realm from calling the code, but allows being [called by MsgRun](https://github.com/gnolang/gno/blob/d7f12167eff72cd4a12e9e8b8aaa30dc241bfb6c/misc/stress-test/stress-test-many-posts/main.go#L148-L156) where a user keypair sends the transaction. <details><summary>Contributors' checklist...</summary> - [x] Added new tests, or not needed, or not feasible - [x] Provided an example (e.g. screenshot) to aid review or the PR is self-explanatory - [x] Updated the official documentation or not needed - [x] No breaking changes were made, or a `BREAKING CHANGE: xxx` message was included in the description - [x] Added references to related issues and PRs </details> --------- Signed-off-by: Jeff Thompson <[email protected]> Co-authored-by: Leon Hudak <[email protected]>
Signed-off-by: Jeff Thompson <[email protected]>
This PR adds a Go utility in misc/stress-test/stress-test-many-posts which adds millions of posts to the (local) boards realm to test how memory and transaction time change with lots of realm storage. See the README for how to use it. See this report for example graphs created from using this utility.