Skip to content

RUBY-3299 Direct access to mongocrypt_binary_t for better decryption performance #2899

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

Merged
merged 3 commits into from
Oct 14, 2024

Conversation

jamis
Copy link
Contributor

@jamis jamis commented Oct 10, 2024

This adds a benchmark for testing the performance of decrypting a document with a large number of encrypted fields (1500), and then changes the implementation so that it accesses the underlying fields of mongocrypt_binary_t directly, rather than indirectly.

The resulting performance improvements are marginal, but consistent:

with indirect mongocrypt_binary_t access:
  thread_count=1; median ops/sec=44
  thread_count=2; median ops/sec=48
  thread_count=8; median ops/sec=78
  thread_count=64; median ops/sec=327

with direct mongocrypt_binary_t access:
  thread_count=1; median ops/sec=47
  thread_count=2; median ops/sec=52
  thread_count=8; median ops/sec=82
  thread_count=64; median ops/sec=360

@jamis jamis requested a review from comandeo-mongo October 10, 2024 22:12
@jamis jamis merged commit abb7765 into mongodb:master Oct 14, 2024
236 of 237 checks passed
@jamis jamis deleted the 3299-mongocrypt_binary_t branch October 14, 2024 19:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants