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

Integrating continuous benchmarking from js-logger #47

Merged
merged 4 commits into from
Jul 22, 2022

Conversation

CMCDragonkai
Copy link
Member

@CMCDragonkai CMCDragonkai commented Jul 21, 2022

Description

This brings in some synchronisation with js-logger and continuous benchmarking

Issues Fixed

Tasks

  • 1. Updated continuous benchmarking framework
  • 2. Updated testing dependencies
  • 3. Updated .gitlab-ci.yaml to run benchmarks
  • 4. Changed to using nix-shell --arg ci true --run $'' to ensure strict error checking AND also allow C-style string escaping
  • 5. Upgraded ts-node to using swc

Final checklist

  • Domain specific tests
  • Full tests
  • Updated inline-comment documentation
  • Lint fixed
  • Squash and rebased
  • Sanity check the final build

@ghost
Copy link

ghost commented Jul 21, 2022

👇 Click on the image for a new way to code review
  • Make big changes easier — review code in small groups of related files

  • Know where to start — see the whole change at a glance

  • Take a code tour — explore the change with an interactive tour

  • Make comments and review — all fully sync’ed with github

    Try it now!

Review these changes using an interactive CodeSee Map

Legend

CodeSee Map Legend

@CMCDragonkai
Copy link
Member Author

CMCDragonkai commented Jul 21, 2022

Here are the differences from the previous benchmark. This is run with fixed-cpu-run npm run bench. The top array line is before. The new metrics report is afterwards.

[43375, 24504, 27503, 13785],

db_1KiB_ops{name="get 1 KiB of data"} 48563
db_1KiB_ops{name="put 1 KiB of data"} 39043
db_1KiB_ops{name="put zero data"} 40984
db_1KiB_ops{name="put zero data then del"} 21108

[570, 543, 29963, 13694],

db_1MiB_ops{name="get 1 MiB of data"} 821
db_1MiB_ops{name="put 1 MiB of data"} 638
db_1MiB_ops{name="put zero data"} 41831
db_1MiB_ops{name="put zero data then del"} 20022

The main thing to see here is that puts have become much faster 1.59x faster, while gets are getting back similar to leveldb speeds. Prior leveldb was even using the boosted CPU.

I suspect the biggest speed at this point will be due to usage of native transactions inside rocksdb, however I have not started measuring transactions yet.

Also note that these are unencrypted performance. Encryption is not involved here because it will seriously affect the speed until we move to using native crypto. Further benchmarking can be done with DB plus crypto subsequently.

@CMCDragonkai
Copy link
Member Author

@tegefaulkes see benchmark data above.

@CMCDragonkai
Copy link
Member Author

Error indicates that js-logger needs to be updated on js-workers first. Otherwise the strict type checking is failing. @emmacasolin

@emmacasolin
Copy link
Contributor

emmacasolin commented Jul 22, 2022

Error indicates that js-logger needs to be updated on js-workers first. Otherwise the strict type checking is failing. @emmacasolin

Just updated js-workers since js-polykey needs efs to be updated and efs needs js-workers, but it's not letting me push up the version tag for v1.3.4 of js-workers

remote: error: GH006: Protected tag update failed for refs/tags/v1.3.4.
remote: error: You're not authorized to create a tag
To github.com:MatrixAI/js-workers.git
 ! [remote rejected] v1.3.4 -> v1.3.4 (protected tag hook declined)
error: failed to push some refs to 'github.com:MatrixAI/js-workers.git'

As a side-note efs also needs js-db to be updated so I won't be able to proceed until js-logger gets updated here.

@CMCDragonkai
Copy link
Member Author

Permissions updated, you should be able to push protected tags to js-logger now.

@CMCDragonkai
Copy link
Member Author

1.3.5 of js-workers is being staged.

@CMCDragonkai
Copy link
Member Author

Going to merge now, and do the rest in staging.

@CMCDragonkai CMCDragonkai merged commit fa5007f into staging Jul 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants