Skip to content

Optimize table meta to reduce memory consumption #17200

Closed
@djshow832

Description

Development Task

Sometimes there're many tables in a TiDB cluster. e.g.

  • TiDB is used for data warehouse
  • in multi-tenant environment, each user has a database
    For this scenarios, memory for each table should be limited.

However, TiDB always loads all tables in all schema at once in bootstrap, which can consume very much memory.
On the other hand, statistics info also occupies much memory, and it has been proposed in #16572
In low-profile nodes with 8G or 16G memory, it always encounters OOM.

For the scenarios above, some tables are rarely used, so they can be loaded lazily and released after being idle for a long time.


See also #16572

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions