Author Topic: Galera (mariaDB) configuration recommendations  (Read 149 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
Galera (mariaDB) configuration recommendations
« on: March 15, 2025, 12:27:20 PM »
Hello all

I've been tinkering with the latest version of Gemini 2.0 and it gave me pretty solid instructions about custom configuration settings on our MariaDB 11.4.5

The performance has improved by a lot, and there is no more lag from slow queries.

Now taking it one step further, Gemini suggests to edit some rows on the [galera] section.

Here's the recommendation:

[galera]
# Mandatory settings
wsrep_on=ON
wsrep_provider="/usr/lib64/galera/libgalera_smm.so"  # Update with the correct path wsrep_cluster_address="gcomm://node1.example.com,node2.example.com,node3.example.com"  # Replace with your node addresses binlog_format=row
default_storage_engine=InnoDB
innodb_autoinc_lock_mode=2

# Allow server to accept connections on all interfaces.
bind-address = 0.0.0.0 # Optional settings (adjust values based on your needs and environment)
wsrep_slave_threads=4  # Increase for better replication performance
innodb_flush_log_at_trx_commit=2  # Balance performance and data durability

# Other important Galera settings (add and customize as needed)
wsrep_node_name = "node1"  # Set a unique name for each node
wsrep_sst_method = rsync  # Recommended SST method
wsrep_certify_nonpk = 1  # Enable if you have many non-primary key updates
wsrep_max_ws_rows = 128  # Adjust based on your transaction sizes
wsrep_max_ws_size = 1073741824  # Adjust based on your transaction sizes and network bandwidth

# ... other Galera settings ...

Key changes and explanations:
Uncomment and complete mandatory settings:
wsrep_provider: Provide the actual path to your Galera library file.
wsrep_cluster_address: List the IP addresses or hostnames of all nodes in your Galera cluster.
   
Adjust optional settings:
wsrep_slave_threads: Increase from the default 1 to improve replication performance. Start with a moderate value and monitor for optimal results.
innodb_flush_log_at_trx_commit: Set to 2 for a balance between performance and data durability in Galera.
   
Add other important Galera settings:
wsrep_node_name: Assign a unique name to each node in your cluster.
wsrep_sst_method: Use rsync as the recommended SST method for efficiency.
wsrep_certify_nonpk: Enable if your workload involves many non-primary key updates.
wsrep_max_ws_rows and wsrep_max_ws_size: Adjust these based on your typical transaction sizes and network bandwidth.
   

Anyone has experience with this?


Any suggestions? Is this a feasible configuration?


How can I locate the mentioned files?


Thank you very much
« Last Edit: March 15, 2025, 12:31:35 PM by mind5t0rm »
A global boutique AI consulting, marketing & advertising agency, helping businesses worldwide achieve success - headquartered in Singapore, Southeast Asia.

Offline
*****
Re: Galera (mariaDB) configuration recommendations
« Reply #1 on: March 15, 2025, 02:53:20 PM »
Sorry, I'm still very much in the place of following a human written guide rather than asking an AI for advice. For starters, you need to update MariaDB to 10.11 LTS in order to get better performance, as a foundational step before adding software stacked on top of it (your 10.4 version is EOL).
https://www.alphagnu.com/topic/23-upgrade-mariadb-1011-in-cwp-centos-7-centos-8-stream-almalinux-78-rockylinux-78/#comment-25

Offline
*
Re: Galera (mariaDB) configuration recommendations
« Reply #2 on: March 15, 2025, 02:55:54 PM »
you need to update MariaDB to 10.11 LTS

Thanks mate, as I mentioned before, I'm using the MariaDB 11.4.5 LTS version. (11.4.X repo)
A global boutique AI consulting, marketing & advertising agency, helping businesses worldwide achieve success - headquartered in Singapore, Southeast Asia.