-1

EDIT3: Read-write splitting seems the answer as pointed by out the user dbdemon in the linked question.

Internal MariaDB error code: 1927 ('Connection was killed')

EDIT2: https://drupal.stackexchange.com/questions/68350/high-performance-db-cluster-with-drupal

EDIT: After increasing to 4 cores each node, the log is clearer.

My mariadb cluster is crashing (SIGTERM) or freezing with corrupted data and 100% CPU. The 3 nodes run on 1 core each. I could not find minimum requirements for mariadb,

Is there any way to calculate the required CPU power for mariadb?

References will be appreciated :-)

Edit: The data was not corrupted as far as mariadb/galera were concerned, but seems it was partial since the application (drupal) returned PHP errors (http 500)

The cpu is 2nd generation single thread.

Two nodes serve end-users and one is for internal use, the one for internal use maintained integrity and I could recover from it by dumping and restoring.

  • CPU utilization does not cause crashes. See if you can find helpful hints in this question – mustaccio Nov 23 '17 at 17:04
  • Waht does 2nd generation single thread mean, exactly? Opteron? ;-) What is the actual spec? Although, most people don't seem to think it's the problem (I don't either - CPU is rarely a problem with db apps). Are you running out of space? What is the output of df -h? – Vérace Nov 23 '17 at 20:51
  • How's the memory allocation? Swapping? – Rick James Nov 24 '17 at 19:16
  • There is no "min CPU requirement"; a slow cpu with few cores simply runs slower. – Rick James Nov 24 '17 at 19:19
  • This is a production system with 40 queries avg per second, if it's not fast enough the requests pile up + everything in the original question – a_at_cyber_dot_training Nov 25 '17 at 4:08
0

Is there any way to calculate the required CPU power for mariadb?

That very much depends on your data, schema, and workloads, so there is no easy answer.

A small database with occasional access will run quite happily on an atom (heck, possibly on an old 486 if you happen to have one lying around!) and large one especially if its design or queries are not optimal may need several of the latest, greatest, massively-multi-core, server-GHz CPUs.

crashing with corrupted data and 100% CPU

Thrashing a CPU should not cause corruption. Unless it has a physical problem and is overheating under load, but even then if you are using a transactional database engine (which IIRC MariaDB does by default) your data should be in a consistent state upon recovery.

To try diagnose the crash you need to look at log file entries around the time, also check hardware monitoring logs if you have any. See the question mustaccio referenced for some initial pointers.

You state any detail about the existing hardware. A single core of what sort of CPU? Does this mean you are operating in a virtual environment? If is it one that has dynamic memory allocation then perhaps you are on massively oversold nodes and your processes are getting killed due to using a lot of memory.

| improve this answer | |
0

Fixed by upgrading MariaDB, and confirmed bug in an old version.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.