h2database / h2database/h2database

Decrease cache size automatically when there are too many databases

Open
#2,222 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
4.6k
Forks
1.3k
Avg merge
1d 2h
Merged PRs (30d)
9

Description

https://groups.google.com/forum/#!topic/h2-database/wL-Qo_OYCZY

The default cache size is 64 MiB per 1 GiB of memory. I thing the Engine should check count of open databases and if we have too may of them the default cache size for a new databases should be decreased and existing databases should be processed to decrease their cache size too (maybe only if it wasn't changed by the user).

If number of databases is already beyond any sane limit for the current environment (memory size should be considered), we should block the following attempts to open another one.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the Engine and the linked H2 discussion to understand how open databases and default cache sizes are tracked. Define how memory and database count determine new and existing cache sizes, when user-set sizes are preserved, and when opening another database is blocked; the issue is done when these rules are implemented and verified.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
databases
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.