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

Add documentation about common patterns and pitfalls #130

Open
AlgorithmsAreCool opened this issue Aug 21, 2020 · 0 comments
Open

Add documentation about common patterns and pitfalls #130

AlgorithmsAreCool opened this issue Aug 21, 2020 · 0 comments
Assignees

Comments

@AlgorithmsAreCool
Copy link
Collaborator

AlgorithmsAreCool commented Aug 21, 2020

Topics

LMDB Basics

  • Overview of concepts and terms
  • Usage scenarios
  • Common problems and limitations (find some by looking at github issues)
    • Max Key size (511 bytes by default)
  • How to use Async/Await safely (and when not to use it)
  • Picking good config defaults
    • MaxReaders
    • MapSize
    • MaxDatabases
  • DupSort and DupFixed
    • DupSort Values are limited to 511 bytes :/

Getting the best performance

  • Performance expectations and knowing what things cost
  • Picking good keys
    • Integer keys with IntegerKey set on database if possible
  • Understanding write amplification and overhead
    • Small records can use more space than expected
  • Hot to use strings as keys efficiently
  • Importance of ReadOnly vs Normal Transactions
  • Batching Writes
  • Compression?
  • The seductive danger of NO_SYNC
  • Use the cursor API for faster reads (0-copy,
  • Impact of lots of Databases
    • cache your db handles instead of reopening everytime
  • DB Health and maintenance
    • When should you consider reallocating the DB to defragment

Advanced nonsense (might never get around to writing these)

  • How to build your own indexes
  • How to grow/reallocate the DB as quickly as possible
  • Coordinating multiple lmdb environments
  • Sharding to allow incremental reallocations
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

No branches or pull requests

1 participant