Hi Gordan,

In my case, we have a process where it is doing multiple concurrent
requests to mariadb database. Sometimes with the default configuration
mariadb is randomly crashing and doing a recovery again. We are seeing lost
connection to mariadb errors sometimes not everytime. To avoid these type
of issues, we thought of tuning mariadb parameters. But we are not sure
which parameters needs to change and what percentage or values we need give
for them.

On Fri, 21 Mar, 2025, 11:40 pm Gordan Bobic, <[email protected]>
wrote:

> You can sort of achieve it at database level to a limited extent, but
> it will never be completely clear cut.
>
> For RAM, you can do it with global allocations
> (innodb_buffer_pool_size, innodb_log_buffer_size, key_buffer_size,
> aria_pagecache_buffer_size), but not for everything that is allocated
> per thread (join_buffer_size, sort_buffer_size) or per query
> (max_allowed_packet) or multiple times per query (tmp_table_size).
> Theoretical maximum memory usage can vastly outsize the global
> allocations if you run with a lot of threads.
>
> For CPU you could try to limit the number of threads
> (innodb_thread_concurrency), and that will limit the CPU usage to that
> many CPU cores, but if I remember correctly that setting went away
> with 10.6 release, and without it I don't think there is another way.
>
> So you are out of luck if you are not willing or able to use ulimit
> and taskset to set hard limits on memory and CPU core usage.
>
> On Fri, 21 Mar 2025 at 19:53, jaswanth.at.work--- via discuss
> <[email protected]> wrote:
> >
> > We are running multiple instances of mariadb using mysqld_multi on RHEL
> Server. We want to allocate CPU, RAM based on their individual instance
> workloads. We had seen that configuring innnodb parameters will do that,
> but what are the exact parameters we need to configure to allocate CPU
> Cores, RAM to the specific instance. We want to do it at database level not
> at OS level. What is the way to do this ?
> > _______________________________________________
> > discuss mailing list -- [email protected]
> > To unsubscribe send an email to [email protected]
>
>
>
> --
> Gordan Bobic
> Database Specialist, Shattered Silicon Ltd.
> https://shatteredsilicon.net
>
_______________________________________________
discuss mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to