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

Make shard cache size configuration so changing it does not require a binary release #7564

Closed
exalate-issue-sync bot opened this issue Sep 6, 2022 · 0 comments · Fixed by #7578
Closed
Assignees

Comments

@exalate-issue-sync
Copy link

No description provided.

near-bulldozer bot pushed a commit that referenced this issue Sep 6, 2022
This is a pure refactor, including two main refactors:

- replace `TrieCacheFactory` with `TrieConfig`
- move config constants into `TrieConfig`

The motivation is to facilitate wider configuration and changes to the
config format in follow-up PRs.

See also #7564.
jakmeier added a commit to jakmeier/nearcore that referenced this issue Sep 7, 2022
Make the shard cache max total bytes configurable.
Also add separate  configuration for view caches.

This deprecates the old format for configuring cache capacity.
The old format will still work for now but values in the new format will
overwrite any values set in the old format,

Example of the new format:

```json
{
  "trie_cache": {
    "shard3.v1": {
      "max_entries": 45000000,
      "max_bytes": 3000000
    }
  },
  "view_trie_cache": {
    "shard0.v1": {
      "max_entries": 1,
      "max_bytes": 1
    },
    "shard1.v1": {
      "max_entries": 1,
      "max_bytes": 1
    },
    "shard2.v1": {
      "max_entries": 1,
      "max_bytes": 1
    },
    "shard3.v1": {
      "max_entries": 45000000,
      "max_bytes": 3000000
    }
  }
}
```

resolves near#7564
nikurt pushed a commit that referenced this issue Sep 7, 2022
This is a pure refactor, including two main refactors:

- replace `TrieCacheFactory` with `TrieConfig`
- move config constants into `TrieConfig`

The motivation is to facilitate wider configuration and changes to the
config format in follow-up PRs.

See also #7564.
jakmeier added a commit to jakmeier/nearcore that referenced this issue Sep 15, 2022
This is a pure refactor, including two main refactors:

- replace `TrieCacheFactory` with `TrieConfig`
- move config constants into `TrieConfig`

The motivation is to facilitate wider configuration and changes to the
config format in follow-up PRs.

See also near#7564.
near-bulldozer bot pushed a commit that referenced this issue Oct 28, 2022
Make the shard cache max total bytes configurable.
Also add separate  configuration for view caches.

This deprecates the old format for configuring cache capacity.
The old format will still work for now but values in the new format
will overwrite any values set in the old format.

Example of the new format, that sets all normal caches to 50MB, aurora's shard to 100MB, shard 3 to 3GB, and view caches to 30MB:

```json
{
  "trie_cache": {
    "default_max_bytes": 50000000,
    "per_shard_max_bytes": {
      "shard1.v1": 10000000,
      "shard3.v1": 3000000000
    }
  },
  "view_trie_cache": {
    "default_max_bytes": 30000000
  }
}
```

resolves #7564
nikurt pushed a commit that referenced this issue Nov 7, 2022
Make the shard cache max total bytes configurable.
Also add separate  configuration for view caches.

This deprecates the old format for configuring cache capacity.
The old format will still work for now but values in the new format
will overwrite any values set in the old format.

Example of the new format, that sets all normal caches to 50MB, aurora's shard to 100MB, shard 3 to 3GB, and view caches to 30MB:

```json
{
  "trie_cache": {
    "default_max_bytes": 50000000,
    "per_shard_max_bytes": {
      "shard1.v1": 10000000,
      "shard3.v1": 3000000000
    }
  },
  "view_trie_cache": {
    "default_max_bytes": 30000000
  }
}
```

resolves #7564
nikurt pushed a commit that referenced this issue Nov 9, 2022
This is a pure refactor, including two main refactors:

- replace `TrieCacheFactory` with `TrieConfig`
- move config constants into `TrieConfig`

The motivation is to facilitate wider configuration and changes to the
config format in follow-up PRs.

See also #7564.
nikurt pushed a commit that referenced this issue Nov 9, 2022
Make the shard cache max total bytes configurable.
Also add separate  configuration for view caches.

This deprecates the old format for configuring cache capacity.
The old format will still work for now but values in the new format
will overwrite any values set in the old format.

Example of the new format, that sets all normal caches to 50MB, aurora's shard to 100MB, shard 3 to 3GB, and view caches to 30MB:

```json
{
  "trie_cache": {
    "default_max_bytes": 50000000,
    "per_shard_max_bytes": {
      "shard1.v1": 10000000,
      "shard3.v1": 3000000000
    }
  },
  "view_trie_cache": {
    "default_max_bytes": 30000000
  }
}
```

resolves #7564
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 a pull request may close this issue.

1 participant