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

Switch to QuickJS for CouchDB JS engine #9575

Open
garethbowen opened this issue Oct 23, 2024 · 1 comment
Open

Switch to QuickJS for CouchDB JS engine #9575

garethbowen opened this issue Oct 23, 2024 · 1 comment
Assignees
Labels
Type: Performance Make something faster
Milestone

Comments

@garethbowen
Copy link
Member

garethbowen commented Oct 23, 2024

Describe the performance issue

View rebuilding is slow which is a big problem particularly when doing an update which changes a view requiring the whole index to be rebuilt.

Describe the improvement you'd like

CouchDB 3.4.x introduced a new JS engine called QuickJS which promises 4-5x speed improvement and 6x improvement in memory usage. It's off by default. Try turning it on and see if we can get similar gains.

Describe alternatives you've considered

To Reproduce

  1. Get a db with a lot of realistic data
  2. Back up the db so you can re-run the test easily
  3. Change a view (even a whitespace change) to trigger a complete rebuild
  4. Measure the time, cpu usage, memory usage, disk usage until completion
  5. Restore the backup
  6. Change the JS engine to QuickJS (docs)
  7. Change the view and measure the time again

Measurements

  • Time to complete
  • CPU usage average and peak
  • Memory usage average and peak
  • Disk usage peak

Environment

  • Instance: A cloud instance would be ideal, but as long as the specs are the same for both runs it should be ok
  • Browser: N/A
  • Client platform: N/A
  • App: couchdb
  • Version: latest

Additional context

Blocked by #9303

@garethbowen garethbowen added the Type: Performance Make something faster label Oct 23, 2024
@garethbowen garethbowen added this to the 4.14.0 milestone Oct 23, 2024
@lorerod lorerod modified the milestones: 4.14.0, 4.15.0 Oct 30, 2024
@lorerod
Copy link
Contributor

lorerod commented Oct 30, 2024

Moved to 4.15.0 so as not to hold up the release.

@dianabarsan dianabarsan self-assigned this Nov 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Performance Make something faster
Projects
None yet
Development

No branches or pull requests

3 participants