[MDEV-18081] cache instances being ignored Created: 2018-12-26  Updated: 2018-12-29  Resolved: 2018-12-29

Status: Closed
Project: MariaDB Server
Component/s: Server
Affects Version/s: 10.3.11
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Philip orleans Assignee: Unassigned
Resolution: Not a Bug Votes: 0
Labels: None
Environment:

Linux



 Description   

I get this when writing to a very large RocksDB table, from many connections
[Note] Detected table cache mutex contention at instance 1: 28% waits. Additional table cache instance activated. Number of instances after activation: 2.
2018-12-25 20:19:00 51 [Note] Detected table cache mutex contention at instance 2: 20% waits. Additional table cache instance activated. Number of instances after activation: 3.

but my configuration is

-----------------------------------------------+----------+
| rocksdb_force_compute_memtable_stats_cachetime | 60000000 |
| rocksdb_table_cache_numshardbits               | 19        |
| table_definition_cache                         | 400      |
| table_open_cache                               | 2000     |
| table_open_cache_instances                     | 24        |
+------------------------------------------------+----------+

I get those errors almost right away. I insert records from 64 connections using GNU parallels



 Comments   
Comment by Elena Stepanova [ 2018-12-28 ]

Could you please elaborate, what you perceive as a problem here? It looks all right at the first glance: the initial value is always 1, when a contention is detected, the next instance is activated, still well within the configured limit.
https://mariadb.com/kb/en/library/server-system-variables/#table_open_cache_instances

Comment by Philip orleans [ 2018-12-29 ]

I thought that the instances will be instantiated from the beginning. If this is by design, then please close the case.

Comment by Elena Stepanova [ 2018-12-29 ]

According to the documentation, it is indeed intentional:

The MariaDB implementation is more efficient, and always starts with 1 instance, increasing the number up to the maximum when there's contention. Whenever an instance is activated a note is written to error log, for example Detected table cache mutex contention at instance 1: 25% waits. Additional table cache instance activated. Number of instances after activation: 2. The number of instances does not decrease again.

Generated at Thu Feb 08 08:41:21 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.