Score:0

How do I analyze the workload of a mariaDB instance?

ru flag

I'm not a server admin, so sorry if my questions are a bit basic, but I couldn't find anything by googling.

We have a locally hosted MariaDB (not SkySQL) on a windows server and I'd like to see how it's handling the current workload. It usually has around 950-1100 open connections.

Ideally I'd like to see a percentage similar to the CPU percentage in the windows task manager. The CPU in the task manager barely goes over 10% and is usually at 1% or 2%. Does this mean the server can easily handle 10x the load? I'm assuming MariaDB has some limitations of its own so I don't think that would be the case. Or is there some hard limit on how much a single instance can handle?

Edit: after 30 minutes of googling I didn't find anything but right after posting this question I find out about the performance schema. But while you're here, do you have any tips on how to properly utilize it?

jm flag
Not as familiar with Maria on Windows as all of my instances are Linux-based but a few things to check. How much memory to you have dedicated to Maria? For example `innodb_buffer_pool_size` may matter. Are the database commands (SELECT/UPDATE/INSERT) maxing out your I/O bandwidth? Any issues with returning the query results over your network speed?
Vladislav Vaintroub avatar
cn flag
A useful measurement you can do is the response time in your application? Did you run your benchmarks, and are happy with it? If not, then you can start looking at the server's CPU , disk stats, and memory use. There are countless reasons why you can have low CPU with 1000 connections, one of which is that your connections are pooled, and are idle. Another one is that you application is using a lot of locks. Third one is that disk is the bottleneck. anything is possible, and MariaDB won't give you CPU graphs. You'll need to find the bottleneck with OS tools, or perfschema
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.