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

[Feat]: carts for mariadb circular buffers #17656

Open
ekexcello opened this issue May 14, 2024 · 0 comments
Open

[Feat]: carts for mariadb circular buffers #17656

ekexcello opened this issue May 14, 2024 · 0 comments
Labels
feature request New features needs triage Issues which need to be manually labelled

Comments

@ekexcello
Copy link

Problem

We use mariadb with galera. To investigate and tune it's state transfre capability, we need to track utilization of two circular buffers, namely Gcache and Redo log (innodb_log). We need to know how much history buffers are able to hold in our setup.

Description

As buffers are circular, they act like LIFO, so once the buffer is completely utilized, adding new data purges oldest records.
For each buffer we would need three charts:

  • circular buffer size
  • total amount of bytes written into the buffer
  • time since the moment the buffer is completely utilized first since mariadbd start-up.

In order not to overload mariadb with reading parameters, it's enough to have these values checked once a minute.
At the moment Netdata already collects wsrep_replicated_bytes per-second delta (shown on chart mysql.galera_bytes and Innodb log buffer per-second delta is present in mysql.innodb_io, but we need absolute values also.

Importance

really want

Value proposition

  • For Gcache:
  1. buffer size on disk
  2. amount of replicated data
  3. time since first overflow
  • For Innodb log buffer:
  1. buffer size on disk
  2. amount of data written
  3. time since first overflow

Proposed implementation

  • For gcache buffer:
  1. size can be obtained as a field gcache.keep_pages_size from the wsrep_provider_options variable (that can be read as SHOW VARIABLES LIKE 'wsrep_provider_options'\G).
  2. amount of replicated data can be obtained from SHOW STATUS LIKE 'wsrep_replicated_bytes'; output directly.
  3. time since first overflow is 0 until the moment of (wsrep_replicated_bytes = gcache.keep_pages_size), than it should be the difference between that moment and current time.
  • For Innodb log buffer:
  1. size can be read from system variable SHOW STATUS LIKE 'innodb_log_file_size'; directly
  2. amount of written data can be read from system variable SHOW STATUS LIKE 'Innodb_os_log_written';
  3. time since first overflow is 0 until the moment of (innodb_log_file_size = Innodb_os_log_written), than it should be the difference between that moment and current time.
@ekexcello ekexcello added feature request New features needs triage Issues which need to be manually labelled labels May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New features needs triage Issues which need to be manually labelled
Projects
None yet
Development

No branches or pull requests

1 participant