0

My application suffers from slow write actions into a MariaDB when the data directory of the server is on a different disk partition then the root partition.

I use a Raspberry Pi 3 with Raspbian Buster as OS.

The setup of slow performance:

  • The SD card is divided into three partitions: first boot, second root, and third data.
  • The root partition is set to read only, but shows slow performance with read-write performance too.
  • I copied the MariaDb data directory by means of rsync to a location on the data partition and adjusted the mariaDB config file accordingly.

Setup of normal performance:

  • As soon as I change the data directory in the MariaDb config file to a directory on the root partition, the speed of saving data in the database is as fast as expected.

For comparison: When the data directory is not on the root partition, the average time to write my data is dramatically increased by 14 seconds. I do not write much data, and usually it may take a round 1 second or even less.

3
  • Do you use the same filesystem on both partitions? Is the data partition aligned to SD card block size? Commented Mar 9, 2020 at 8:14
  • Yes, I use the same filesystem (ext4, mounted with option noatime). How do I know/assure that the partition is aligned to the block size of the card?
    – elnacho
    Commented Mar 9, 2020 at 8:51
  • See this answer
    – danblack
    Commented May 1, 2023 at 22:40

0

You must log in to answer this question.